[TS] Disallow type casts in arrow parameters (#9612)
This commit is contained in:
1
packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
async (a as T) => {};
|
||||
3
packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/options.json
vendored
Normal file
3
packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected type cast in parameter position. (1:7)"
|
||||
}
|
||||
1
packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
async (<T> a) => {};
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected type cast in parameter position. (1:7)"
|
||||
}
|
||||
1
packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(a as T) => {};
|
||||
3
packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/options.json
vendored
Normal file
3
packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected type cast in parameter position. (1:1)"
|
||||
}
|
||||
1
packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(<T> a) => {};
|
||||
3
packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/options.json
vendored
Normal file
3
packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected type cast in parameter position. (1:1)"
|
||||
}
|
||||
Reference in New Issue
Block a user