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
As of version 0.655, type functions can be named "typeof", which appears to be an oversight as type aliases can't be named typeof and cause a syntax error when attempting to do so. The resulting type function can't be used in a type alias (unless imported from a module).
--!stricttypefunctiontypeof(t) --no errorreturntendlocal_:typeof<number> =1--invalid, parsed as typeof type
The text was updated successfully, but these errors were encountered:
some of the text in the original post resulted from confusion with typeof(t) not returning 'type' as described in the type function rfc and causing me to think that it couldn't be called from another type function, i'll leave it up in case it isn't actually intended
As of version 0.655, type functions can be named "typeof", which appears to be an oversight as type aliases can't be named typeof and cause a syntax error when attempting to do so. The resulting type function can't be used in a type alias (unless imported from a module).
The text was updated successfully, but these errors were encountered: