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
This is error prone because the passed calls can change (the label or returned type does not match anymore), so the library should be able to infer the Value type from the calls labels and functions return type.
Inferring the labels should be straightforward with some TypeScript magic. Inferring the labels' types also requires some TypeScript magic but should be doable.
An alternative solution could be to wrap the calls generators in some glue that defines its types, so everything about a call would be defined where the call is defined and then the function using it would pick up those definitions.
The text was updated successfully, but these errors were encountered:
As of right now the returned type needs to be typed manually like:
This is error prone because the passed calls can change (the label or returned type does not match anymore), so the library should be able to infer the
Value
type from the calls labels and functions return type.Inferring the labels should be straightforward with some TypeScript magic. Inferring the labels' types also requires some TypeScript magic but should be doable.
An alternative solution could be to wrap the calls generators in some glue that defines its types, so everything about a call would be defined where the call is defined and then the function using it would pick up those definitions.
The text was updated successfully, but these errors were encountered: