Skip to content

Parameters with default value should be allowed anywhere #3604

@jrieken

Description

@jrieken

Have code like this

function foo(one = 1, two, three) {

}

which is valid ES6 syntax (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-functions-and-classes). TypeScript flags such a signature as error because it treats default values like optional parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptES6Relates to the ES6 Spec

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions