TypeScript/tests/cases/compiler/noImplicitReturnsWithProtectedBlocks2.ts

15 lines
274 B
TypeScript

// @noImplicitReturns: true
declare function log(s: string): void;
declare function get(): number;
function main1() : number {
try {
return get();
}
catch(e) {
log("in catch");
}
finally {
log("in finally");
}
}