31 lines
737 B
Plaintext
31 lines
737 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, 0, 23))
|
|
|
|
var n: any = f0();
|
|
>n : Symbol(n, Decl(functionReturn.ts, 2, 7))
|
|
>f0 : Symbol(f0, Decl(functionReturn.ts, 0, 0))
|
|
}
|
|
function f2(): any { }
|
|
>f2 : Symbol(f2, Decl(functionReturn.ts, 3, 1))
|
|
|
|
function f3(): string { return; }
|
|
>f3 : Symbol(f3, Decl(functionReturn.ts, 4, 22))
|
|
|
|
function f4(): string {
|
|
>f4 : Symbol(f4, Decl(functionReturn.ts, 5, 33))
|
|
|
|
return '';
|
|
return;
|
|
}
|
|
function f5(): string {
|
|
>f5 : Symbol(f5, Decl(functionReturn.ts, 9, 1))
|
|
|
|
return '';
|
|
return undefined;
|
|
>undefined : Symbol(undefined)
|
|
}
|