TypeScript/tests/baselines/reference/functionReturn.types
2015-04-15 16:44:20 -07:00

36 lines
523 B
Plaintext

=== tests/cases/compiler/functionReturn.ts ===
function f0(): void { }
>f0 : () => void
function f1() {
>f1 : () => void
var n: any = f0();
>n : any
>f0() : void
>f0 : () => void
}
function f2(): any { }
>f2 : () => any
function f3(): string { return; }
>f3 : () => string
function f4(): string {
>f4 : () => string
return '';
>'' : string
return;
}
function f5(): string {
>f5 : () => string
return '';
>'' : string
return undefined;
>undefined : undefined
}