TypeScript/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.types
Wenlu Wang fafe3ff0b4
Improve parsing in await and yield context (#44680)
* Improve parsing in await and yield context

* Avoid yield and await check in identifier

* Revert "Avoid yield and awaitt check in identifier"

This reverts commit 9644859f29.

* Add some comments
2021-06-21 17:30:55 -07:00

97 lines
1.3 KiB
Plaintext

=== tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts ===
function f_let () {
>f_let : () => void
let await = 1
>await : number
>1 : 1
}
function f1_var () {
>f1_var : () => void
var await = 1
>await : number
>1 : 1
}
function f1_const () {
>f1_const : () => void
const await = 1
>await : 1
>1 : 1
}
async function f2_let () {
>f2_let : () => Promise<void>
let await = 1
>await : number
>1 : 1
}
async function f2_var () {
>f2_var : () => Promise<void>
var await = 1
>await : number
>1 : 1
}
async function f2_const () {
>f2_const : () => Promise<void>
const await = 1
>await : 1
>1 : 1
}
function f3_let () {
>f3_let : () => void
let yield = 2
>yield : number
>2 : 2
}
function f3_var () {
>f3_var : () => void
var yield = 2
>yield : number
>2 : 2
}
function f3_const () {
>f3_const : () => void
const yield = 2
>yield : 2
>2 : 2
}
function * f4_let () {
>f4_let : () => Generator<never, void, unknown>
let yield = 2;
>yield : number
>2 : 2
}
function * f4_var () {
>f4_var : () => Generator<never, void, unknown>
var yield = 2;
>yield : number
>2 : 2
}
function * f4_const () {
>f4_const : () => Generator<never, void, unknown>
const yield = 2;
>yield : 2
>2 : 2
}