4 ms·
The claim "TypeScript is an extension of the JavaScript language that allows users to optionally provide type information" is misleading. Typescript is not an e
by fbn79 6y ago
The claim
"TypeScript is an extension of the JavaScript language that allows users to optionally provide type information" is misleading. Typescript is not an extension of Javascript (not all javascript code is valid TS code). Typescript is a subset of Javascript plus mild type checking. For more details a nice article https://medium.jonasbandi.net/here-is-why-you-might-not-want-to-use-typescript-50ab0d225bdd https://medium.jonasbandi.net/here-is-why-you-might-not-want...
- alain_gilbert 6y agoDo you hav any example of valid javascript that is not valid typescript ?
- fbn79 6y agoFor example accessing static methods differ from vanilla Javascript. See https://stackoverflow.com/questions/33864167/accessing-static-methods-from-instance-in-typescript https://stackoverflow.com/questions/33864167/accessing-stati...
- hombre_fatal 6y agoThis is such a weird point to me, maybe pedantry at best. Typescript is, to 99% of people, just Javascript with types. With few exceptions, TS compiles 1:1 to JS. That blog article just looks like an intro for beginners who don't quite know what static typing entails. Yes, static typing is different from runtime checks, that's why it's static.
- fbn79 6y agoThe devil is in the detail