-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a core types Type (result of typeof) #61427
Comments
This would fall under: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types |
It might be worth pointing out that any userland definition won't be forwards compatible if a new primitive ever gets added to the language. 😶🌫️ |
How so? Isn't the workaround in the OP forward compatible? It's also highly unlikely new primitives will be added to the language any time soon anyway (note that the records and tuples proposal isn't suggesting to add new primitive types anymore). |
That workaround requires runtime code (
Yup 😅 similarly Decimals aren't going to be a new primitive, although some people are arguing that non-primitive Decimals aren't as useful as primitive one. |
This issue has been marked as "Declined" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
⚙ Compilation target
es2015
⚙ Library
none
Missing / Incorrect Definition
I could not find a type that provides the result of typeof. The workaround is
Sample Code
Documentation Link
No response
The text was updated successfully, but these errors were encountered: