1
+ let x /**/ : number /**/ = 1 ! ;
2
+ // ^^^^^^^^ ^
3
+
4
+ [ ] as [ ] satisfies [ ] ;
5
+ // ^^^^^^^^^^^^^^^^^^
6
+
7
+ ( < string > "test" ) ;
8
+ //^^^^^^^^
9
+
10
+ class C /**/ < T > /*︎*/ extends Array /**/ < T > /*︎*/ implements I , J /*︎*/ {
11
+ // ^^^^^ ^^^ ^^^^^^^^^^^^^^
12
+ readonly field /**/ : string /**/ = "" ;
13
+ // ^^^^^^^^ ^^^^^^^^
14
+ static accessor f1 ;
15
+ private f2 /**/ ! /**/ : string /*︎*/ ;
16
+ // ^^^^^^^ ^ ^^^^^^^^
17
+ declare f3 : any ;
18
+ // ^^^^^^^^^^^^^^^^ declared property
19
+
20
+ public method /**/ < T > /*︎*/ ( /*︎*/ this : T , /**/ a ? /*︎*/ : string/**/ ) / * ︎ * / : v o i d / * ︎ * / {
21
+ // ^^^^^^ ^^^ ^^^^^^^^ ^ ^^^^^^^^ ^^^^^^
22
+ }
23
+
24
+ [ key : string] : any;
25
+ // ^^^^^^^^^^^^^^^^^^^ index signature
26
+
27
+ get g ( ) : any { return 1 } ;
28
+ // ^^^^^
29
+ set g ( v : any ) { } ;
30
+ // ^^^^^
31
+ }
32
+
33
+ class D extends C < any > {
34
+ // ^^^^^
35
+ override method ( ...args ) : any { }
36
+ // ^^^^^^^^ ^^^^^
37
+ }
38
+
39
+ abstract class A {
40
+ // ^^^^^^^^
41
+ abstract a ;
42
+ // ^^^^^^^^^^^ abstract property
43
+ b ;
44
+ abstract method ( ) ;
45
+ // ^^^^^^^^^^^^^^^^^^ abstract method
46
+ }
47
+
48
+ {
49
+ let m = new ( Map ! ) < string , number > ( [ ] ! ) ;
50
+ // ^ ^^^^^^^^^^^^^^^^ ^
51
+ }
52
+
53
+ {
54
+ let a = ( foo ! ) < any > ;
55
+ // ^ ^^^^^
56
+ }
57
+
58
+ {
59
+ let a = ( foo ! ) < any > ( [ ] ! ) ;
60
+ // ^ ^^^^^ ^
61
+ }
62
+
63
+ {
64
+ let f = function ( p : any ) { }
65
+ // ^^^^^
66
+ }
67
+
68
+ {
69
+ function overload ( ) : number ;
70
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overload
71
+ function overload ( ) : any { }
72
+ // ^^^^^
73
+ }
74
+
75
+ /** @doc */
76
+ interface I { }
77
+ // ^^^^^^^^^^^ interface
78
+
79
+ void 0 ;
80
+
81
+ /** @doc */
82
+ type J = I ;
83
+ // ^^^^^^^^ type alias
84
+
85
+ /**/ import type T from "node:assert" ;
86
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `import type`
87
+
88
+ /**/ export type { I } ;
89
+ // ^^^^^^^^^^^^^^^^^^ `export type`
90
+
91
+ /**/ export type * from "node:buffer" ;
92
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `export type *`
93
+
94
+ import { type AssertPredicate /**/ , deepEqual } from "node:assert" ;
95
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^
96
+
97
+ export {
98
+ C ,
99
+ type T ,
100
+ // ^^^^^^
101
+ }
102
+
103
+ /**/ export type T2 = 1 ;
104
+ // ^^^^^^^^^^^^^^^^^^^
105
+
106
+ function foo < T > ( p : any = ( ) : any => 1 ) : any {
107
+ // ^^^ ^^^^^ ^^^^^ ^^^^^
108
+ return p as any ;
109
+ // ^^^^^^
110
+ }
111
+
112
+ /**/ declare enum E1 { }
113
+ // ^^^^^^^^^^^^^^^^^^ `declare enum`
114
+
115
+ void 0 ;
116
+
117
+ /**/ declare namespace N { }
118
+ // ^^^^^^^^^^^^^^^^^^^^^^ `declare namespace`
119
+
120
+ void 0 ;
121
+
122
+ /**/ declare module M { }
123
+ // ^^^^^^^^^^^^^^^^^^^ `declare module`
124
+
125
+ void 0 ;
126
+
127
+ /**/ declare let a ;
128
+ // ^^^^^^^^^^^^^^ `declare let`
129
+
130
+ void 0 ;
131
+
132
+ /**/ declare class DeclaredClass { }
133
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `declare class`
134
+
135
+ void 0 ;
136
+
137
+ /**/ declare function DeclaredFunction ( ) : void ;
138
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `declare function`
139
+
140
+ void 0 ;
141
+
142
+ // `=>` spanning line cases:
143
+ {
144
+ ( )
145
+ : any =>
146
+ 1
147
+ } ;
148
+ {
149
+ ( ) :
150
+ any =>
151
+ 1
152
+ } ;
153
+ {
154
+ (
155
+ )
156
+ : any =>
157
+ 1
158
+ } ;
159
+ {
160
+ (
161
+ ) : (
162
+ | any
163
+ ) =>
164
+ 1
165
+ } ;
166
+ {
167
+ (
168
+ ) :
169
+ NonNullable < any
170
+ > =>
171
+ 1
172
+ } ;
173
+ {
174
+ ( a , b , c : D = [ ] as any /*comment-1*/ ) /*comment-2*/ :
175
+ any =>
176
+ 1
177
+ } ;
178
+
179
+
180
+ ( ) :
181
+ any =>
182
+ 1 ;
183
+
184
+ {
185
+ ( a , b , c : D = [ ] as any /*comment-1*/ ) /*comment-2*/ :
186
+ /*comment-3*/ any /*comment-4*/ =>
187
+ 1
188
+ } ;
189
+
190
+ type 任意の型 = any ;
191
+
192
+ ( ) :
193
+ 任意の型 =>
194
+ 1 ;
195
+
196
+ ( ) /*comment-1*/ :/*comment-2*/
197
+ /*comment-3*/ 任意の型 /*comment-4*/ =>
198
+ 1 ;
0 commit comments