core icon indicating copy to clipboard operation
core copied to clipboard

Allow generics for remoting

Open Jand42 opened this issue 6 years ago • 0 comments

Currently, Remote methods must have a fully specified type signature.

It would be possible that this is relaxed, and in the case of calling generic remote functions, the client always also sends the full type names (generated into the JS output by the compiler based on compile-time type information, so it is not an issue that JS runtime values less typed), so server-side remoting handler can use reflection based on those.

The remoting handler must use the current application's WebSharper metadata to deserialization before instantiating any parameter object, so there is no extra security concern of tampered requests instantiating objects that are only intended for client-side use and could have harmful side effects.

Jand42 avatar Mar 05 '19 10:03 Jand42