In other words, is all ES6 syntax covered by TypeScript?
How is my question differente from:
TypeScript is the ES6 version of JavaScript with some additional features.
TypeScript is a programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and adds optional static typing to the language. It is designed for the development of large applications and transpiles to JavaScript.
TypeScript is a free and open-source programming language. It is developed and maintained by Microsoft. ES6 is a version of ECMAScript (ES), which is a scripting language specification standardized by ECMA international.
Typescript is a compiler that creates ecmascript. The Typescript source is code that has support for types, interfaces, super/subclasses and whatever you know from other programming languages. As mentioned, the result is ecmascript, that runs in any browser.
Based on the current language specification available at the website:
TypeScript is a syntactic sugar for JavaScript. TypeScript syntax is a superset of Ecmascript 5 (ES5) syntax.
And:
TypeScript syntax includes several proposed features of Ecmascript 6 (ES6), including classes and modules.
TypeScript 1.5 (February 2015) was the last version not to claim to be a superset of ES6:
TypeScript syntax is a superset of Ecmascript 5 (ES5) syntax.
As of TypeScript 1.6 (August 2015):
TypeScript syntax is a superset of ECMAScript 6 (ES6) syntax.
The wording was changed in TypeScript 1.8 (January 2016), but the meaning is the same:
TypeScript syntax is a superset of ECMAScript 2015 (ES2015) syntax.
So, yes: According to the spec, TypeScript is a superset of ES6.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With