Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flow - allow type parameter defaults in function declarations (#10084)
* flow - allow type parameter defaults in function declarations * fix flow test * add intern_comments option * fix flow parser test * remove allowdefault from flowParseTypeParameterDeclaration * rename test cases
- Loading branch information
1 parent
6852bf6
commit fdbbb74
Showing
22 changed files
with
938 additions
and
74 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
3 changes: 0 additions & 3 deletions
3
...ges/babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-1/input.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-1/options.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ges/babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-2/input.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-2/options.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ges/babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-3/input.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-3/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ges/babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-4/input.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-4/options.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ges/babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-5/input.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...babel-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-5/options.json
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...rser/test/fixtures/flow/type-parameter-declaration/default-invalid-class-extends/input.js
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 @@ | ||
class A extends B<T = number> {} |
3 changes: 3 additions & 0 deletions
3
.../test/fixtures/flow/type-parameter-declaration/default-invalid-class-extends/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 @@ | ||
{ | ||
"throws": "Unexpected token, expected \",\" (1:20)" | ||
} |
1 change: 1 addition & 0 deletions
1
...arser/test/fixtures/flow/type-parameter-declaration/default-invalid-declare-func/input.js
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 @@ | ||
declare function foo<T = string>() {} |
3 changes: 3 additions & 0 deletions
3
...r/test/fixtures/flow/type-parameter-declaration/default-invalid-declare-func/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 @@ | ||
{ | ||
"throws": "Unexpected token, expected \":\" (1:35)" | ||
} |
1 change: 1 addition & 0 deletions
1
...el-parser/test/fixtures/flow/type-parameter-declaration/default-invalid-var-type/input.js
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 @@ | ||
var x: Array<T = number> |
3 changes: 3 additions & 0 deletions
3
...arser/test/fixtures/flow/type-parameter-declaration/default-invalid-var-type/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 @@ | ||
{ | ||
"throws": "Unexpected token, expected \",\" (1:15)" | ||
} |
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
Oops, something went wrong.