-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Renaming NumericLiteral to NumberLiteral? #3104
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
Comments
This would be a pretty major change. What are you trying to achieve? |
I'd prefer it stayed |
ES5 specifies this as NumericLiteral. What is NumberSetType supposed to represent? Without knowing, it's not possible to make a good name for it. |
@CyrusNajmabadi See here: I could use your input to 'scan a numeric literal', it's awkward code right now because of scanner compat with JS: |
You'd probably have to search for a numeric literal, a I'll reiterate my word of caution - if you're intent on presenting a proof of concept, then that's great - we love to see when people can do cool stuff with the compiler. Experimenting is a great way for both you and us to learn. We can help answer questions about the internals and give you some guidance, but we can't make any guarantees over whether we're willing to put something like this into the language without further discussion. |
Yeah, i'm with Dan on this. The lexical ambituities are going to be a bit obnoxious to have to deal with. Note that you'd actually have to write I'd recommend some other piece of syntax (tbh, i'm not sure why |
There's currently a NumericLiteral:
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/types.ts#L23
And a numberIndex:
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/types.ts#L1507
I'm trying to add:
Should this be called a NumericSetType?
My preference would be to rename NumericLiteral to NumberLiteral, and keeping NumericLiteral as backwards compat. Is that too much of a big change?
The text was updated successfully, but these errors were encountered: