Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "Fix: check if param is assignable when parsing arrow return t…
…ype annotation" (#12183) * Reland "Fix: check if param is assignable when parsing arrow return type annotation" This reverts commit 91a7a64. * Mark `RestElement` as assignable
- Loading branch information
1 parent
6cb0056
commit 84987a0
Showing
11 changed files
with
474 additions
and
47 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
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
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
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
1 change: 1 addition & 0 deletions
1
...script/arrow-function/ambiguous-ternary-arrow-return-type-typescript-issue-16241/input.ts
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
0 ? v => (v) : v => 0; |
7 changes: 7 additions & 0 deletions
7
...pt/arrow-function/ambiguous-ternary-arrow-return-type-typescript-issue-16241/options.json
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": [ | ||
"typescript" | ||
], | ||
"throws": "Unexpected token, expected \":\" (1:21)" | ||
} |
4 changes: 4 additions & 0 deletions
4
...abel-parser/test/fixtures/typescript/arrow-function/return-type-like-conditional/input.ts
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
0 ? v => (sum += v) : v => 0; | ||
0 ? v => (sum(v)) : v => 0; | ||
0 ? v => (v.w) : v => 0; | ||
0 ? v => ([ v.w ]) : v => {}; |
3 changes: 3 additions & 0 deletions
3
...-parser/test/fixtures/typescript/arrow-function/return-type-like-conditional/options.json
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["typescript"] | ||
} |
Oops, something went wrong.