TypeScript/tests/cases/compiler/jsFileCompilationAwaitModifier.ts
Alexander T baff821594
fix(36989): 'async' modifier cannot be used in an ambient context.ts (#37010)
* fix(36989): omit 'async' modifier for methods in declaration files.

* remove useless condition
2020-02-27 00:11:29 -08:00

15 lines
240 B
TypeScript

// @declaration: true
// @allowJs: true
// @outDir: ./out
// @lib: es2015
// @filename: a.js
class Foo {
async a() {
await Promise.resolve(1);
}
b = async () => {
await Promise.resolve(1);
}
}