forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow BindingPattern in BindingRestElement
Part of microsoft#6275
- Loading branch information
Showing
3 changed files
with
1 addition
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
tests/baselines/reference/restElementWithBindingPattern.errors.txt
This file was deleted.
Oops, something went wrong.
5 changes: 1 addition & 4 deletions
5
tests/baselines/reference/restElementWithBindingPattern2.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
tests/cases/conformance/es6/destructuring/restElementWithBindingPattern2.ts(1,9): error TS2501: A rest element cannot contain a binding pattern. | ||
tests/cases/conformance/es6/destructuring/restElementWithBindingPattern2.ts(1,16): error TS2459: Type 'number[]' has no property 'b' and no string index signature. | ||
|
||
|
||
==== tests/cases/conformance/es6/destructuring/restElementWithBindingPattern2.ts (2 errors) ==== | ||
==== tests/cases/conformance/es6/destructuring/restElementWithBindingPattern2.ts (1 errors) ==== | ||
var [...{0: a, b }] = [0, 1]; | ||
~~~~~~~~~~ | ||
!!! error TS2501: A rest element cannot contain a binding pattern. | ||
~ | ||
!!! error TS2459: Type 'number[]' has no property 'b' and no string index signature. |