mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Allow async as parameter in arrowfunction (#8488)
* Allow async as a parameter name in simple arrow function * Add tests
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
//// [arrowFunctionWithParameterNameAsync.ts]
|
||||
|
||||
const x = async => async;
|
||||
|
||||
//// [arrowFunctionWithParameterNameAsync.js]
|
||||
var x = function (async) { return async; };
|
||||
@@ -0,0 +1,7 @@
|
||||
=== tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync.ts ===
|
||||
|
||||
const x = async => async;
|
||||
>x : Symbol(x, Decl(arrowFunctionWithParameterNameAsync.ts, 1, 5))
|
||||
>async : Symbol(async, Decl(arrowFunctionWithParameterNameAsync.ts, 1, 9))
|
||||
>async : Symbol(async, Decl(arrowFunctionWithParameterNameAsync.ts, 1, 9))
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
=== tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync.ts ===
|
||||
|
||||
const x = async => async;
|
||||
>x : (async: any) => any
|
||||
>async => async : (async: any) => any
|
||||
>async : any
|
||||
>async : any
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// @target: ES5
|
||||
// @noEmitHelpers: true
|
||||
|
||||
const x = async => async;
|
||||
Reference in New Issue
Block a user