-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…17020) * breaking: rename typeParameters to typeArguments For CallExpression, JSXOpeningElement, NewExpression, OptionalCallExpression and TSInstantiationExpression * update test fixtures * update Babel 7 fixtures * supress Babel 8 typing errors * Update packages/babel-generator/src/generators/expressions.ts Co-authored-by: Nicolò Ribaudo <hello@nicr.dev> --------- Co-authored-by: Nicolò Ribaudo <hello@nicr.dev>
- Loading branch information
1 parent
87a5e2e
commit 3d36199
Showing
169 changed files
with
3,687 additions
and
118 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
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
2 changes: 2 additions & 0 deletions
2
packages/babel-parser/test/fixtures/estree/typescript/optional-chaining-babel-7/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,2 @@ | ||
foo?.foo<T>(); | ||
foo?.foo?.<T>(); |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/estree/typescript/optional-chaining-babel-7/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 @@ | ||
{ | ||
"BABEL_8_BREAKING": false | ||
} |
102 changes: 102 additions & 0 deletions
102
packages/babel-parser/test/fixtures/estree/typescript/optional-chaining-babel-7/output.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,102 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":31,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":16}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":31,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":16}}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":14,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":14}}, | ||
"expression": { | ||
"type": "ChainExpression", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"expression": { | ||
"type": "CallExpression", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"callee": { | ||
"type": "MemberExpression", | ||
"start":0,"end":8,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":8}}, | ||
"object": { | ||
"type": "Identifier", | ||
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3},"identifierName":"foo"}, | ||
"name": "foo" | ||
}, | ||
"computed": false, | ||
"property": { | ||
"type": "Identifier", | ||
"start":5,"end":8,"loc":{"start":{"line":1,"column":5},"end":{"line":1,"column":8},"identifierName":"foo"}, | ||
"name": "foo" | ||
}, | ||
"optional": true | ||
}, | ||
"arguments": [], | ||
"typeParameters": { | ||
"type": "TSTypeParameterInstantiation", | ||
"start":8,"end":11,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":11}}, | ||
"params": [ | ||
{ | ||
"type": "TSTypeReference", | ||
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10}}, | ||
"typeName": { | ||
"type": "Identifier", | ||
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10},"identifierName":"T"}, | ||
"name": "T" | ||
} | ||
} | ||
] | ||
}, | ||
"optional": false | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":15,"end":31,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":16}}, | ||
"expression": { | ||
"type": "ChainExpression", | ||
"start":15,"end":30,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":15}}, | ||
"expression": { | ||
"type": "CallExpression", | ||
"start":15,"end":30,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":15}}, | ||
"callee": { | ||
"type": "MemberExpression", | ||
"start":15,"end":23,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":8}}, | ||
"object": { | ||
"type": "Identifier", | ||
"start":15,"end":18,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":3},"identifierName":"foo"}, | ||
"name": "foo" | ||
}, | ||
"computed": false, | ||
"property": { | ||
"type": "Identifier", | ||
"start":20,"end":23,"loc":{"start":{"line":2,"column":5},"end":{"line":2,"column":8},"identifierName":"foo"}, | ||
"name": "foo" | ||
}, | ||
"optional": true | ||
}, | ||
"arguments": [], | ||
"typeParameters": { | ||
"type": "TSTypeParameterInstantiation", | ||
"start":25,"end":28,"loc":{"start":{"line":2,"column":10},"end":{"line":2,"column":13}}, | ||
"params": [ | ||
{ | ||
"type": "TSTypeReference", | ||
"start":26,"end":27,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":12}}, | ||
"typeName": { | ||
"type": "Identifier", | ||
"start":26,"end":27,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":12},"identifierName":"T"}, | ||
"name": "T" | ||
} | ||
} | ||
] | ||
}, | ||
"optional": true | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/estree/typescript/optional-chaining/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 @@ | ||
{ | ||
"BABEL_8_BREAKING": true | ||
} |
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
2 changes: 2 additions & 0 deletions
2
...ser/test/fixtures/typescript/arrow-function/async-generic-false-positive-babel-7/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,2 @@ | ||
async < 1; | ||
async<T>() == 0; |
3 changes: 3 additions & 0 deletions
3
...test/fixtures/typescript/arrow-function/async-generic-false-positive-babel-7/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 @@ | ||
{ | ||
"BABEL_8_BREAKING": false | ||
} |
Oops, something went wrong.