32 lines
740 B
Plaintext
32 lines
740 B
Plaintext
=== tests/cases/compiler/functionReturn.ts ===
|
|
|
|
function f0(): void { }
|
|
>f0 : Symbol(f0, Decl(functionReturn.ts, 0, 0))
|
|
|
|
function f1() {
|
|
>f1 : Symbol(f1, Decl(functionReturn.ts, 1, 23))
|
|
|
|
var n: any = f0();
|
|
>n : Symbol(n, Decl(functionReturn.ts, 3, 7))
|
|
>f0 : Symbol(f0, Decl(functionReturn.ts, 0, 0))
|
|
}
|
|
function f2(): any { }
|
|
>f2 : Symbol(f2, Decl(functionReturn.ts, 4, 1))
|
|
|
|
function f3(): string { return; }
|
|
>f3 : Symbol(f3, Decl(functionReturn.ts, 5, 22))
|
|
|
|
function f4(): string {
|
|
>f4 : Symbol(f4, Decl(functionReturn.ts, 6, 33))
|
|
|
|
return '';
|
|
return;
|
|
}
|
|
function f5(): string {
|
|
>f5 : Symbol(f5, Decl(functionReturn.ts, 10, 1))
|
|
|
|
return '';
|
|
return undefined;
|
|
>undefined : Symbol(undefined)
|
|
}
|