3 ms·
Because freedom? Typescript is a superset of JavaScript, which means all JavaScript is valid typescript. So you're never faced with the difficult choice of lock
by computerex 10y ago
Because freedom? Typescript is a superset of JavaScript, which means all JavaScript is valid typescript. So you're never faced with the difficult choice of locking yourself to one language/platform. JavaScript is awesome, it just doesn't scale to large projects because you cannot efficiently refactor it. Typescript solves this problem beautifully. You can easily add whatever type information you need to effectively work with the codebase, whilst being compatible with all JavaScript libraries and the ecosystem.
- HugoDaniel 10y agoDoes that include ES6 ? What parts of JS do they consider a subset of typescript ? Can i keep my type declarations in a different file than my .js code like flow does ? (thus ensuring compatibility while keeping the functionality of typescript) How far can i go with typescript until i need to use babel ?
- pitaj 10y ago> Does that include ES6 ? Yes. > What parts of JS do they consider a subset of typescript ? Everything that's standardized. > Can i keep my type declarations in a different file than my .js code like flow does ? Yes. > How far can i go with typescript until i need to use babel ? Pretty much as far as you want, although you may have to wait a little bit longer. BTW, stop inserting spaces before your punctuation. It's super aggravating.