1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
=== tests/cases/compiler/declFileTypeAnnotationBuiltInType.ts ===
// string
function foo(): string {
>foo : Symbol(foo, Decl(declFileTypeAnnotationBuiltInType.ts, 0, 0))
return "";
}
function foo2() {
>foo2 : Symbol(foo2, Decl(declFileTypeAnnotationBuiltInType.ts, 3, 1))
return "";
}
// number
function foo3(): number {
>foo3 : Symbol(foo3, Decl(declFileTypeAnnotationBuiltInType.ts, 6, 1))
return 10;
}
function foo4() {
>foo4 : Symbol(foo4, Decl(declFileTypeAnnotationBuiltInType.ts, 11, 1))
return 10;
}
// boolean
function foo5(): boolean {
>foo5 : Symbol(foo5, Decl(declFileTypeAnnotationBuiltInType.ts, 14, 1))
return true;
}
function foo6() {
>foo6 : Symbol(foo6, Decl(declFileTypeAnnotationBuiltInType.ts, 19, 1))
return false;
}
// void
function foo7(): void {
>foo7 : Symbol(foo7, Decl(declFileTypeAnnotationBuiltInType.ts, 22, 1))
return;
}
function foo8() {
>foo8 : Symbol(foo8, Decl(declFileTypeAnnotationBuiltInType.ts, 27, 1))
return;
}
// any
function foo9(): any {
>foo9 : Symbol(foo9, Decl(declFileTypeAnnotationBuiltInType.ts, 30, 1))
return undefined;
>undefined : Symbol(undefined)
}
function foo10() {
>foo10 : Symbol(foo10, Decl(declFileTypeAnnotationBuiltInType.ts, 35, 1))
return undefined;
>undefined : Symbol(undefined)
}
|