Files
tsgo/testdata/baselines/reference/submodule/conformance/asyncArrowFunction_allowJs.symbols
2025-02-26 14:53:49 -08:00

41 lines
853 B
Plaintext

//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction_allowJs.ts] ////
=== file.js ===
// Error (good)
/** @type {function(): string} */
const a = () => 0
>a : Symbol(a, Decl(file.js, 2, 5))
// Error (good)
/** @type {function(): string} */
const b = async () => 0
>b : Symbol(b, Decl(file.js, 6, 5))
// No error (bad)
/** @type {function(): string} */
const c = async () => {
>c : Symbol(c, Decl(file.js, 10, 5))
return 0
}
// Error (good)
/** @type {function(): string} */
const d = async () => {
>d : Symbol(d, Decl(file.js, 16, 5))
return ""
}
/** @type {function(function(): string): void} */
const f = (p) => {}
>f : Symbol(f, Decl(file.js, 21, 5))
>p : Symbol(p, Decl(file.js, 21, 11))
// Error (good)
f(async () => {
>f : Symbol(f, Decl(file.js, 21, 5))
return 0
})