TypeScript/tests/cases/compiler/noImplicitReturnsInAsync1.ts

9 lines
227 B
TypeScript

// @target: es6
// @noImplicitReturns: true
async function test(isError: boolean = false) {
if (isError === true) {
return;
}
let x = await Promise.resolve("The test is passed without an error.");
}