Comments (15)
es5 assignment ~= expression | 0
to force smi mode?
from angular.
"int" is not an ES6 type, right ?
from angular.
not in the language itself, but it can sometimes be useful to force the VM to treat a value as an integer
from angular.
What I meant is that "int" is not currently supported by traceur. Does the original issue imply adding "int" support to traceur also ?
from angular.
What exactly would traceur do to "support int
"? it doesn't really exist as a concept/type in es6. You have these: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-data-types-and-values
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 int
will ensure that all assignments to it convert it to an SMI representation
from angular.
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
from angular.
Section 6.1 right below your link:
The ECMAScript language types are Undefined, Null, Boolean, String, Symbol, Number, and Object
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.
from angular.
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 assert(typeof x === 'number' && (x % 1) === 0)
--- which is certainly doable (node null % 1
does === 0, which isn't great). But ultimately I'm just not sure this assertion is super helpful in JS-land
from angular.
We should support int as number. We can assert that it is int
by typeof x == number && x === Math.round(x)
We very much need this.
from angular.
fixed
from angular.
@vicb With which commit?
from angular.
Apparently this was fixed in 3482fb1 (PR #49)
from angular.
The current solution is only a workaround and should be moved into rtts-assert
. Also, the transpiler should be changed to automatically refer to assert.int
so we don't need the import for int
.
from angular.
Yes, we should put this into rtts_assert
or Traceur runtime. I will take care of it.
from angular.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
from angular.
Related Issues (20)
- Calling markAllAsTouched() on parent form doesn't mark ControlContainer controls as touched HOT 1
- `yarn devtools:build:chrome` failed HOT 5
- Angular Update Guide lists no 'before' steps but has 'before' steps in update steps HOT 1
- typed provide HOT 1
- Dead link leads to 404 HOT 2
- Unique ID generation for component instances
- Version compatibility not updated / does not include recent versions HOT 3
- ngOnInit(): void breaks shipping.component.ts HOT 2
- Components with a 'required' signalized input can not be dynamically created with createComponent HOT 1
- rxjs-interop: bidirectional interop HOT 2
- [i18n] `ng insert-i18n` (reverse `ng extract-i18n`) HOT 3
- generate @angular/core:control-flow failed HOT 1
- It's impossible to set signal input of hosted directive - hostDirectives HOT 1
- `InjectionToken<T>` is poorly typed HOT 1
- Add further documentation about TestBed.override features HOT 1
- @angular/core:control-flow migration breaks with Greek characters
- Cannot read properties of null (reading 'bindingStartIndex') HOT 2
- Issues with types and inheritances of those when used inside FormGroup HOT 2
- feat(@angular/router): Add navigateToParent method with steps option HOT 1
- this.router.getCurrentNavigation().extras.state used to return undefined for the 1st navigation after reload the page HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.