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
Support primitive type "int" #37
Comments
es5 assignment ~= |
"int" is not an ES6 type, right ? |
not in the language itself, but it can sometimes be useful to force the VM to treat a value as an integer |
What I meant is that "int" is not currently supported by traceur. Does the original issue imply adding "int" support to traceur also ? |
What exactly would traceur do to "support But under the hood of the VM it's a bit more complicated, so we may see advantages (sort of a microoptimization) if we say that declaring a type as an |
it's hard to say whether this would hurt more than it would help or not, but it could be interesting if we want to have typenames |
Section 6.1 right below your link:
I think that Traceur could complain when the "assertTypes" option is enabled "x:int" would be interpreted as x is an instance of the class int. |
I mean there's no class, and implementing a class would probably be problematic/not that helpful. Asserting that a type is an int in traceur would probably look more like |
We should support int as number. We can assert that it is |
fixed |
@vicb With which commit? |
The current solution is only a workaround and should be moved into |
Yes, we should put this into |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
"int" in ES6 code should translate to "int" in Dart code. For ES5 code, this could be number.
The text was updated successfully, but these errors were encountered: