dotnet-websharper / core

WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#
https://websharper.com
Apache License 2.0
593 stars 52 forks source link

Missing optimization in RPC shim #1342

Closed granicz closed 1 year ago

granicz commented 1 year ago

Looking at the generated RPC shim for a websharper-web project, we have:

export function DoSomething(input){
  return Bind((new AjaxRemotingProvider()).Async("Server/DoSomething", [((Id())())(input)]), (o) => Return(((Id())())(o)));
}

This should be reduced/optimized to remove the unnecessary Id calls.