Skip to content

Add ScriptTarget.ES6 #595

Closed
Closed
@duncanmak

Description

@duncanmak

There's been multiple issues raised regarding having more ES6 features in Typescript (#7, #13, #19, #232, #237, #240, #389, etc). I'm personally interested in implementing #13.

Would it help to add ES6 to the ScriptTarget enum and begin implementing parser changes to allow the new syntax under the new language level?

Once we allow the new syntax, we can first begin by passing through the code directly (since the generated code is ES6). Later on, we can handle code generation for other targets.

This could also affect existing features in Typescript that have ES6 equivalents - for example, rest parameters in function declarations can be emitted as is in ES6 using the spread operator, without generating the code to splice out arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ES6Relates to the ES6 Spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions