[TS] Disallow type casts in arrow parameters (#9612)

This commit is contained in:
Nicolò Ribaudo
2019-02-28 23:58:27 +01:00
committed by GitHub
parent d72f3aa758
commit f13f4adcbb
9 changed files with 28 additions and 2 deletions

View File

@@ -0,0 +1 @@
async (a as T) => {};

View File

@@ -0,0 +1,3 @@
{
"throws": "Unexpected type cast in parameter position. (1:7)"
}

View File

@@ -0,0 +1 @@
async (<T> a) => {};

View File

@@ -0,0 +1,3 @@
{
"throws": "Unexpected type cast in parameter position. (1:7)"
}

View File

@@ -0,0 +1 @@
(a as T) => {};

View File

@@ -0,0 +1,3 @@
{
"throws": "Unexpected type cast in parameter position. (1:1)"
}

View File

@@ -0,0 +1 @@
(<T> a) => {};

View File

@@ -0,0 +1,3 @@
{
"throws": "Unexpected type cast in parameter position. (1:1)"
}