tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{}>'? tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1058: The return type of an async function must either be a valid promise or must not contain a callable 'then' member. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member. ==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (9 errors) ==== declare class Thenable { then(): void; } declare let a: any; declare let obj: { then: string; }; declare let thenable: Thenable; async function fn1() { } // valid: Promise async function fn2(): { } { } // error ~~~ !!! error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{}>'? ~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. async function fn3(): any { } // error ~~~ !!! error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? async function fn4(): number { } // error ~~~~~~ !!! error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? ~~~~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. async function fn5(): PromiseLike { } // error ~~~~~~~~~~~~~~~~~ !!! error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? async function fn6(): Thenable { } // error ~~~~~~~~ !!! error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise async function fn9() { return null; } // valid: Promise async function fn10() { return undefined; } // valid: Promise async function fn11() { return a; } // valid: Promise async function fn12() { return obj; } // valid: Promise<{ then: string; }> async function fn13() { return thenable; } // error ~~~~ !!! error TS1058: The return type of an async function must either be a valid promise or must not contain a callable 'then' member. async function fn14() { await 1; } // valid: Promise async function fn15() { await null; } // valid: Promise async function fn16() { await undefined; } // valid: Promise async function fn17() { await a; } // valid: Promise async function fn18() { await obj; } // valid: Promise async function fn19() { await thenable; } // error ~~~~~~~~~~~~~~ !!! error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.