-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
I believe that the following two variable declarations are consistent with the specifications (3.9.2.2). They define two functions of a single parameter, which is a list of three things. Notice that a binding pattern is used for destructuring this list.
var y: ([a, b, c]) => any;
var z: ([a, b, c] : number[]) => any;Both declarations are disallowed by the implementation. The error messages suggest that [a, b, c] is immediately assumed to be a (parenthesized) tuple type, as would be the case in:
interface a {};
interface b {};
interface c {};
var x: ([a, b, c]);Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue