swc/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.ts

15 lines
584 B
TypeScript

// @target: es2017
// @noEmitHelpers: true
declare var a: boolean;
declare var p: Promise<boolean>;
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
declare function before(): void;
declare function after(): void;
async function func(): Promise<void> {
before();
var b = (await po).fn(a, a, a);
after();
}