Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[babel 8] Use an identifier for
TSTypeParameter.name
(#12829)
- Loading branch information
Showing
177 changed files
with
4,546 additions
and
106 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
...s/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow-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 @@ | ||
<div>() => {} |
4 changes: 4 additions & 0 deletions
4
...bel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow-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,4 @@ | ||
{ | ||
"plugins": ["typescript"], | ||
"BABEL_8_BREAKING": false | ||
} |
42 changes: 42 additions & 0 deletions
42
...abel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow-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,42 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"expression": { | ||
"type": "ArrowFunctionExpression", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"id": null, | ||
"generator": false, | ||
"async": false, | ||
"params": [], | ||
"body": { | ||
"type": "BlockStatement", | ||
"start":11,"end":13,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":13}}, | ||
"body": [], | ||
"directives": [] | ||
}, | ||
"typeParameters": { | ||
"type": "TSTypeParameterDeclaration", | ||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}}, | ||
"params": [ | ||
{ | ||
"type": "TSTypeParameter", | ||
"start":1,"end":4,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":4}}, | ||
"name": "div" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow/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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"plugins": ["typescript"] | ||
"plugins": ["typescript"], | ||
"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
1 change: 1 addition & 0 deletions
1
...es/babel-parser/test/fixtures/typescript/arrow-function/async-await-null-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 @@ | ||
async <T>() => await null; |
3 changes: 3 additions & 0 deletions
3
...abel-parser/test/fixtures/typescript/arrow-function/async-await-null-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 | ||
} |
44 changes: 44 additions & 0 deletions
44
...babel-parser/test/fixtures/typescript/arrow-function/async-await-null-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,44 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}}, | ||
"expression": { | ||
"type": "ArrowFunctionExpression", | ||
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}}, | ||
"typeParameters": { | ||
"type": "TSTypeParameterDeclaration", | ||
"start":6,"end":9,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":9}}, | ||
"params": [ | ||
{ | ||
"type": "TSTypeParameter", | ||
"start":7,"end":8,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":8}}, | ||
"name": "T" | ||
} | ||
] | ||
}, | ||
"params": [], | ||
"id": null, | ||
"generator": false, | ||
"async": true, | ||
"body": { | ||
"type": "AwaitExpression", | ||
"start":15,"end":25,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":25}}, | ||
"argument": { | ||
"type": "NullLiteral", | ||
"start":21,"end":25,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":25}} | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/typescript/arrow-function/async-await-null/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
4 changes: 4 additions & 0 deletions
4
...parser/test/fixtures/typescript/arrow-function/async-generic-after-await-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,4 @@ | ||
async () => { | ||
await null; | ||
async <T>() => null; | ||
}; |
3 changes: 3 additions & 0 deletions
3
...er/test/fixtures/typescript/arrow-function/async-generic-after-await-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 | ||
} |
71 changes: 71 additions & 0 deletions
71
...ser/test/fixtures/typescript/arrow-function/async-generic-after-await-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,71 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":53,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":2}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":53,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":2}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":53,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":2}}, | ||
"expression": { | ||
"type": "ArrowFunctionExpression", | ||
"start":0,"end":52,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}}, | ||
"id": null, | ||
"generator": false, | ||
"async": true, | ||
"params": [], | ||
"body": { | ||
"type": "BlockStatement", | ||
"start":12,"end":52,"loc":{"start":{"line":1,"column":12},"end":{"line":4,"column":1}}, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":16,"end":27,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":13}}, | ||
"expression": { | ||
"type": "AwaitExpression", | ||
"start":16,"end":26,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":12}}, | ||
"argument": { | ||
"type": "NullLiteral", | ||
"start":22,"end":26,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":12}} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":30,"end":50,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":22}}, | ||
"expression": { | ||
"type": "ArrowFunctionExpression", | ||
"start":30,"end":49,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":21}}, | ||
"typeParameters": { | ||
"type": "TSTypeParameterDeclaration", | ||
"start":36,"end":39,"loc":{"start":{"line":3,"column":8},"end":{"line":3,"column":11}}, | ||
"params": [ | ||
{ | ||
"type": "TSTypeParameter", | ||
"start":37,"end":38,"loc":{"start":{"line":3,"column":9},"end":{"line":3,"column":10}}, | ||
"name": "T" | ||
} | ||
] | ||
}, | ||
"params": [], | ||
"id": null, | ||
"generator": false, | ||
"async": true, | ||
"body": { | ||
"type": "NullLiteral", | ||
"start":45,"end":49,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":21}} | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...bel-parser/test/fixtures/typescript/arrow-function/async-generic-after-await/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
1 change: 1 addition & 0 deletions
1
...parser/test/fixtures/typescript/arrow-function/async-generic-tokens-true-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 @@ | ||
async <T>(a: T): T => a; |
6 changes: 6 additions & 0 deletions
6
...er/test/fixtures/typescript/arrow-function/async-generic-tokens-true-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,6 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": ["typescript"], | ||
"tokens": true, | ||
"BABEL_8_BREAKING": false | ||
} |
Oops, something went wrong.