Skip to content

Commit 6caf848

Browse files
committed
[JavaScript] add more symbol tests
1 parent 20707dd commit 6caf848

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

JavaScript/tests/syntax_test_typescript_declarations.d.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
// ^^ storage.modifier
77
// ^^^^^^^^^ keyword.declaration
88
// ^ entity.name.namespace
9+
// @ definition
910
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
1011

1112
export const x: any;
1213
// ^^^^^^^^^^^^^^^^^^^^ meta.export
1314
// ^^^^^^ keyword.control.import-export
1415
// ^^^^^ keyword.declaration
1516
// ^ meta.binding.name variable.other.readwrite
17+
// @ global-definition
1618
// ^ punctuation.separator.type
1719
// ^^^ meta.type support.type.any
1820
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
@@ -22,6 +24,7 @@
2224
// ^^^^^^ keyword.control.import-export
2325
// ^^^ keyword.declaration
2426
// ^ meta.binding.name variable.other.readwrite
27+
// @ global-definition
2528
// ^ punctuation.separator.type
2629
// ^^^ meta.type support.type.any
2730
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
@@ -31,6 +34,7 @@
3134
// ^^^^^^ keyword.control.import-export
3235
// ^^^ keyword.declaration
3336
// ^ meta.binding.name variable.other.readwrite
37+
// @ global-definition
3438
// ^ punctuation.separator.type
3539
// ^^^ meta.type support.type.any
3640
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
@@ -41,6 +45,7 @@
4145
// ^^^^^^^^^^^^^^^^^^^^^^^ meta.function
4246
// ^^^^^^^^ keyword.declaration.function
4347
// ^ entity.name.function
48+
// @ definition
4449
// ^^^^^^^^ meta.function.parameters
4550
// ^ punctuation.section.group.begin
4651
// ^ meta.binding.name variable.parameter.function
@@ -57,8 +62,9 @@
5762
// ^^^^^^^^^ meta.class
5863
// ^^^^^ keyword.declaration.class
5964
// ^ entity.name.class
65+
// @ definition
6066
// ^ meta.block punctuation.section.block.begin
61-
67+
6268
x: any;
6369
// ^ variable.other.readwrite
6470
// ^ punctuation.separator.type
@@ -69,6 +75,7 @@
6975
f(x: any): any;
7076
// ^^^^^^^^^^^^^^ meta.function
7177
// ^ entity.name.function
78+
// @ definition
7279
// ^^^^^^^^ meta.function.parameters
7380
// ^ punctuation.section.group.begin
7481
// ^ meta.binding.name
@@ -90,6 +97,7 @@
9097
// ^^^^^^^^^^^^^^ meta.interface
9198
// ^^^^^^^^^ keyword.declaration
9299
// ^ entity.name.interface
100+
// @ definition
93101
// ^^ meta.block
94102
// ^ punctuation.section.block.begin
95103
// ^ punctuation.section.block.end
@@ -101,12 +109,14 @@
101109
// ^^^^^^^^^^^^^ meta.namespace
102110
// ^^^^^^^^^ keyword.declaration
103111
// ^ entity.name.namespace
112+
// @ definition
104113
// ^ meta.block punctuation.section.block.begin
105114

106115
const x: any;
107116
// ^^^^^ keyword.declaration
108117
// ^ meta.binding.name
109118
// ^ variable.other.readwrite
119+
// @ global-definition
110120
// ^ punctuation.separator.type
111121
// ^^^^ meta.type
112122
// ^^^ support.type.any
@@ -147,6 +157,7 @@
147157
// ^^^^^^^^^^^^^^^^^^^^^^^ meta.function
148158
// ^^^^^^^^ keyword.declaration.function
149159
// ^ entity.name.function
160+
// @ definition
150161
// ^^^^^^^^ meta.function.parameters
151162
// ^ punctuation.section.group.begin
152163
// ^ meta.binding.name variable.parameter.function
@@ -164,6 +175,7 @@
164175
// ^^^^^^^^^^ meta.class
165176
// ^^^^^ keyword.declaration.class
166177
// ^ entity.name.class
178+
// @ definition
167179
// ^^ meta.block
168180
// ^ punctuation.section.block.begin
169181
// ^ punctuation.section.block.end
@@ -173,6 +185,7 @@
173185
// ^^^^^^^^^^^^^^ meta.namespace
174186
// ^^^^^^^^^ keyword.declaration
175187
// ^ entity.name.namespace
188+
// @ definition
176189
// ^^ meta.block
177190
// ^ punctuation.section.block.begin
178191
// ^ punctuation.section.block.end
@@ -182,13 +195,15 @@
182195
// ^^^^^^^^^^^^^^^^ meta.module
183196
// ^^^^^^ keyword.declaration.module
184197
// ^^^^^^ entity.name.module.js
198+
// @@@@@@ definition
185199
// ^^ meta.block
186200

187201
declare module 'module' {}
188202
// ^^^^^^^ storage.modifier
189203
// ^^^^^^^^^^^^^^^^^^ meta.module
190204
// ^^^^^^ keyword.declaration.module
191205
// ^^^^^^^^ entity.name.module.js
206+
// @@@@@@@@ definition "module"
192207
// ^ punctuation.definition.quoted.begin.js
193208
// ^ punctuation.definition.quoted.end.js
194209
// ^^ meta.block
@@ -198,6 +213,7 @@
198213
// ^^^^^^^^^^^^^^^^^^ meta.module
199214
// ^^^^^^ keyword.declaration.module
200215
// ^^^^^^^^ entity.name.module.js
216+
// @@@@@@@@ definition "module"
201217
// ^ punctuation.definition.quoted.begin.js
202218
// ^ punctuation.definition.quoted.end.js
203219
// ^^ meta.block

0 commit comments

Comments
 (0)