@@ -57,49 +57,57 @@ export function fooWithSingleOverload(a: any) {
57
57
>a : Symbol(a, Decl(declFileFunctions_0.ts, 21, 38))
58
58
}
59
59
60
+ export function fooWithTypePredicate(a: any): a is number {
61
+ >fooWithTypePredicate : Symbol(fooWithTypePredicate, Decl(declFileFunctions_0.ts, 23, 1))
62
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 25, 37))
63
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 25, 37))
64
+
65
+ return true;
66
+ }
67
+
60
68
/** This comment should appear for nonExportedFoo*/
61
69
function nonExportedFoo() {
62
- >nonExportedFoo : Symbol(nonExportedFoo, Decl(declFileFunctions_0.ts, 23 , 1))
70
+ >nonExportedFoo : Symbol(nonExportedFoo, Decl(declFileFunctions_0.ts, 27 , 1))
63
71
}
64
72
/** This is comment for function signature*/
65
73
function nonExportedFooWithParameters(/** this is comment about a*/a: string,
66
- >nonExportedFooWithParameters : Symbol(nonExportedFooWithParameters, Decl(declFileFunctions_0.ts, 27 , 1))
67
- >a : Symbol(a, Decl(declFileFunctions_0.ts, 29 , 38))
74
+ >nonExportedFooWithParameters : Symbol(nonExportedFooWithParameters, Decl(declFileFunctions_0.ts, 31 , 1))
75
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 33 , 38))
68
76
69
77
/** this is comment for b*/
70
78
b: number) {
71
- >b : Symbol(b, Decl(declFileFunctions_0.ts, 29 , 77))
79
+ >b : Symbol(b, Decl(declFileFunctions_0.ts, 33 , 77))
72
80
73
81
var d = a;
74
- >d : Symbol(d, Decl(declFileFunctions_0.ts, 32 , 7))
75
- >a : Symbol(a, Decl(declFileFunctions_0.ts, 29 , 38))
82
+ >d : Symbol(d, Decl(declFileFunctions_0.ts, 36 , 7))
83
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 33 , 38))
76
84
}
77
85
function nonExportedFooWithRestParameters(a: string, ...rests: string[]) {
78
- >nonExportedFooWithRestParameters : Symbol(nonExportedFooWithRestParameters, Decl(declFileFunctions_0.ts, 33 , 1))
79
- >a : Symbol(a, Decl(declFileFunctions_0.ts, 34 , 42))
80
- >rests : Symbol(rests, Decl(declFileFunctions_0.ts, 34 , 52))
86
+ >nonExportedFooWithRestParameters : Symbol(nonExportedFooWithRestParameters, Decl(declFileFunctions_0.ts, 37 , 1))
87
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 38 , 42))
88
+ >rests : Symbol(rests, Decl(declFileFunctions_0.ts, 38 , 52))
81
89
82
90
return a + rests.join("");
83
- >a : Symbol(a, Decl(declFileFunctions_0.ts, 34 , 42))
91
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 38 , 42))
84
92
>rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31))
85
- >rests : Symbol(rests, Decl(declFileFunctions_0.ts, 34 , 52))
93
+ >rests : Symbol(rests, Decl(declFileFunctions_0.ts, 38 , 52))
86
94
>join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31))
87
95
}
88
96
89
97
function nonExportedFooWithOverloads(a: string): string;
90
- >nonExportedFooWithOverloads : Symbol(nonExportedFooWithOverloads, Decl(declFileFunctions_0.ts, 36 , 1), Decl(declFileFunctions_0.ts, 38 , 56), Decl(declFileFunctions_0.ts, 39 , 56))
91
- >a : Symbol(a, Decl(declFileFunctions_0.ts, 38 , 37))
98
+ >nonExportedFooWithOverloads : Symbol(nonExportedFooWithOverloads, Decl(declFileFunctions_0.ts, 40 , 1), Decl(declFileFunctions_0.ts, 42 , 56), Decl(declFileFunctions_0.ts, 43 , 56))
99
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 42 , 37))
92
100
93
101
function nonExportedFooWithOverloads(a: number): number;
94
- >nonExportedFooWithOverloads : Symbol(nonExportedFooWithOverloads, Decl(declFileFunctions_0.ts, 36 , 1), Decl(declFileFunctions_0.ts, 38 , 56), Decl(declFileFunctions_0.ts, 39 , 56))
95
- >a : Symbol(a, Decl(declFileFunctions_0.ts, 39 , 37))
102
+ >nonExportedFooWithOverloads : Symbol(nonExportedFooWithOverloads, Decl(declFileFunctions_0.ts, 40 , 1), Decl(declFileFunctions_0.ts, 42 , 56), Decl(declFileFunctions_0.ts, 43 , 56))
103
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 43 , 37))
96
104
97
105
function nonExportedFooWithOverloads(a: any): any {
98
- >nonExportedFooWithOverloads : Symbol(nonExportedFooWithOverloads, Decl(declFileFunctions_0.ts, 36 , 1), Decl(declFileFunctions_0.ts, 38 , 56), Decl(declFileFunctions_0.ts, 39 , 56))
99
- >a : Symbol(a, Decl(declFileFunctions_0.ts, 40 , 37))
106
+ >nonExportedFooWithOverloads : Symbol(nonExportedFooWithOverloads, Decl(declFileFunctions_0.ts, 40 , 1), Decl(declFileFunctions_0.ts, 42 , 56), Decl(declFileFunctions_0.ts, 43 , 56))
107
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 44 , 37))
100
108
101
109
return a;
102
- >a : Symbol(a, Decl(declFileFunctions_0.ts, 40 , 37))
110
+ >a : Symbol(a, Decl(declFileFunctions_0.ts, 44 , 37))
103
111
}
104
112
105
113
=== tests/cases/compiler/declFileFunctions_1.ts ===
0 commit comments