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)
- developer preview features HOT 2
- toSignal causes the signal to not being lazy-evaluated HOT 6
- API for ngModule bootstrap for SSR? - `platformServer.bootstrapModule` vs `bootstrapApplication` of `@angular/platform-server`? HOT 2
- Renderer2 method that allows you to set signal inputs HOT 5
- Angular attributes produce HTML validation errors HOT 3
- Angular 15 - router.events are empty with nested router outlets on page refresh HOT 1
- The CSP nonce remains in the DOM after being read by Angular HOT 1
- API Reference search on angular.dev HOT 3
- Improve the angular.dev dark mode HOT 1
- Use hadError instead of errors
- docs: @defer requires the parent component also be standalone
- BrowserViewportScroller not honoring native scroll margin HOT 4
- Unit Testing guide has incorrect code HOT 1
- Angular compiler seemingly false negative warning : optional chaining refused on array item HOT 3
- ActivatedRoute in Directive: Snapshot.params are not getting updated HOT 2
- APP_INITIALIZER with HttpClient provoke memory leak in SSR projects HOT 8
- New Angular Docs website is not PWA compatible
- @for can't be used for forms where $index based calls on removeAt() are necessary HOT 1
- Recording already in progress issue in Profiler
- SSR won't render [style.background-image] with base64 URL values
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.