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
Currently the type system does not account for the length property in function types. In unions, where the length of the functions vary, it could be used as a discriminated union.
Here is an example that would work under this proposal:
Of course the type system would have to follow the same rules for determining a function's length as specified in the ECMAScript standard and described in this MDN description.
Without this functionality I am not aware of a way, besides using a very specific user-defined type guard, for the type system to distinguish between the function types.
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Currently the type system does not account for the length property in function types. In unions, where the length of the functions vary, it could be used as a discriminated union.
Here is an example that would work under this proposal:
Of course the type system would have to follow the same rules for determining a function's length as specified in the ECMAScript standard and described in this MDN description.
Without this functionality I am not aware of a way, besides using a very specific user-defined type guard, for the type system to distinguish between the function types.
The text was updated successfully, but these errors were encountered: