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
constval=<Valueextendsnumber>(value: Value)=>({name: 'number', value })asNumber<Value>constval=<Valueextendsnumber>(value: Value): Number<Value>=>({name: 'number', value })
The text was updated successfully, but these errors were encountered:
Problem
How to generalize this?
Currently this is not possible:
This is not possible in TypeScript because
type
is evaluated onsite.And also there is no syntax for this. Something like
but can't find a good syntax in usage:
The text was updated successfully, but these errors were encountered: