You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, the result type to the unmarshall() is staticly defined. With the new features(recursive conditional type, variadic type type) to be avalable in TypeScript v4.1, we can achieve more fine-grained type according to the users input.
Describe the solution you'd like
Essentially, with the new features in TS 4.1, we can convert the input types in TS types, and even provide informative error messages at compile time. Here's the type example in playground: link.
The type is not fully tested yet but it should give the idea.