Without this TyFON-servers cannot handle webhooks from third-party services without using a custom server (which is not as convenient).
Cons
If function f() expects specific data in request context on the server-side, then calling it on the client-side should be injecting that specific data in the expected format. With proper pairing of injector (client) and extractor (server) side codes, this will be basically the custom types idea mentioned here.
I believe that not providing direct access to request context on client-side, alongside proper documentation, should keep this safe though.
Why?
Without this TyFON-servers cannot handle webhooks from third-party services without using a custom server (which is not as convenient).
Cons
If function
f()
expects specific data in request context on the server-side, then calling it on the client-side should be injecting that specific data in the expected format. With proper pairing of injector (client) and extractor (server) side codes, this will be basically the custom types idea mentioned here.I believe that not providing direct access to request context on client-side, alongside proper documentation, should keep this safe though.
Implementation Suggestion
via
this
argument: