15 lines
349 B
TypeScript
15 lines
349 B
TypeScript
//// [asyncFunctionDeclaration13_es6.ts]
|
|
async function foo(): Promise<void> {
|
|
// Legal to use 'await' in a type context.
|
|
var v: await;
|
|
}
|
|
|
|
|
|
//// [asyncFunctionDeclaration13_es6.js]
|
|
function foo() {
|
|
return __awaiter(this, void 0, Promise, function* () {
|
|
// Legal to use 'await' in a type context.
|
|
var v;
|
|
});
|
|
}
|