-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 found an issue in the current nightly builds relating to destructuring assignments with noImplicitAny enabled. The actual code was more complicated, but it can be simplified to the following:
let [a, b, c] = [1, 2, 3];
The variables appear to be typed correctly on hover, however, 3 errors are produced inside the assignment stating that a
, b
, and c
have an implicit type of any.
It can be silenced by the following, but that's not ideal:
let [a, b, c] = <[number, number, number]>[1, 2, 3];
TypeScript Version:
Searching backwards, it first appears in:
- nightly (1.9.0-dev.20160409)
Expected behavior:
There shouldn't be an implicit any error in this case.
Actual behavior:
An erroneous error is produced.
jods4 and danielearwicker
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