32 lines
491 B
Plaintext
32 lines
491 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 '';
|
||
|
return;
|
||
|
}
|
||
|
function f5(): string {
|
||
|
>f5 : () => string
|
||
|
|
||
|
return '';
|
||
|
return undefined;
|
||
|
>undefined : undefined
|
||
|
}
|