Skip to content

Support compile targets between ES5 and ES6 #4389

Closed
@LPGhatguy

Description

@LPGhatguy

As of August, 2015, there are several platforms that have JS implementations falling somewhere between ES5 and ES6. Chrome 45+ has block scoping, fat-arrow functions, Map/WeakMap/Set/WeakSet, and classes. io.js 3.x has all of these features as well except fat-arrow functions, but they're coming in Node.js 4.0 or so next month.

The big common case here is that none of these platforms support ES6 modules yet -- I imagine none of them will for some time.

Can we get a compiler mode to emit ES6 features selectively, or at least emit ES6 except for modules? @mhegazy mentioned in the TypeScript gitter that this would be effectively supporting --t es6 alongside --m commonjs in terms of compiler flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions