Search code examples
javascriptecmascript-6static-typingecmascript-2016

Is there support for static typing in ECMAScript 6 or 7?


Is there any support for static typing in ECMAScript 6? How about ECMAScript 7?


Solution

  • No.

    But on the ECMA-Script Wikipage there is a paragraph about changes in ECMA-Script 7:

    The Seventh Edition is in a very early stage of development, but is intended to continue the themes of language reform, code isolation, control of effects and library/tool enabling from ES6. New features proposed include promises/concurrency, number and math enhancements, guards and trademarks (an alternative to static typing), operator overloading, value types (first-class number-like objects), new record structures (records, tuples and typed arrays), pattern matching, and traits.

    Which may interest you.