PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / typescript.tmLanguage.json

typescript.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.13.0, at build/shiki/languages/typescript.tmLanguage.json

5,666 lines 242.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScript.tmLanguage",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/359e091c0a83a45e20aefc13111ed4a19e201f97",
8 "name": "typescript",
9 "scopeName": "source.ts",
10 "patterns": [
11 {
12 "include": "#directives"
13 },
14 {
15 "include": "#statements"
16 },
17 {
18 "include": "#shebang"
19 }
20 ],
21 "repository": {
22 "shebang": {
23 "name": "comment.line.shebang.ts",
24 "match": "\\A(#!).*(?=$)",
25 "captures": {
26 "1": {
27 "name": "punctuation.definition.comment.ts"
28 }
29 }
30 },
31 "statements": {
32 "patterns": [
33 {
34 "include": "#declaration"
35 },
36 {
37 "include": "#control-statement"
38 },
39 {
40 "include": "#after-operator-block-as-object-literal"
41 },
42 {
43 "include": "#decl-block"
44 },
45 {
46 "include": "#label"
47 },
48 {
49 "include": "#expression"
50 },
51 {
52 "include": "#punctuation-semicolon"
53 },
54 {
55 "include": "#string"
56 },
57 {
58 "include": "#comment"
59 }
60 ]
61 },
62 "declaration": {
63 "patterns": [
64 {
65 "include": "#decorator"
66 },
67 {
68 "include": "#var-expr"
69 },
70 {
71 "include": "#function-declaration"
72 },
73 {
74 "include": "#class-declaration"
75 },
76 {
77 "include": "#interface-declaration"
78 },
79 {
80 "include": "#enum-declaration"
81 },
82 {
83 "include": "#namespace-declaration"
84 },
85 {
86 "include": "#type-alias-declaration"
87 },
88 {
89 "include": "#import-equals-declaration"
90 },
91 {
92 "include": "#import-declaration"
93 },
94 {
95 "include": "#export-declaration"
96 },
97 {
98 "name": "storage.modifier.ts",
99 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
100 }
101 ]
102 },
103 "control-statement": {
104 "patterns": [
105 {
106 "include": "#switch-statement"
107 },
108 {
109 "include": "#for-loop"
110 },
111 {
112 "name": "keyword.control.trycatch.ts",
113 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
114 },
115 {
116 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
117 "captures": {
118 "1": {
119 "name": "keyword.control.loop.ts"
120 },
121 "2": {
122 "name": "entity.name.label.ts"
123 }
124 }
125 },
126 {
127 "name": "keyword.control.loop.ts",
128 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
129 },
130 {
131 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
132 "beginCaptures": {
133 "0": {
134 "name": "keyword.control.flow.ts"
135 }
136 },
137 "end": "(?=[;}]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
138 "patterns": [
139 {
140 "include": "#expression"
141 }
142 ]
143 },
144 {
145 "name": "keyword.control.switch.ts",
146 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
147 },
148 {
149 "include": "#if-statement"
150 },
151 {
152 "name": "keyword.control.conditional.ts",
153 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
154 },
155 {
156 "name": "keyword.control.with.ts",
157 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
158 },
159 {
160 "name": "keyword.control.ts",
161 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
162 },
163 {
164 "name": "keyword.other.debugger.ts",
165 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
166 }
167 ]
168 },
169 "label": {
170 "patterns": [
171 {
172 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)",
173 "beginCaptures": {
174 "1": {
175 "name": "entity.name.label.ts"
176 },
177 "2": {
178 "name": "punctuation.separator.label.ts"
179 }
180 },
181 "end": "(?<=\\})",
182 "patterns": [
183 {
184 "include": "#decl-block"
185 }
186 ]
187 },
188 {
189 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
190 "captures": {
191 "1": {
192 "name": "entity.name.label.ts"
193 },
194 "2": {
195 "name": "punctuation.separator.label.ts"
196 }
197 }
198 }
199 ]
200 },
201 "expression": {
202 "patterns": [
203 {
204 "include": "#expressionWithoutIdentifiers"
205 },
206 {
207 "include": "#identifiers"
208 },
209 {
210 "include": "#expressionPunctuations"
211 }
212 ]
213 },
214 "expressionWithoutIdentifiers": {
215 "patterns": [
216 {
217 "include": "#string"
218 },
219 {
220 "include": "#regex"
221 },
222 {
223 "include": "#comment"
224 },
225 {
226 "include": "#function-expression"
227 },
228 {
229 "include": "#class-expression"
230 },
231 {
232 "include": "#arrow-function"
233 },
234 {
235 "include": "#paren-expression-possibly-arrow"
236 },
237 {
238 "include": "#cast"
239 },
240 {
241 "include": "#ternary-expression"
242 },
243 {
244 "include": "#new-expr"
245 },
246 {
247 "include": "#instanceof-expr"
248 },
249 {
250 "include": "#object-literal"
251 },
252 {
253 "include": "#expression-operators"
254 },
255 {
256 "include": "#function-call"
257 },
258 {
259 "include": "#literal"
260 },
261 {
262 "include": "#support-objects"
263 },
264 {
265 "include": "#paren-expression"
266 }
267 ]
268 },
269 "expressionPunctuations": {
270 "patterns": [
271 {
272 "include": "#punctuation-comma"
273 },
274 {
275 "include": "#punctuation-accessor"
276 }
277 ]
278 },
279 "decorator": {
280 "name": "meta.decorator.ts",
281 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@",
282 "beginCaptures": {
283 "0": {
284 "name": "punctuation.decorator.ts"
285 }
286 },
287 "end": "(?=\\s)",
288 "patterns": [
289 {
290 "include": "#expression"
291 }
292 ]
293 },
294 "var-expr": {
295 "patterns": [
296 {
297 "name": "meta.var.expr.ts",
298 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
299 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|((?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))",
300 "patterns": [
301 {
302 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
303 "beginCaptures": {
304 "1": {
305 "name": "keyword.control.export.ts"
306 },
307 "2": {
308 "name": "storage.modifier.ts"
309 },
310 "3": {
311 "name": "storage.type.ts"
312 }
313 },
314 "end": "(?=\\S)"
315 },
316 {
317 "include": "#destructuring-variable"
318 },
319 {
320 "include": "#var-single-variable"
321 },
322 {
323 "include": "#variable-initializer"
324 },
325 {
326 "include": "#comment"
327 },
328 {
329 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))",
330 "beginCaptures": {
331 "1": {
332 "name": "punctuation.separator.comma.ts"
333 }
334 },
335 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
336 "patterns": [
337 {
338 "include": "#single-line-comment-consuming-line-ending"
339 },
340 {
341 "include": "#comment"
342 },
343 {
344 "include": "#destructuring-variable"
345 },
346 {
347 "include": "#var-single-variable"
348 },
349 {
350 "include": "#punctuation-comma"
351 }
352 ]
353 },
354 {
355 "include": "#punctuation-comma"
356 }
357 ]
358 },
359 {
360 "name": "meta.var.expr.ts",
361 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
362 "beginCaptures": {
363 "1": {
364 "name": "keyword.control.export.ts"
365 },
366 "2": {
367 "name": "storage.modifier.ts"
368 },
369 "3": {
370 "name": "storage.type.ts"
371 }
372 },
373 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|((?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))",
374 "patterns": [
375 {
376 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
377 "beginCaptures": {
378 "1": {
379 "name": "keyword.control.export.ts"
380 },
381 "2": {
382 "name": "storage.modifier.ts"
383 },
384 "3": {
385 "name": "storage.type.ts"
386 }
387 },
388 "end": "(?=\\S)"
389 },
390 {
391 "include": "#destructuring-const"
392 },
393 {
394 "include": "#var-single-const"
395 },
396 {
397 "include": "#variable-initializer"
398 },
399 {
400 "include": "#comment"
401 },
402 {
403 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))",
404 "beginCaptures": {
405 "1": {
406 "name": "punctuation.separator.comma.ts"
407 }
408 },
409 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
410 "patterns": [
411 {
412 "include": "#single-line-comment-consuming-line-ending"
413 },
414 {
415 "include": "#comment"
416 },
417 {
418 "include": "#destructuring-const"
419 },
420 {
421 "include": "#var-single-const"
422 },
423 {
424 "include": "#punctuation-comma"
425 }
426 ]
427 },
428 {
429 "include": "#punctuation-comma"
430 }
431 ]
432 }
433 ]
434 },
435 "var-single-variable": {
436 "patterns": [
437 {
438 "name": "meta.var-single-variable.expr.ts",
439 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
440 "beginCaptures": {
441 "1": {
442 "name": "meta.definition.variable.ts entity.name.function.ts"
443 },
444 "2": {
445 "name": "keyword.operator.definiteassignment.ts"
446 }
447 },
448 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
449 "patterns": [
450 {
451 "include": "#var-single-variable-type-annotation"
452 }
453 ]
454 },
455 {
456 "name": "meta.var-single-variable.expr.ts",
457 "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?",
458 "beginCaptures": {
459 "1": {
460 "name": "meta.definition.variable.ts variable.other.constant.ts"
461 },
462 "2": {
463 "name": "keyword.operator.definiteassignment.ts"
464 }
465 },
466 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
467 "patterns": [
468 {
469 "include": "#var-single-variable-type-annotation"
470 }
471 ]
472 },
473 {
474 "name": "meta.var-single-variable.expr.ts",
475 "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?",
476 "beginCaptures": {
477 "1": {
478 "name": "meta.definition.variable.ts variable.other.readwrite.ts"
479 },
480 "2": {
481 "name": "keyword.operator.definiteassignment.ts"
482 }
483 },
484 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
485 "patterns": [
486 {
487 "include": "#var-single-variable-type-annotation"
488 }
489 ]
490 }
491 ]
492 },
493 "var-single-const": {
494 "patterns": [
495 {
496 "name": "meta.var-single-variable.expr.ts",
497 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
498 "beginCaptures": {
499 "1": {
500 "name": "meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts"
501 }
502 },
503 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
504 "patterns": [
505 {
506 "include": "#var-single-variable-type-annotation"
507 }
508 ]
509 },
510 {
511 "name": "meta.var-single-variable.expr.ts",
512 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
513 "beginCaptures": {
514 "1": {
515 "name": "meta.definition.variable.ts variable.other.constant.ts"
516 }
517 },
518 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
519 "patterns": [
520 {
521 "include": "#var-single-variable-type-annotation"
522 }
523 ]
524 }
525 ]
526 },
527 "var-single-variable-type-annotation": {
528 "patterns": [
529 {
530 "include": "#type-annotation"
531 },
532 {
533 "include": "#string"
534 },
535 {
536 "include": "#comment"
537 }
538 ]
539 },
540 "destructuring-variable": {
541 "patterns": [
542 {
543 "name": "meta.object-binding-pattern-variable.ts",
544 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
545 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
546 "patterns": [
547 {
548 "include": "#object-binding-pattern"
549 },
550 {
551 "include": "#type-annotation"
552 },
553 {
554 "include": "#comment"
555 }
556 ]
557 },
558 {
559 "name": "meta.array-binding-pattern-variable.ts",
560 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
561 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
562 "patterns": [
563 {
564 "include": "#array-binding-pattern"
565 },
566 {
567 "include": "#type-annotation"
568 },
569 {
570 "include": "#comment"
571 }
572 ]
573 }
574 ]
575 },
576 "destructuring-const": {
577 "patterns": [
578 {
579 "name": "meta.object-binding-pattern-variable.ts",
580 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
581 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
582 "patterns": [
583 {
584 "include": "#object-binding-pattern-const"
585 },
586 {
587 "include": "#type-annotation"
588 },
589 {
590 "include": "#comment"
591 }
592 ]
593 },
594 {
595 "name": "meta.array-binding-pattern-variable.ts",
596 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
597 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
598 "patterns": [
599 {
600 "include": "#array-binding-pattern-const"
601 },
602 {
603 "include": "#type-annotation"
604 },
605 {
606 "include": "#comment"
607 }
608 ]
609 }
610 ]
611 },
612 "object-binding-element": {
613 "patterns": [
614 {
615 "include": "#comment"
616 },
617 {
618 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
619 "end": "(?=,|\\})",
620 "patterns": [
621 {
622 "include": "#object-binding-element-propertyName"
623 },
624 {
625 "include": "#binding-element"
626 }
627 ]
628 },
629 {
630 "include": "#object-binding-pattern"
631 },
632 {
633 "include": "#destructuring-variable-rest"
634 },
635 {
636 "include": "#variable-initializer"
637 },
638 {
639 "include": "#punctuation-comma"
640 }
641 ]
642 },
643 "object-binding-element-const": {
644 "patterns": [
645 {
646 "include": "#comment"
647 },
648 {
649 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
650 "end": "(?=,|\\})",
651 "patterns": [
652 {
653 "include": "#object-binding-element-propertyName"
654 },
655 {
656 "include": "#binding-element-const"
657 }
658 ]
659 },
660 {
661 "include": "#object-binding-pattern-const"
662 },
663 {
664 "include": "#destructuring-variable-rest-const"
665 },
666 {
667 "include": "#variable-initializer"
668 },
669 {
670 "include": "#punctuation-comma"
671 }
672 ]
673 },
674 "object-binding-element-propertyName": {
675 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
676 "end": "(:)",
677 "endCaptures": {
678 "0": {
679 "name": "punctuation.destructuring.ts"
680 }
681 },
682 "patterns": [
683 {
684 "include": "#string"
685 },
686 {
687 "include": "#array-literal"
688 },
689 {
690 "include": "#numeric-literal"
691 },
692 {
693 "name": "variable.object.property.ts",
694 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
695 }
696 ]
697 },
698 "binding-element": {
699 "patterns": [
700 {
701 "include": "#comment"
702 },
703 {
704 "include": "#string"
705 },
706 {
707 "include": "#numeric-literal"
708 },
709 {
710 "include": "#regex"
711 },
712 {
713 "include": "#object-binding-pattern"
714 },
715 {
716 "include": "#array-binding-pattern"
717 },
718 {
719 "include": "#destructuring-variable-rest"
720 },
721 {
722 "include": "#variable-initializer"
723 }
724 ]
725 },
726 "binding-element-const": {
727 "patterns": [
728 {
729 "include": "#comment"
730 },
731 {
732 "include": "#string"
733 },
734 {
735 "include": "#numeric-literal"
736 },
737 {
738 "include": "#regex"
739 },
740 {
741 "include": "#object-binding-pattern-const"
742 },
743 {
744 "include": "#array-binding-pattern-const"
745 },
746 {
747 "include": "#destructuring-variable-rest-const"
748 },
749 {
750 "include": "#variable-initializer"
751 }
752 ]
753 },
754 "destructuring-variable-rest": {
755 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
756 "captures": {
757 "1": {
758 "name": "keyword.operator.rest.ts"
759 },
760 "2": {
761 "name": "meta.definition.variable.ts variable.other.readwrite.ts"
762 }
763 }
764 },
765 "destructuring-variable-rest-const": {
766 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
767 "captures": {
768 "1": {
769 "name": "keyword.operator.rest.ts"
770 },
771 "2": {
772 "name": "meta.definition.variable.ts variable.other.constant.ts"
773 }
774 }
775 },
776 "object-binding-pattern": {
777 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
778 "beginCaptures": {
779 "1": {
780 "name": "keyword.operator.rest.ts"
781 },
782 "2": {
783 "name": "punctuation.definition.binding-pattern.object.ts"
784 }
785 },
786 "end": "\\}",
787 "endCaptures": {
788 "0": {
789 "name": "punctuation.definition.binding-pattern.object.ts"
790 }
791 },
792 "patterns": [
793 {
794 "include": "#object-binding-element"
795 }
796 ]
797 },
798 "object-binding-pattern-const": {
799 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
800 "beginCaptures": {
801 "1": {
802 "name": "keyword.operator.rest.ts"
803 },
804 "2": {
805 "name": "punctuation.definition.binding-pattern.object.ts"
806 }
807 },
808 "end": "\\}",
809 "endCaptures": {
810 "0": {
811 "name": "punctuation.definition.binding-pattern.object.ts"
812 }
813 },
814 "patterns": [
815 {
816 "include": "#object-binding-element-const"
817 }
818 ]
819 },
820 "array-binding-pattern": {
821 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
822 "beginCaptures": {
823 "1": {
824 "name": "keyword.operator.rest.ts"
825 },
826 "2": {
827 "name": "punctuation.definition.binding-pattern.array.ts"
828 }
829 },
830 "end": "\\]",
831 "endCaptures": {
832 "0": {
833 "name": "punctuation.definition.binding-pattern.array.ts"
834 }
835 },
836 "patterns": [
837 {
838 "include": "#binding-element"
839 },
840 {
841 "include": "#punctuation-comma"
842 }
843 ]
844 },
845 "array-binding-pattern-const": {
846 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
847 "beginCaptures": {
848 "1": {
849 "name": "keyword.operator.rest.ts"
850 },
851 "2": {
852 "name": "punctuation.definition.binding-pattern.array.ts"
853 }
854 },
855 "end": "\\]",
856 "endCaptures": {
857 "0": {
858 "name": "punctuation.definition.binding-pattern.array.ts"
859 }
860 },
861 "patterns": [
862 {
863 "include": "#binding-element-const"
864 },
865 {
866 "include": "#punctuation-comma"
867 }
868 ]
869 },
870 "parameter-name": {
871 "patterns": [
872 {
873 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
874 "captures": {
875 "1": {
876 "name": "storage.modifier.ts"
877 }
878 }
879 },
880 {
881 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
882 "captures": {
883 "1": {
884 "name": "storage.modifier.ts"
885 },
886 "2": {
887 "name": "keyword.operator.rest.ts"
888 },
889 "3": {
890 "name": "entity.name.function.ts variable.language.this.ts"
891 },
892 "4": {
893 "name": "entity.name.function.ts"
894 },
895 "5": {
896 "name": "keyword.operator.optional.ts"
897 }
898 }
899 },
900 {
901 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)",
902 "captures": {
903 "1": {
904 "name": "storage.modifier.ts"
905 },
906 "2": {
907 "name": "keyword.operator.rest.ts"
908 },
909 "3": {
910 "name": "variable.parameter.ts variable.language.this.ts"
911 },
912 "4": {
913 "name": "variable.parameter.ts"
914 },
915 "5": {
916 "name": "keyword.operator.optional.ts"
917 }
918 }
919 }
920 ]
921 },
922 "destructuring-parameter": {
923 "patterns": [
924 {
925 "name": "meta.parameter.object-binding-pattern.ts",
926 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
927 "beginCaptures": {
928 "1": {
929 "name": "keyword.operator.rest.ts"
930 },
931 "2": {
932 "name": "punctuation.definition.binding-pattern.object.ts"
933 }
934 },
935 "end": "\\}",
936 "endCaptures": {
937 "0": {
938 "name": "punctuation.definition.binding-pattern.object.ts"
939 }
940 },
941 "patterns": [
942 {
943 "include": "#parameter-object-binding-element"
944 }
945 ]
946 },
947 {
948 "name": "meta.paramter.array-binding-pattern.ts",
949 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
950 "beginCaptures": {
951 "1": {
952 "name": "keyword.operator.rest.ts"
953 },
954 "2": {
955 "name": "punctuation.definition.binding-pattern.array.ts"
956 }
957 },
958 "end": "\\]",
959 "endCaptures": {
960 "0": {
961 "name": "punctuation.definition.binding-pattern.array.ts"
962 }
963 },
964 "patterns": [
965 {
966 "include": "#parameter-binding-element"
967 },
968 {
969 "include": "#punctuation-comma"
970 }
971 ]
972 }
973 ]
974 },
975 "parameter-object-binding-element": {
976 "patterns": [
977 {
978 "include": "#comment"
979 },
980 {
981 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
982 "end": "(?=,|\\})",
983 "patterns": [
984 {
985 "include": "#object-binding-element-propertyName"
986 },
987 {
988 "include": "#parameter-binding-element"
989 }
990 ]
991 },
992 {
993 "include": "#parameter-object-binding-pattern"
994 },
995 {
996 "include": "#destructuring-parameter-rest"
997 },
998 {
999 "include": "#variable-initializer"
1000 },
1001 {
1002 "include": "#punctuation-comma"
1003 }
1004 ]
1005 },
1006 "parameter-binding-element": {
1007 "patterns": [
1008 {
1009 "include": "#comment"
1010 },
1011 {
1012 "include": "#string"
1013 },
1014 {
1015 "include": "#numeric-literal"
1016 },
1017 {
1018 "include": "#regex"
1019 },
1020 {
1021 "include": "#parameter-object-binding-pattern"
1022 },
1023 {
1024 "include": "#parameter-array-binding-pattern"
1025 },
1026 {
1027 "include": "#destructuring-parameter-rest"
1028 },
1029 {
1030 "include": "#variable-initializer"
1031 }
1032 ]
1033 },
1034 "destructuring-parameter-rest": {
1035 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1036 "captures": {
1037 "1": {
1038 "name": "keyword.operator.rest.ts"
1039 },
1040 "2": {
1041 "name": "variable.parameter.ts"
1042 }
1043 }
1044 },
1045 "parameter-object-binding-pattern": {
1046 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1047 "beginCaptures": {
1048 "1": {
1049 "name": "keyword.operator.rest.ts"
1050 },
1051 "2": {
1052 "name": "punctuation.definition.binding-pattern.object.ts"
1053 }
1054 },
1055 "end": "\\}",
1056 "endCaptures": {
1057 "0": {
1058 "name": "punctuation.definition.binding-pattern.object.ts"
1059 }
1060 },
1061 "patterns": [
1062 {
1063 "include": "#parameter-object-binding-element"
1064 }
1065 ]
1066 },
1067 "parameter-array-binding-pattern": {
1068 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1069 "beginCaptures": {
1070 "1": {
1071 "name": "keyword.operator.rest.ts"
1072 },
1073 "2": {
1074 "name": "punctuation.definition.binding-pattern.array.ts"
1075 }
1076 },
1077 "end": "\\]",
1078 "endCaptures": {
1079 "0": {
1080 "name": "punctuation.definition.binding-pattern.array.ts"
1081 }
1082 },
1083 "patterns": [
1084 {
1085 "include": "#parameter-binding-element"
1086 },
1087 {
1088 "include": "#punctuation-comma"
1089 }
1090 ]
1091 },
1092 "field-declaration": {
1093 "name": "meta.field.declaration.ts",
1094 "begin": "(?x)(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|\\}|$))",
1095 "beginCaptures": {
1096 "1": {
1097 "name": "storage.modifier.ts"
1098 }
1099 },
1100 "end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?<=\\})",
1101 "patterns": [
1102 {
1103 "include": "#variable-initializer"
1104 },
1105 {
1106 "include": "#type-annotation"
1107 },
1108 {
1109 "include": "#string"
1110 },
1111 {
1112 "include": "#array-literal"
1113 },
1114 {
1115 "include": "#numeric-literal"
1116 },
1117 {
1118 "include": "#comment"
1119 },
1120 {
1121 "match": "(?x)(\\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
1122 "captures": {
1123 "1": {
1124 "name": "meta.definition.property.ts entity.name.function.ts"
1125 },
1126 "2": {
1127 "name": "keyword.operator.optional.ts"
1128 },
1129 "3": {
1130 "name": "keyword.operator.definiteassignment.ts"
1131 }
1132 }
1133 },
1134 {
1135 "name": "meta.definition.property.ts variable.object.property.ts",
1136 "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*"
1137 },
1138 {
1139 "name": "keyword.operator.optional.ts",
1140 "match": "\\?"
1141 },
1142 {
1143 "name": "keyword.operator.definiteassignment.ts",
1144 "match": "\\!"
1145 }
1146 ]
1147 },
1148 "variable-initializer": {
1149 "patterns": [
1150 {
1151 "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)",
1152 "beginCaptures": {
1153 "1": {
1154 "name": "keyword.operator.assignment.ts"
1155 }
1156 },
1157 "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
1158 "patterns": [
1159 {
1160 "include": "#expression"
1161 }
1162 ]
1163 },
1164 {
1165 "begin": "(?<!=|!)(=)(?!=)",
1166 "beginCaptures": {
1167 "1": {
1168 "name": "keyword.operator.assignment.ts"
1169 }
1170 },
1171 "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<=\\S)(?<!=)(?=\\s*$)",
1172 "patterns": [
1173 {
1174 "include": "#expression"
1175 }
1176 ]
1177 }
1178 ]
1179 },
1180 "function-declaration": {
1181 "name": "meta.function.ts",
1182 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1183 "beginCaptures": {
1184 "1": {
1185 "name": "keyword.control.export.ts"
1186 },
1187 "2": {
1188 "name": "storage.modifier.ts"
1189 },
1190 "3": {
1191 "name": "storage.modifier.async.ts"
1192 },
1193 "4": {
1194 "name": "storage.type.function.ts"
1195 },
1196 "5": {
1197 "name": "keyword.generator.asterisk.ts"
1198 },
1199 "6": {
1200 "name": "meta.definition.function.ts entity.name.function.ts"
1201 }
1202 },
1203 "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|(?<=\\})",
1204 "patterns": [
1205 {
1206 "include": "#function-name"
1207 },
1208 {
1209 "include": "#function-body"
1210 }
1211 ]
1212 },
1213 "function-expression": {
1214 "name": "meta.function.expression.ts",
1215 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1216 "beginCaptures": {
1217 "1": {
1218 "name": "storage.modifier.async.ts"
1219 },
1220 "2": {
1221 "name": "storage.type.function.ts"
1222 },
1223 "3": {
1224 "name": "keyword.generator.asterisk.ts"
1225 },
1226 "4": {
1227 "name": "meta.definition.function.ts entity.name.function.ts"
1228 }
1229 },
1230 "end": "(?=;)|(?<=\\})",
1231 "patterns": [
1232 {
1233 "include": "#function-name"
1234 },
1235 {
1236 "include": "#single-line-comment-consuming-line-ending"
1237 },
1238 {
1239 "include": "#function-body"
1240 }
1241 ]
1242 },
1243 "function-name": {
1244 "name": "meta.definition.function.ts entity.name.function.ts",
1245 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1246 },
1247 "function-body": {
1248 "patterns": [
1249 {
1250 "include": "#comment"
1251 },
1252 {
1253 "include": "#type-parameters"
1254 },
1255 {
1256 "include": "#function-parameters"
1257 },
1258 {
1259 "include": "#return-type"
1260 },
1261 {
1262 "include": "#type-function-return-type"
1263 },
1264 {
1265 "include": "#decl-block"
1266 },
1267 {
1268 "name": "keyword.generator.asterisk.ts",
1269 "match": "\\*"
1270 }
1271 ]
1272 },
1273 "method-declaration": {
1274 "patterns": [
1275 {
1276 "name": "meta.method.declaration.ts",
1277 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1278 "beginCaptures": {
1279 "1": {
1280 "name": "storage.modifier.ts"
1281 },
1282 "2": {
1283 "name": "storage.modifier.ts"
1284 },
1285 "3": {
1286 "name": "storage.modifier.ts"
1287 },
1288 "4": {
1289 "name": "storage.modifier.async.ts"
1290 },
1291 "5": {
1292 "name": "storage.type.ts"
1293 }
1294 },
1295 "end": "(?=\\}|;|,|$)|(?<=\\})",
1296 "patterns": [
1297 {
1298 "include": "#method-declaration-name"
1299 },
1300 {
1301 "include": "#function-body"
1302 }
1303 ]
1304 },
1305 {
1306 "name": "meta.method.declaration.ts",
1307 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\s*\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1308 "beginCaptures": {
1309 "1": {
1310 "name": "storage.modifier.ts"
1311 },
1312 "2": {
1313 "name": "storage.modifier.ts"
1314 },
1315 "3": {
1316 "name": "storage.modifier.ts"
1317 },
1318 "4": {
1319 "name": "storage.modifier.async.ts"
1320 },
1321 "5": {
1322 "name": "keyword.operator.new.ts"
1323 },
1324 "6": {
1325 "name": "keyword.generator.asterisk.ts"
1326 }
1327 },
1328 "end": "(?=\\}|;|,|$)|(?<=\\})",
1329 "patterns": [
1330 {
1331 "include": "#method-declaration-name"
1332 },
1333 {
1334 "include": "#function-body"
1335 }
1336 ]
1337 },
1338 {
1339 "name": "meta.method.declaration.ts",
1340 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1341 "beginCaptures": {
1342 "1": {
1343 "name": "storage.modifier.ts"
1344 },
1345 "2": {
1346 "name": "storage.modifier.ts"
1347 },
1348 "3": {
1349 "name": "storage.modifier.ts"
1350 },
1351 "4": {
1352 "name": "storage.modifier.async.ts"
1353 },
1354 "5": {
1355 "name": "storage.type.property.ts"
1356 },
1357 "6": {
1358 "name": "keyword.generator.asterisk.ts"
1359 }
1360 },
1361 "end": "(?=\\}|;|,|$)|(?<=\\})",
1362 "patterns": [
1363 {
1364 "include": "#method-declaration-name"
1365 },
1366 {
1367 "include": "#function-body"
1368 }
1369 ]
1370 }
1371 ]
1372 },
1373 "object-literal-method-declaration": {
1374 "name": "meta.method.declaration.ts",
1375 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1376 "beginCaptures": {
1377 "1": {
1378 "name": "storage.modifier.async.ts"
1379 },
1380 "2": {
1381 "name": "storage.type.property.ts"
1382 },
1383 "3": {
1384 "name": "keyword.generator.asterisk.ts"
1385 }
1386 },
1387 "end": "(?=\\}|;|,)|(?<=\\})",
1388 "patterns": [
1389 {
1390 "include": "#method-declaration-name"
1391 },
1392 {
1393 "include": "#function-body"
1394 },
1395 {
1396 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1397 "beginCaptures": {
1398 "1": {
1399 "name": "storage.modifier.async.ts"
1400 },
1401 "2": {
1402 "name": "storage.type.property.ts"
1403 },
1404 "3": {
1405 "name": "keyword.generator.asterisk.ts"
1406 }
1407 },
1408 "end": "(?=\\(|\\<)",
1409 "patterns": [
1410 {
1411 "include": "#method-declaration-name"
1412 }
1413 ]
1414 }
1415 ]
1416 },
1417 "method-declaration-name": {
1418 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
1419 "end": "(?=\\(|\\<)",
1420 "patterns": [
1421 {
1422 "include": "#string"
1423 },
1424 {
1425 "include": "#array-literal"
1426 },
1427 {
1428 "include": "#numeric-literal"
1429 },
1430 {
1431 "name": "meta.definition.method.ts entity.name.function.ts",
1432 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1433 },
1434 {
1435 "name": "keyword.operator.optional.ts",
1436 "match": "\\?"
1437 }
1438 ]
1439 },
1440 "arrow-function": {
1441 "patterns": [
1442 {
1443 "name": "meta.arrow.ts",
1444 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
1445 "captures": {
1446 "1": {
1447 "name": "storage.modifier.async.ts"
1448 },
1449 "2": {
1450 "name": "variable.parameter.ts"
1451 }
1452 }
1453 },
1454 {
1455 "name": "meta.arrow.ts",
1456 "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)",
1457 "beginCaptures": {
1458 "1": {
1459 "name": "storage.modifier.async.ts"
1460 }
1461 },
1462 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
1463 "patterns": [
1464 {
1465 "include": "#comment"
1466 },
1467 {
1468 "include": "#type-parameters"
1469 },
1470 {
1471 "include": "#function-parameters"
1472 },
1473 {
1474 "include": "#arrow-return-type"
1475 },
1476 {
1477 "include": "#possibly-arrow-return-type"
1478 }
1479 ]
1480 },
1481 {
1482 "name": "meta.arrow.ts",
1483 "begin": "=>",
1484 "beginCaptures": {
1485 "0": {
1486 "name": "storage.type.function.arrow.ts"
1487 }
1488 },
1489 "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])",
1490 "patterns": [
1491 {
1492 "include": "#single-line-comment-consuming-line-ending"
1493 },
1494 {
1495 "include": "#decl-block"
1496 },
1497 {
1498 "include": "#expression"
1499 }
1500 ]
1501 }
1502 ]
1503 },
1504 "indexer-declaration": {
1505 "name": "meta.indexer.declaration.ts",
1506 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1507 "beginCaptures": {
1508 "1": {
1509 "name": "storage.modifier.ts"
1510 },
1511 "2": {
1512 "name": "meta.brace.square.ts"
1513 },
1514 "3": {
1515 "name": "variable.parameter.ts"
1516 }
1517 },
1518 "end": "(\\])\\s*(\\?\\s*)?|$",
1519 "endCaptures": {
1520 "1": {
1521 "name": "meta.brace.square.ts"
1522 },
1523 "2": {
1524 "name": "keyword.operator.optional.ts"
1525 }
1526 },
1527 "patterns": [
1528 {
1529 "include": "#type-annotation"
1530 }
1531 ]
1532 },
1533 "indexer-mapped-type-declaration": {
1534 "name": "meta.indexer.mappedtype.declaration.ts",
1535 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
1536 "beginCaptures": {
1537 "1": {
1538 "name": "keyword.operator.type.modifier.ts"
1539 },
1540 "2": {
1541 "name": "storage.modifier.ts"
1542 },
1543 "3": {
1544 "name": "meta.brace.square.ts"
1545 },
1546 "4": {
1547 "name": "entity.name.type.ts"
1548 },
1549 "5": {
1550 "name": "keyword.operator.expression.in.ts"
1551 }
1552 },
1553 "end": "(\\])([+-])?\\s*(\\?\\s*)?|$",
1554 "endCaptures": {
1555 "1": {
1556 "name": "meta.brace.square.ts"
1557 },
1558 "2": {
1559 "name": "keyword.operator.type.modifier.ts"
1560 },
1561 "3": {
1562 "name": "keyword.operator.optional.ts"
1563 }
1564 },
1565 "patterns": [
1566 {
1567 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
1568 "captures": {
1569 "1": {
1570 "name": "keyword.control.as.ts"
1571 }
1572 }
1573 },
1574 {
1575 "include": "#type"
1576 }
1577 ]
1578 },
1579 "function-parameters": {
1580 "name": "meta.parameters.ts",
1581 "begin": "\\(",
1582 "beginCaptures": {
1583 "0": {
1584 "name": "punctuation.definition.parameters.begin.ts"
1585 }
1586 },
1587 "end": "\\)",
1588 "endCaptures": {
1589 "0": {
1590 "name": "punctuation.definition.parameters.end.ts"
1591 }
1592 },
1593 "patterns": [
1594 {
1595 "include": "#function-parameters-body"
1596 }
1597 ]
1598 },
1599 "function-parameters-body": {
1600 "patterns": [
1601 {
1602 "include": "#comment"
1603 },
1604 {
1605 "include": "#string"
1606 },
1607 {
1608 "include": "#decorator"
1609 },
1610 {
1611 "include": "#destructuring-parameter"
1612 },
1613 {
1614 "include": "#parameter-name"
1615 },
1616 {
1617 "include": "#parameter-type-annotation"
1618 },
1619 {
1620 "include": "#variable-initializer"
1621 },
1622 {
1623 "name": "punctuation.separator.parameter.ts",
1624 "match": ","
1625 }
1626 ]
1627 },
1628 "class-declaration": {
1629 "name": "meta.class.ts",
1630 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
1631 "beginCaptures": {
1632 "1": {
1633 "name": "keyword.control.export.ts"
1634 },
1635 "2": {
1636 "name": "storage.modifier.ts"
1637 },
1638 "3": {
1639 "name": "storage.modifier.ts"
1640 },
1641 "4": {
1642 "name": "storage.type.class.ts"
1643 }
1644 },
1645 "end": "(?<=\\})",
1646 "patterns": [
1647 {
1648 "include": "#class-declaration-or-expression-patterns"
1649 }
1650 ]
1651 },
1652 "class-expression": {
1653 "name": "meta.class.ts",
1654 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])",
1655 "beginCaptures": {
1656 "1": {
1657 "name": "storage.modifier.ts"
1658 },
1659 "2": {
1660 "name": "storage.type.class.ts"
1661 }
1662 },
1663 "end": "(?<=\\})",
1664 "patterns": [
1665 {
1666 "include": "#class-declaration-or-expression-patterns"
1667 }
1668 ]
1669 },
1670 "class-declaration-or-expression-patterns": {
1671 "patterns": [
1672 {
1673 "include": "#comment"
1674 },
1675 {
1676 "include": "#class-or-interface-heritage"
1677 },
1678 {
1679 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1680 "captures": {
1681 "0": {
1682 "name": "entity.name.type.class.ts"
1683 }
1684 }
1685 },
1686 {
1687 "include": "#type-parameters"
1688 },
1689 {
1690 "include": "#class-or-interface-body"
1691 }
1692 ]
1693 },
1694 "interface-declaration": {
1695 "name": "meta.interface.ts",
1696 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
1697 "beginCaptures": {
1698 "1": {
1699 "name": "keyword.control.export.ts"
1700 },
1701 "2": {
1702 "name": "storage.modifier.ts"
1703 },
1704 "3": {
1705 "name": "storage.modifier.ts"
1706 },
1707 "4": {
1708 "name": "storage.type.interface.ts"
1709 }
1710 },
1711 "end": "(?<=\\})",
1712 "patterns": [
1713 {
1714 "include": "#comment"
1715 },
1716 {
1717 "include": "#class-or-interface-heritage"
1718 },
1719 {
1720 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1721 "captures": {
1722 "0": {
1723 "name": "entity.name.type.interface.ts"
1724 }
1725 }
1726 },
1727 {
1728 "include": "#type-parameters"
1729 },
1730 {
1731 "include": "#class-or-interface-body"
1732 }
1733 ]
1734 },
1735 "class-or-interface-heritage": {
1736 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1737 "beginCaptures": {
1738 "1": {
1739 "name": "storage.modifier.ts"
1740 }
1741 },
1742 "end": "(?=\\{)",
1743 "patterns": [
1744 {
1745 "include": "#comment"
1746 },
1747 {
1748 "include": "#class-or-interface-heritage"
1749 },
1750 {
1751 "include": "#type-parameters"
1752 },
1753 {
1754 "include": "#expressionWithoutIdentifiers"
1755 },
1756 {
1757 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)",
1758 "captures": {
1759 "1": {
1760 "name": "entity.name.type.module.ts"
1761 },
1762 "2": {
1763 "name": "punctuation.accessor.ts"
1764 },
1765 "3": {
1766 "name": "punctuation.accessor.optional.ts"
1767 }
1768 }
1769 },
1770 {
1771 "match": "([_$[:alpha:]][_$[:alnum:]]*)",
1772 "captures": {
1773 "1": {
1774 "name": "entity.other.inherited-class.ts"
1775 }
1776 }
1777 },
1778 {
1779 "include": "#expressionPunctuations"
1780 }
1781 ]
1782 },
1783 "class-or-interface-body": {
1784 "begin": "\\{",
1785 "beginCaptures": {
1786 "0": {
1787 "name": "punctuation.definition.block.ts"
1788 }
1789 },
1790 "end": "\\}",
1791 "endCaptures": {
1792 "0": {
1793 "name": "punctuation.definition.block.ts"
1794 }
1795 },
1796 "patterns": [
1797 {
1798 "include": "#comment"
1799 },
1800 {
1801 "include": "#decorator"
1802 },
1803 {
1804 "begin": "(?<=:)\\s*",
1805 "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
1806 "patterns": [
1807 {
1808 "include": "#expression"
1809 }
1810 ]
1811 },
1812 {
1813 "include": "#method-declaration"
1814 },
1815 {
1816 "include": "#indexer-declaration"
1817 },
1818 {
1819 "include": "#field-declaration"
1820 },
1821 {
1822 "include": "#string"
1823 },
1824 {
1825 "include": "#type-annotation"
1826 },
1827 {
1828 "include": "#variable-initializer"
1829 },
1830 {
1831 "include": "#access-modifier"
1832 },
1833 {
1834 "include": "#property-accessor"
1835 },
1836 {
1837 "include": "#async-modifier"
1838 },
1839 {
1840 "include": "#after-operator-block-as-object-literal"
1841 },
1842 {
1843 "include": "#decl-block"
1844 },
1845 {
1846 "include": "#expression"
1847 },
1848 {
1849 "include": "#punctuation-comma"
1850 },
1851 {
1852 "include": "#punctuation-semicolon"
1853 }
1854 ]
1855 },
1856 "access-modifier": {
1857 "name": "storage.modifier.ts",
1858 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1859 },
1860 "property-accessor": {
1861 "name": "storage.type.property.ts",
1862 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1863 },
1864 "async-modifier": {
1865 "name": "storage.modifier.async.ts",
1866 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1867 },
1868 "enum-declaration": {
1869 "name": "meta.enum.declaration.ts",
1870 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
1871 "beginCaptures": {
1872 "1": {
1873 "name": "keyword.control.export.ts"
1874 },
1875 "2": {
1876 "name": "storage.modifier.ts"
1877 },
1878 "3": {
1879 "name": "storage.modifier.ts"
1880 },
1881 "4": {
1882 "name": "storage.type.enum.ts"
1883 },
1884 "5": {
1885 "name": "entity.name.type.enum.ts"
1886 }
1887 },
1888 "end": "(?<=\\})",
1889 "patterns": [
1890 {
1891 "include": "#comment"
1892 },
1893 {
1894 "begin": "\\{",
1895 "beginCaptures": {
1896 "0": {
1897 "name": "punctuation.definition.block.ts"
1898 }
1899 },
1900 "end": "\\}",
1901 "endCaptures": {
1902 "0": {
1903 "name": "punctuation.definition.block.ts"
1904 }
1905 },
1906 "patterns": [
1907 {
1908 "include": "#comment"
1909 },
1910 {
1911 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
1912 "beginCaptures": {
1913 "0": {
1914 "name": "variable.other.enummember.ts"
1915 }
1916 },
1917 "end": "(?=,|\\}|$)",
1918 "patterns": [
1919 {
1920 "include": "#comment"
1921 },
1922 {
1923 "include": "#variable-initializer"
1924 }
1925 ]
1926 },
1927 {
1928 "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
1929 "end": "(?=,|\\}|$)",
1930 "patterns": [
1931 {
1932 "include": "#string"
1933 },
1934 {
1935 "include": "#array-literal"
1936 },
1937 {
1938 "include": "#comment"
1939 },
1940 {
1941 "include": "#variable-initializer"
1942 }
1943 ]
1944 },
1945 {
1946 "include": "#punctuation-comma"
1947 }
1948 ]
1949 }
1950 ]
1951 },
1952 "namespace-declaration": {
1953 "name": "meta.namespace.declaration.ts",
1954 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))",
1955 "beginCaptures": {
1956 "1": {
1957 "name": "keyword.control.export.ts"
1958 },
1959 "2": {
1960 "name": "storage.modifier.ts"
1961 },
1962 "3": {
1963 "name": "storage.type.namespace.ts"
1964 }
1965 },
1966 "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
1967 "patterns": [
1968 {
1969 "include": "#comment"
1970 },
1971 {
1972 "include": "#string"
1973 },
1974 {
1975 "name": "entity.name.type.module.ts",
1976 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
1977 },
1978 {
1979 "include": "#punctuation-accessor"
1980 },
1981 {
1982 "include": "#decl-block"
1983 }
1984 ]
1985 },
1986 "type-alias-declaration": {
1987 "name": "meta.type.declaration.ts",
1988 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
1989 "beginCaptures": {
1990 "1": {
1991 "name": "keyword.control.export.ts"
1992 },
1993 "2": {
1994 "name": "storage.modifier.ts"
1995 },
1996 "3": {
1997 "name": "storage.type.type.ts"
1998 },
1999 "4": {
2000 "name": "entity.name.type.alias.ts"
2001 }
2002 },
2003 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2004 "patterns": [
2005 {
2006 "include": "#comment"
2007 },
2008 {
2009 "include": "#type-parameters"
2010 },
2011 {
2012 "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2013 "beginCaptures": {
2014 "1": {
2015 "name": "keyword.operator.assignment.ts"
2016 },
2017 "2": {
2018 "name": "keyword.control.intrinsic.ts"
2019 }
2020 },
2021 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2022 "patterns": [
2023 {
2024 "include": "#type"
2025 }
2026 ]
2027 },
2028 {
2029 "begin": "(=)\\s*",
2030 "beginCaptures": {
2031 "1": {
2032 "name": "keyword.operator.assignment.ts"
2033 }
2034 },
2035 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2036 "patterns": [
2037 {
2038 "include": "#type"
2039 }
2040 ]
2041 }
2042 ]
2043 },
2044 "import-equals-declaration": {
2045 "patterns": [
2046 {
2047 "name": "meta.import-equals.external.ts",
2048 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
2049 "beginCaptures": {
2050 "1": {
2051 "name": "keyword.control.export.ts"
2052 },
2053 "2": {
2054 "name": "storage.modifier.ts"
2055 },
2056 "3": {
2057 "name": "keyword.control.import.ts"
2058 },
2059 "4": {
2060 "name": "keyword.control.type.ts"
2061 },
2062 "5": {
2063 "name": "variable.other.readwrite.alias.ts"
2064 },
2065 "6": {
2066 "name": "keyword.operator.assignment.ts"
2067 },
2068 "7": {
2069 "name": "keyword.control.require.ts"
2070 },
2071 "8": {
2072 "name": "meta.brace.round.ts"
2073 }
2074 },
2075 "end": "\\)",
2076 "endCaptures": {
2077 "0": {
2078 "name": "meta.brace.round.ts"
2079 }
2080 },
2081 "patterns": [
2082 {
2083 "include": "#comment"
2084 },
2085 {
2086 "include": "#string"
2087 }
2088 ]
2089 },
2090 {
2091 "name": "meta.import-equals.internal.ts",
2092 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
2093 "beginCaptures": {
2094 "1": {
2095 "name": "keyword.control.export.ts"
2096 },
2097 "2": {
2098 "name": "storage.modifier.ts"
2099 },
2100 "3": {
2101 "name": "keyword.control.import.ts"
2102 },
2103 "4": {
2104 "name": "keyword.control.type.ts"
2105 },
2106 "5": {
2107 "name": "variable.other.readwrite.alias.ts"
2108 },
2109 "6": {
2110 "name": "keyword.operator.assignment.ts"
2111 }
2112 },
2113 "end": "(?=;|$|^)",
2114 "patterns": [
2115 {
2116 "include": "#single-line-comment-consuming-line-ending"
2117 },
2118 {
2119 "include": "#comment"
2120 },
2121 {
2122 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
2123 "captures": {
2124 "1": {
2125 "name": "entity.name.type.module.ts"
2126 },
2127 "2": {
2128 "name": "punctuation.accessor.ts"
2129 },
2130 "3": {
2131 "name": "punctuation.accessor.optional.ts"
2132 }
2133 }
2134 },
2135 {
2136 "name": "variable.other.readwrite.ts",
2137 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2138 }
2139 ]
2140 }
2141 ]
2142 },
2143 "import-declaration": {
2144 "name": "meta.import.ts",
2145 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2146 "beginCaptures": {
2147 "1": {
2148 "name": "keyword.control.export.ts"
2149 },
2150 "2": {
2151 "name": "storage.modifier.ts"
2152 },
2153 "3": {
2154 "name": "keyword.control.import.ts"
2155 },
2156 "4": {
2157 "name": "keyword.control.type.ts"
2158 }
2159 },
2160 "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)",
2161 "patterns": [
2162 {
2163 "include": "#single-line-comment-consuming-line-ending"
2164 },
2165 {
2166 "include": "#comment"
2167 },
2168 {
2169 "include": "#string"
2170 },
2171 {
2172 "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])",
2173 "end": "\\bfrom\\b",
2174 "endCaptures": {
2175 "0": {
2176 "name": "keyword.control.from.ts"
2177 }
2178 },
2179 "patterns": [
2180 {
2181 "include": "#import-export-declaration"
2182 }
2183 ]
2184 },
2185 {
2186 "include": "#import-export-declaration"
2187 }
2188 ]
2189 },
2190 "export-declaration": {
2191 "patterns": [
2192 {
2193 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
2194 "captures": {
2195 "1": {
2196 "name": "keyword.control.export.ts"
2197 },
2198 "2": {
2199 "name": "keyword.control.as.ts"
2200 },
2201 "3": {
2202 "name": "storage.type.namespace.ts"
2203 },
2204 "4": {
2205 "name": "entity.name.type.module.ts"
2206 }
2207 }
2208 },
2209 {
2210 "name": "meta.export.default.ts",
2211 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
2212 "beginCaptures": {
2213 "1": {
2214 "name": "keyword.control.export.ts"
2215 },
2216 "2": {
2217 "name": "keyword.control.type.ts"
2218 },
2219 "3": {
2220 "name": "keyword.operator.assignment.ts"
2221 },
2222 "4": {
2223 "name": "keyword.control.default.ts"
2224 }
2225 },
2226 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2227 "patterns": [
2228 {
2229 "include": "#interface-declaration"
2230 },
2231 {
2232 "include": "#expression"
2233 }
2234 ]
2235 },
2236 {
2237 "name": "meta.export.ts",
2238 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b)))",
2239 "beginCaptures": {
2240 "1": {
2241 "name": "keyword.control.export.ts"
2242 },
2243 "2": {
2244 "name": "keyword.control.type.ts"
2245 }
2246 },
2247 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2248 "patterns": [
2249 {
2250 "include": "#import-export-declaration"
2251 }
2252 ]
2253 }
2254 ]
2255 },
2256 "import-export-declaration": {
2257 "patterns": [
2258 {
2259 "include": "#comment"
2260 },
2261 {
2262 "include": "#string"
2263 },
2264 {
2265 "include": "#import-export-block"
2266 },
2267 {
2268 "name": "keyword.control.from.ts",
2269 "match": "\\bfrom\\b"
2270 },
2271 {
2272 "include": "#import-export-assert-clause"
2273 },
2274 {
2275 "include": "#import-export-clause"
2276 }
2277 ]
2278 },
2279 "import-export-assert-clause": {
2280 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
2281 "beginCaptures": {
2282 "1": {
2283 "name": "keyword.control.assert.ts"
2284 },
2285 "2": {
2286 "name": "punctuation.definition.block.ts"
2287 }
2288 },
2289 "end": "\\}",
2290 "endCaptures": {
2291 "0": {
2292 "name": "punctuation.definition.block.ts"
2293 }
2294 },
2295 "patterns": [
2296 {
2297 "include": "#comment"
2298 },
2299 {
2300 "include": "#string"
2301 },
2302 {
2303 "name": "meta.object-literal.key.ts",
2304 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
2305 },
2306 {
2307 "name": "punctuation.separator.key-value.ts",
2308 "match": ":"
2309 }
2310 ]
2311 },
2312 "import-export-block": {
2313 "name": "meta.block.ts",
2314 "begin": "\\{",
2315 "beginCaptures": {
2316 "0": {
2317 "name": "punctuation.definition.block.ts"
2318 }
2319 },
2320 "end": "\\}",
2321 "endCaptures": {
2322 "0": {
2323 "name": "punctuation.definition.block.ts"
2324 }
2325 },
2326 "patterns": [
2327 {
2328 "include": "#import-export-clause"
2329 }
2330 ]
2331 },
2332 "import-export-clause": {
2333 "patterns": [
2334 {
2335 "include": "#comment"
2336 },
2337 {
2338 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
2339 "captures": {
2340 "1": {
2341 "name": "keyword.control.type.ts"
2342 },
2343 "2": {
2344 "name": "keyword.control.default.ts"
2345 },
2346 "3": {
2347 "name": "constant.language.import-export-all.ts"
2348 },
2349 "4": {
2350 "name": "variable.other.readwrite.ts"
2351 },
2352 "5": {
2353 "name": "keyword.control.as.ts"
2354 },
2355 "6": {
2356 "name": "keyword.control.default.ts"
2357 },
2358 "7": {
2359 "name": "variable.other.readwrite.alias.ts"
2360 }
2361 }
2362 },
2363 {
2364 "include": "#punctuation-comma"
2365 },
2366 {
2367 "name": "constant.language.import-export-all.ts",
2368 "match": "\\*"
2369 },
2370 {
2371 "name": "keyword.control.default.ts",
2372 "match": "\\b(default)\\b"
2373 },
2374 {
2375 "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
2376 "captures": {
2377 "1": {
2378 "name": "keyword.control.type.ts"
2379 },
2380 "2": {
2381 "name": "variable.other.readwrite.alias.ts"
2382 }
2383 }
2384 }
2385 ]
2386 },
2387 "switch-statement": {
2388 "name": "switch-statement.expr.ts",
2389 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
2390 "end": "\\}",
2391 "endCaptures": {
2392 "0": {
2393 "name": "punctuation.definition.block.ts"
2394 }
2395 },
2396 "patterns": [
2397 {
2398 "include": "#comment"
2399 },
2400 {
2401 "name": "switch-expression.expr.ts",
2402 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
2403 "beginCaptures": {
2404 "1": {
2405 "name": "keyword.control.switch.ts"
2406 },
2407 "2": {
2408 "name": "meta.brace.round.ts"
2409 }
2410 },
2411 "end": "\\)",
2412 "endCaptures": {
2413 "0": {
2414 "name": "meta.brace.round.ts"
2415 }
2416 },
2417 "patterns": [
2418 {
2419 "include": "#expression"
2420 }
2421 ]
2422 },
2423 {
2424 "name": "switch-block.expr.ts",
2425 "begin": "\\{",
2426 "beginCaptures": {
2427 "0": {
2428 "name": "punctuation.definition.block.ts"
2429 }
2430 },
2431 "end": "(?=\\})",
2432 "patterns": [
2433 {
2434 "name": "case-clause.expr.ts",
2435 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2436 "beginCaptures": {
2437 "1": {
2438 "name": "keyword.control.switch.ts"
2439 }
2440 },
2441 "end": "(?=:)",
2442 "patterns": [
2443 {
2444 "include": "#expression"
2445 }
2446 ]
2447 },
2448 {
2449 "begin": "(:)\\s*(\\{)",
2450 "beginCaptures": {
2451 "1": {
2452 "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
2453 },
2454 "2": {
2455 "name": "meta.block.ts punctuation.definition.block.ts"
2456 }
2457 },
2458 "end": "\\}",
2459 "endCaptures": {
2460 "0": {
2461 "name": "meta.block.ts punctuation.definition.block.ts"
2462 }
2463 },
2464 "contentName": "meta.block.ts",
2465 "patterns": [
2466 {
2467 "include": "#statements"
2468 }
2469 ]
2470 },
2471 {
2472 "match": "(:)",
2473 "captures": {
2474 "0": {
2475 "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
2476 }
2477 }
2478 },
2479 {
2480 "include": "#statements"
2481 }
2482 ]
2483 }
2484 ]
2485 },
2486 "for-loop": {
2487 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())",
2488 "beginCaptures": {
2489 "0": {
2490 "name": "keyword.control.loop.ts"
2491 }
2492 },
2493 "end": "(?<=\\))",
2494 "patterns": [
2495 {
2496 "include": "#comment"
2497 },
2498 {
2499 "name": "keyword.control.loop.ts",
2500 "match": "await"
2501 },
2502 {
2503 "begin": "\\(",
2504 "beginCaptures": {
2505 "0": {
2506 "name": "meta.brace.round.ts"
2507 }
2508 },
2509 "end": "\\)",
2510 "endCaptures": {
2511 "0": {
2512 "name": "meta.brace.round.ts"
2513 }
2514 },
2515 "patterns": [
2516 {
2517 "include": "#var-expr"
2518 },
2519 {
2520 "include": "#expression"
2521 },
2522 {
2523 "include": "#punctuation-semicolon"
2524 }
2525 ]
2526 }
2527 ]
2528 },
2529 "if-statement": {
2530 "patterns": [
2531 {
2532 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))",
2533 "end": "(?=;|$|\\})",
2534 "patterns": [
2535 {
2536 "include": "#comment"
2537 },
2538 {
2539 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2540 "beginCaptures": {
2541 "1": {
2542 "name": "keyword.control.conditional.ts"
2543 },
2544 "2": {
2545 "name": "meta.brace.round.ts"
2546 }
2547 },
2548 "end": "\\)",
2549 "endCaptures": {
2550 "0": {
2551 "name": "meta.brace.round.ts"
2552 }
2553 },
2554 "patterns": [
2555 {
2556 "include": "#expression"
2557 }
2558 ]
2559 },
2560 {
2561 "name": "string.regexp.ts",
2562 "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
2563 "beginCaptures": {
2564 "0": {
2565 "name": "punctuation.definition.string.begin.ts"
2566 }
2567 },
2568 "end": "(/)([dgimsuy]*)",
2569 "endCaptures": {
2570 "1": {
2571 "name": "punctuation.definition.string.end.ts"
2572 },
2573 "2": {
2574 "name": "keyword.other.ts"
2575 }
2576 },
2577 "patterns": [
2578 {
2579 "include": "#regexp"
2580 }
2581 ]
2582 },
2583 {
2584 "include": "#statements"
2585 }
2586 ]
2587 }
2588 ]
2589 },
2590 "decl-block": {
2591 "name": "meta.block.ts",
2592 "begin": "\\{",
2593 "beginCaptures": {
2594 "0": {
2595 "name": "punctuation.definition.block.ts"
2596 }
2597 },
2598 "end": "\\}",
2599 "endCaptures": {
2600 "0": {
2601 "name": "punctuation.definition.block.ts"
2602 }
2603 },
2604 "patterns": [
2605 {
2606 "include": "#statements"
2607 }
2608 ]
2609 },
2610 "after-operator-block-as-object-literal": {
2611 "name": "meta.objectliteral.ts",
2612 "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
2613 "beginCaptures": {
2614 "1": {
2615 "name": "punctuation.definition.block.ts"
2616 }
2617 },
2618 "end": "\\}",
2619 "endCaptures": {
2620 "0": {
2621 "name": "punctuation.definition.block.ts"
2622 }
2623 },
2624 "patterns": [
2625 {
2626 "include": "#object-member"
2627 }
2628 ]
2629 },
2630 "object-literal": {
2631 "name": "meta.objectliteral.ts",
2632 "begin": "\\{",
2633 "beginCaptures": {
2634 "0": {
2635 "name": "punctuation.definition.block.ts"
2636 }
2637 },
2638 "end": "\\}",
2639 "endCaptures": {
2640 "0": {
2641 "name": "punctuation.definition.block.ts"
2642 }
2643 },
2644 "patterns": [
2645 {
2646 "include": "#object-member"
2647 }
2648 ]
2649 },
2650 "object-member": {
2651 "patterns": [
2652 {
2653 "include": "#comment"
2654 },
2655 {
2656 "include": "#object-literal-method-declaration"
2657 },
2658 {
2659 "name": "meta.object.member.ts meta.object-literal.key.ts",
2660 "begin": "(?=\\[)",
2661 "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))",
2662 "patterns": [
2663 {
2664 "include": "#comment"
2665 },
2666 {
2667 "include": "#array-literal"
2668 }
2669 ]
2670 },
2671 {
2672 "name": "meta.object.member.ts meta.object-literal.key.ts",
2673 "begin": "(?=[\\'\\\"\\`])",
2674 "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))",
2675 "patterns": [
2676 {
2677 "include": "#comment"
2678 },
2679 {
2680 "include": "#string"
2681 }
2682 ]
2683 },
2684 {
2685 "name": "meta.object.member.ts meta.object-literal.key.ts",
2686 "begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
2687 "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as|satisifies\\s+))",
2688 "patterns": [
2689 {
2690 "include": "#comment"
2691 },
2692 {
2693 "include": "#numeric-literal"
2694 }
2695 ]
2696 },
2697 {
2698 "name": "meta.method.declaration.ts",
2699 "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
2700 "end": "(?=\\}|;|,)|(?<=\\})",
2701 "patterns": [
2702 {
2703 "include": "#function-body"
2704 }
2705 ]
2706 },
2707 {
2708 "name": "meta.object.member.ts",
2709 "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2710 "captures": {
2711 "0": {
2712 "name": "meta.object-literal.key.ts"
2713 },
2714 "1": {
2715 "name": "constant.numeric.decimal.ts"
2716 }
2717 }
2718 },
2719 {
2720 "name": "meta.object.member.ts",
2721 "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
2722 "captures": {
2723 "0": {
2724 "name": "meta.object-literal.key.ts"
2725 },
2726 "1": {
2727 "name": "entity.name.function.ts"
2728 }
2729 }
2730 },
2731 {
2732 "name": "meta.object.member.ts",
2733 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2734 "captures": {
2735 "0": {
2736 "name": "meta.object-literal.key.ts"
2737 }
2738 }
2739 },
2740 {
2741 "name": "meta.object.member.ts",
2742 "begin": "\\.\\.\\.",
2743 "beginCaptures": {
2744 "0": {
2745 "name": "keyword.operator.spread.ts"
2746 }
2747 },
2748 "end": "(?=,|\\})",
2749 "patterns": [
2750 {
2751 "include": "#expression"
2752 }
2753 ]
2754 },
2755 {
2756 "name": "meta.object.member.ts",
2757 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)",
2758 "captures": {
2759 "1": {
2760 "name": "variable.other.readwrite.ts"
2761 }
2762 }
2763 },
2764 {
2765 "name": "meta.object.member.ts",
2766 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
2767 "captures": {
2768 "1": {
2769 "name": "keyword.control.as.ts"
2770 },
2771 "2": {
2772 "name": "storage.modifier.ts"
2773 }
2774 }
2775 },
2776 {
2777 "name": "meta.object.member.ts",
2778 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
2779 "beginCaptures": {
2780 "1": {
2781 "name": "keyword.control.as.ts"
2782 },
2783 "2": {
2784 "name": "keyword.control.satisfies.ts"
2785 }
2786 },
2787 "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))",
2788 "patterns": [
2789 {
2790 "include": "#type"
2791 }
2792 ]
2793 },
2794 {
2795 "name": "meta.object.member.ts",
2796 "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
2797 "end": "(?=,|\\}|$|\\/\\/|\\/\\*)",
2798 "patterns": [
2799 {
2800 "include": "#expression"
2801 }
2802 ]
2803 },
2804 {
2805 "name": "meta.object.member.ts",
2806 "begin": ":",
2807 "beginCaptures": {
2808 "0": {
2809 "name": "meta.object-literal.key.ts punctuation.separator.key-value.ts"
2810 }
2811 },
2812 "end": "(?=,|\\})",
2813 "patterns": [
2814 {
2815 "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2816 "beginCaptures": {
2817 "1": {
2818 "name": "storage.modifier.async.ts"
2819 }
2820 },
2821 "end": "(?<=\\))",
2822 "patterns": [
2823 {
2824 "include": "#type-parameters"
2825 },
2826 {
2827 "begin": "\\(",
2828 "beginCaptures": {
2829 "0": {
2830 "name": "meta.brace.round.ts"
2831 }
2832 },
2833 "end": "\\)",
2834 "endCaptures": {
2835 "0": {
2836 "name": "meta.brace.round.ts"
2837 }
2838 },
2839 "patterns": [
2840 {
2841 "include": "#expression-inside-possibly-arrow-parens"
2842 }
2843 ]
2844 }
2845 ]
2846 },
2847 {
2848 "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2849 "beginCaptures": {
2850 "1": {
2851 "name": "storage.modifier.async.ts"
2852 },
2853 "2": {
2854 "name": "meta.brace.round.ts"
2855 }
2856 },
2857 "end": "\\)",
2858 "endCaptures": {
2859 "0": {
2860 "name": "meta.brace.round.ts"
2861 }
2862 },
2863 "patterns": [
2864 {
2865 "include": "#expression-inside-possibly-arrow-parens"
2866 }
2867 ]
2868 },
2869 {
2870 "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2871 "beginCaptures": {
2872 "1": {
2873 "name": "storage.modifier.async.ts"
2874 }
2875 },
2876 "end": "(?<=\\>)",
2877 "patterns": [
2878 {
2879 "include": "#type-parameters"
2880 }
2881 ]
2882 },
2883 {
2884 "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2885 "beginCaptures": {
2886 "1": {
2887 "name": "meta.brace.round.ts"
2888 }
2889 },
2890 "end": "\\)",
2891 "endCaptures": {
2892 "0": {
2893 "name": "meta.brace.round.ts"
2894 }
2895 },
2896 "patterns": [
2897 {
2898 "include": "#expression-inside-possibly-arrow-parens"
2899 }
2900 ]
2901 },
2902 {
2903 "include": "#possibly-arrow-return-type"
2904 },
2905 {
2906 "include": "#expression"
2907 }
2908 ]
2909 },
2910 {
2911 "include": "#punctuation-comma"
2912 }
2913 ]
2914 },
2915 "ternary-expression": {
2916 "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)",
2917 "beginCaptures": {
2918 "1": {
2919 "name": "keyword.operator.ternary.ts"
2920 }
2921 },
2922 "end": "\\s*(:)",
2923 "endCaptures": {
2924 "1": {
2925 "name": "keyword.operator.ternary.ts"
2926 }
2927 },
2928 "patterns": [
2929 {
2930 "include": "#expression"
2931 }
2932 ]
2933 },
2934 "function-call": {
2935 "patterns": [
2936 {
2937 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2938 "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2939 "patterns": [
2940 {
2941 "name": "meta.function-call.ts",
2942 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
2943 "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2944 "patterns": [
2945 {
2946 "include": "#function-call-target"
2947 }
2948 ]
2949 },
2950 {
2951 "include": "#comment"
2952 },
2953 {
2954 "include": "#function-call-optionals"
2955 },
2956 {
2957 "include": "#type-arguments"
2958 },
2959 {
2960 "include": "#paren-expression"
2961 }
2962 ]
2963 },
2964 {
2965 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
2966 "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
2967 "patterns": [
2968 {
2969 "name": "meta.function-call.ts",
2970 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
2971 "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))",
2972 "patterns": [
2973 {
2974 "include": "#function-call-target"
2975 }
2976 ]
2977 },
2978 {
2979 "include": "#comment"
2980 },
2981 {
2982 "include": "#function-call-optionals"
2983 },
2984 {
2985 "include": "#type-arguments"
2986 }
2987 ]
2988 }
2989 ]
2990 },
2991 "function-call-target": {
2992 "patterns": [
2993 {
2994 "include": "#support-function-call-identifiers"
2995 },
2996 {
2997 "name": "entity.name.function.ts",
2998 "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)"
2999 }
3000 ]
3001 },
3002 "function-call-optionals": {
3003 "patterns": [
3004 {
3005 "name": "meta.function-call.ts punctuation.accessor.optional.ts",
3006 "match": "\\?\\."
3007 },
3008 {
3009 "name": "meta.function-call.ts keyword.operator.definiteassignment.ts",
3010 "match": "\\!"
3011 }
3012 ]
3013 },
3014 "support-function-call-identifiers": {
3015 "patterns": [
3016 {
3017 "include": "#literal"
3018 },
3019 {
3020 "include": "#support-objects"
3021 },
3022 {
3023 "include": "#object-identifiers"
3024 },
3025 {
3026 "include": "#punctuation-accessor"
3027 },
3028 {
3029 "name": "keyword.operator.expression.import.ts",
3030 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))"
3031 }
3032 ]
3033 },
3034 "new-expr": {
3035 "name": "new.expr.ts",
3036 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3037 "beginCaptures": {
3038 "1": {
3039 "name": "keyword.operator.new.ts"
3040 }
3041 },
3042 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3043 "patterns": [
3044 {
3045 "include": "#expression"
3046 }
3047 ]
3048 },
3049 "instanceof-expr": {
3050 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3051 "beginCaptures": {
3052 "1": {
3053 "name": "keyword.operator.expression.instanceof.ts"
3054 }
3055 },
3056 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3057 "patterns": [
3058 {
3059 "include": "#type"
3060 }
3061 ]
3062 },
3063 "paren-expression-possibly-arrow": {
3064 "patterns": [
3065 {
3066 "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
3067 "beginCaptures": {
3068 "1": {
3069 "name": "storage.modifier.async.ts"
3070 }
3071 },
3072 "end": "(?<=\\))",
3073 "patterns": [
3074 {
3075 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3076 }
3077 ]
3078 },
3079 {
3080 "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)",
3081 "beginCaptures": {
3082 "1": {
3083 "name": "storage.modifier.async.ts"
3084 }
3085 },
3086 "end": "(?<=\\))",
3087 "patterns": [
3088 {
3089 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3090 }
3091 ]
3092 },
3093 {
3094 "include": "#possibly-arrow-return-type"
3095 }
3096 ]
3097 },
3098 "paren-expression-possibly-arrow-with-typeparameters": {
3099 "patterns": [
3100 {
3101 "include": "#type-parameters"
3102 },
3103 {
3104 "begin": "\\(",
3105 "beginCaptures": {
3106 "0": {
3107 "name": "meta.brace.round.ts"
3108 }
3109 },
3110 "end": "\\)",
3111 "endCaptures": {
3112 "0": {
3113 "name": "meta.brace.round.ts"
3114 }
3115 },
3116 "patterns": [
3117 {
3118 "include": "#expression-inside-possibly-arrow-parens"
3119 }
3120 ]
3121 }
3122 ]
3123 },
3124 "expression-inside-possibly-arrow-parens": {
3125 "patterns": [
3126 {
3127 "include": "#expressionWithoutIdentifiers"
3128 },
3129 {
3130 "include": "#comment"
3131 },
3132 {
3133 "include": "#string"
3134 },
3135 {
3136 "include": "#decorator"
3137 },
3138 {
3139 "include": "#destructuring-parameter"
3140 },
3141 {
3142 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
3143 "captures": {
3144 "1": {
3145 "name": "storage.modifier.ts"
3146 }
3147 }
3148 },
3149 {
3150 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
3151 "captures": {
3152 "1": {
3153 "name": "storage.modifier.ts"
3154 },
3155 "2": {
3156 "name": "keyword.operator.rest.ts"
3157 },
3158 "3": {
3159 "name": "entity.name.function.ts variable.language.this.ts"
3160 },
3161 "4": {
3162 "name": "entity.name.function.ts"
3163 },
3164 "5": {
3165 "name": "keyword.operator.optional.ts"
3166 }
3167 }
3168 },
3169 {
3170 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)",
3171 "captures": {
3172 "1": {
3173 "name": "storage.modifier.ts"
3174 },
3175 "2": {
3176 "name": "keyword.operator.rest.ts"
3177 },
3178 "3": {
3179 "name": "variable.parameter.ts variable.language.this.ts"
3180 },
3181 "4": {
3182 "name": "variable.parameter.ts"
3183 },
3184 "5": {
3185 "name": "keyword.operator.optional.ts"
3186 }
3187 }
3188 },
3189 {
3190 "include": "#type-annotation"
3191 },
3192 {
3193 "include": "#variable-initializer"
3194 },
3195 {
3196 "name": "punctuation.separator.parameter.ts",
3197 "match": ","
3198 },
3199 {
3200 "include": "#identifiers"
3201 },
3202 {
3203 "include": "#expressionPunctuations"
3204 }
3205 ]
3206 },
3207 "paren-expression": {
3208 "begin": "\\(",
3209 "beginCaptures": {
3210 "0": {
3211 "name": "meta.brace.round.ts"
3212 }
3213 },
3214 "end": "\\)",
3215 "endCaptures": {
3216 "0": {
3217 "name": "meta.brace.round.ts"
3218 }
3219 },
3220 "patterns": [
3221 {
3222 "include": "#expression"
3223 }
3224 ]
3225 },
3226 "cast": {
3227 "patterns": [
3228 {
3229 "name": "cast.expr.ts",
3230 "match": "\\s*(<)\\s*(const)\\s*(>)",
3231 "captures": {
3232 "1": {
3233 "name": "meta.brace.angle.ts"
3234 },
3235 "2": {
3236 "name": "storage.modifier.ts"
3237 },
3238 "3": {
3239 "name": "meta.brace.angle.ts"
3240 }
3241 }
3242 },
3243 {
3244 "name": "cast.expr.ts",
3245 "begin": "(?:(?<!\\+\\+|--)(?<=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:>*?\\&\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(<)(?!<?\\=)(?!\\s*$)",
3246 "beginCaptures": {
3247 "1": {
3248 "name": "meta.brace.angle.ts"
3249 }
3250 },
3251 "end": "(\\>)",
3252 "endCaptures": {
3253 "1": {
3254 "name": "meta.brace.angle.ts"
3255 }
3256 },
3257 "patterns": [
3258 {
3259 "include": "#type"
3260 }
3261 ]
3262 },
3263 {
3264 "name": "cast.expr.ts",
3265 "begin": "(?:(?<=^))\\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\\s*>)",
3266 "beginCaptures": {
3267 "1": {
3268 "name": "meta.brace.angle.ts"
3269 }
3270 },
3271 "end": "(\\>)",
3272 "endCaptures": {
3273 "1": {
3274 "name": "meta.brace.angle.ts"
3275 }
3276 },
3277 "patterns": [
3278 {
3279 "include": "#type"
3280 }
3281 ]
3282 }
3283 ]
3284 },
3285 "expression-operators": {
3286 "patterns": [
3287 {
3288 "name": "keyword.control.flow.ts",
3289 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3290 },
3291 {
3292 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)",
3293 "beginCaptures": {
3294 "1": {
3295 "name": "keyword.control.flow.ts"
3296 }
3297 },
3298 "end": "\\*",
3299 "endCaptures": {
3300 "0": {
3301 "name": "keyword.generator.asterisk.ts"
3302 }
3303 },
3304 "patterns": [
3305 {
3306 "include": "#comment"
3307 }
3308 ]
3309 },
3310 {
3311 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?",
3312 "captures": {
3313 "1": {
3314 "name": "keyword.control.flow.ts"
3315 },
3316 "2": {
3317 "name": "keyword.generator.asterisk.ts"
3318 }
3319 }
3320 },
3321 {
3322 "name": "keyword.operator.expression.delete.ts",
3323 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3324 },
3325 {
3326 "name": "keyword.operator.expression.in.ts",
3327 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3328 },
3329 {
3330 "name": "keyword.operator.expression.of.ts",
3331 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3332 },
3333 {
3334 "name": "keyword.operator.expression.instanceof.ts",
3335 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3336 },
3337 {
3338 "name": "keyword.operator.new.ts",
3339 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3340 },
3341 {
3342 "include": "#typeof-operator"
3343 },
3344 {
3345 "name": "keyword.operator.expression.void.ts",
3346 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3347 },
3348 {
3349 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
3350 "captures": {
3351 "1": {
3352 "name": "keyword.control.as.ts"
3353 },
3354 "2": {
3355 "name": "storage.modifier.ts"
3356 }
3357 }
3358 },
3359 {
3360 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
3361 "beginCaptures": {
3362 "1": {
3363 "name": "keyword.control.as.ts"
3364 },
3365 "2": {
3366 "name": "keyword.control.satisfies.ts"
3367 }
3368 },
3369 "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+)|(\\s+\\<))",
3370 "patterns": [
3371 {
3372 "include": "#type"
3373 }
3374 ]
3375 },
3376 {
3377 "name": "keyword.operator.spread.ts",
3378 "match": "\\.\\.\\."
3379 },
3380 {
3381 "name": "keyword.operator.assignment.compound.ts",
3382 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
3383 },
3384 {
3385 "name": "keyword.operator.assignment.compound.bitwise.ts",
3386 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
3387 },
3388 {
3389 "name": "keyword.operator.bitwise.shift.ts",
3390 "match": "<<|>>>|>>"
3391 },
3392 {
3393 "name": "keyword.operator.comparison.ts",
3394 "match": "===|!==|==|!="
3395 },
3396 {
3397 "name": "keyword.operator.relational.ts",
3398 "match": "<=|>=|<>|<|>"
3399 },
3400 {
3401 "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))",
3402 "captures": {
3403 "1": {
3404 "name": "keyword.operator.logical.ts"
3405 },
3406 "2": {
3407 "name": "keyword.operator.assignment.compound.ts"
3408 },
3409 "3": {
3410 "name": "keyword.operator.arithmetic.ts"
3411 }
3412 }
3413 },
3414 {
3415 "name": "keyword.operator.logical.ts",
3416 "match": "\\!|&&|\\|\\||\\?\\?"
3417 },
3418 {
3419 "name": "keyword.operator.bitwise.ts",
3420 "match": "\\&|~|\\^|\\|"
3421 },
3422 {
3423 "name": "keyword.operator.assignment.ts",
3424 "match": "\\="
3425 },
3426 {
3427 "name": "keyword.operator.decrement.ts",
3428 "match": "--"
3429 },
3430 {
3431 "name": "keyword.operator.increment.ts",
3432 "match": "\\+\\+"
3433 },
3434 {
3435 "name": "keyword.operator.arithmetic.ts",
3436 "match": "%|\\*|/|-|\\+"
3437 },
3438 {
3439 "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))",
3440 "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))",
3441 "endCaptures": {
3442 "1": {
3443 "name": "keyword.operator.assignment.compound.ts"
3444 },
3445 "2": {
3446 "name": "keyword.operator.arithmetic.ts"
3447 }
3448 },
3449 "patterns": [
3450 {
3451 "include": "#comment"
3452 }
3453 ]
3454 },
3455 {
3456 "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))",
3457 "captures": {
3458 "1": {
3459 "name": "keyword.operator.assignment.compound.ts"
3460 },
3461 "2": {
3462 "name": "keyword.operator.arithmetic.ts"
3463 }
3464 }
3465 }
3466 ]
3467 },
3468 "typeof-operator": {
3469 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3470 "beginCaptures": {
3471 "0": {
3472 "name": "keyword.operator.expression.typeof.ts"
3473 }
3474 },
3475 "end": "(?=[,);}\\]=>:&|{\\?]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
3476 "patterns": [
3477 {
3478 "include": "#expression"
3479 }
3480 ]
3481 },
3482 "literal": {
3483 "patterns": [
3484 {
3485 "include": "#numeric-literal"
3486 },
3487 {
3488 "include": "#boolean-literal"
3489 },
3490 {
3491 "include": "#null-literal"
3492 },
3493 {
3494 "include": "#undefined-literal"
3495 },
3496 {
3497 "include": "#numericConstant-literal"
3498 },
3499 {
3500 "include": "#array-literal"
3501 },
3502 {
3503 "include": "#this-literal"
3504 },
3505 {
3506 "include": "#super-literal"
3507 }
3508 ]
3509 },
3510 "array-literal": {
3511 "name": "meta.array.literal.ts",
3512 "begin": "\\s*(\\[)",
3513 "beginCaptures": {
3514 "1": {
3515 "name": "meta.brace.square.ts"
3516 }
3517 },
3518 "end": "\\]",
3519 "endCaptures": {
3520 "0": {
3521 "name": "meta.brace.square.ts"
3522 }
3523 },
3524 "patterns": [
3525 {
3526 "include": "#expression"
3527 },
3528 {
3529 "include": "#punctuation-comma"
3530 }
3531 ]
3532 },
3533 "numeric-literal": {
3534 "patterns": [
3535 {
3536 "name": "constant.numeric.hex.ts",
3537 "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)",
3538 "captures": {
3539 "1": {
3540 "name": "storage.type.numeric.bigint.ts"
3541 }
3542 }
3543 },
3544 {
3545 "name": "constant.numeric.binary.ts",
3546 "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)",
3547 "captures": {
3548 "1": {
3549 "name": "storage.type.numeric.bigint.ts"
3550 }
3551 }
3552 },
3553 {
3554 "name": "constant.numeric.octal.ts",
3555 "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)",
3556 "captures": {
3557 "1": {
3558 "name": "storage.type.numeric.bigint.ts"
3559 }
3560 }
3561 },
3562 {
3563 "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)",
3564 "captures": {
3565 "0": {
3566 "name": "constant.numeric.decimal.ts"
3567 },
3568 "1": {
3569 "name": "meta.delimiter.decimal.period.ts"
3570 },
3571 "2": {
3572 "name": "storage.type.numeric.bigint.ts"
3573 },
3574 "3": {
3575 "name": "meta.delimiter.decimal.period.ts"
3576 },
3577 "4": {
3578 "name": "storage.type.numeric.bigint.ts"
3579 },
3580 "5": {
3581 "name": "meta.delimiter.decimal.period.ts"
3582 },
3583 "6": {
3584 "name": "storage.type.numeric.bigint.ts"
3585 },
3586 "7": {
3587 "name": "storage.type.numeric.bigint.ts"
3588 },
3589 "8": {
3590 "name": "meta.delimiter.decimal.period.ts"
3591 },
3592 "9": {
3593 "name": "storage.type.numeric.bigint.ts"
3594 },
3595 "10": {
3596 "name": "meta.delimiter.decimal.period.ts"
3597 },
3598 "11": {
3599 "name": "storage.type.numeric.bigint.ts"
3600 },
3601 "12": {
3602 "name": "meta.delimiter.decimal.period.ts"
3603 },
3604 "13": {
3605 "name": "storage.type.numeric.bigint.ts"
3606 },
3607 "14": {
3608 "name": "storage.type.numeric.bigint.ts"
3609 }
3610 }
3611 }
3612 ]
3613 },
3614 "boolean-literal": {
3615 "patterns": [
3616 {
3617 "name": "constant.language.boolean.true.ts",
3618 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3619 },
3620 {
3621 "name": "constant.language.boolean.false.ts",
3622 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3623 }
3624 ]
3625 },
3626 "null-literal": {
3627 "name": "constant.language.null.ts",
3628 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3629 },
3630 "this-literal": {
3631 "name": "variable.language.this.ts",
3632 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)"
3633 },
3634 "super-literal": {
3635 "name": "variable.language.super.ts",
3636 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)"
3637 },
3638 "undefined-literal": {
3639 "name": "constant.language.undefined.ts",
3640 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3641 },
3642 "numericConstant-literal": {
3643 "patterns": [
3644 {
3645 "name": "constant.language.nan.ts",
3646 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3647 },
3648 {
3649 "name": "constant.language.infinity.ts",
3650 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3651 }
3652 ]
3653 },
3654 "support-objects": {
3655 "patterns": [
3656 {
3657 "name": "variable.language.arguments.ts",
3658 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
3659 },
3660 {
3661 "name": "support.class.promise.ts",
3662 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
3663 },
3664 {
3665 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
3666 "captures": {
3667 "1": {
3668 "name": "keyword.control.import.ts"
3669 },
3670 "2": {
3671 "name": "punctuation.accessor.ts"
3672 },
3673 "3": {
3674 "name": "punctuation.accessor.optional.ts"
3675 },
3676 "4": {
3677 "name": "support.variable.property.importmeta.ts"
3678 }
3679 }
3680 },
3681 {
3682 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)",
3683 "captures": {
3684 "1": {
3685 "name": "keyword.operator.new.ts"
3686 },
3687 "2": {
3688 "name": "punctuation.accessor.ts"
3689 },
3690 "3": {
3691 "name": "punctuation.accessor.optional.ts"
3692 },
3693 "4": {
3694 "name": "support.variable.property.target.ts"
3695 }
3696 }
3697 },
3698 {
3699 "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))",
3700 "captures": {
3701 "1": {
3702 "name": "punctuation.accessor.ts"
3703 },
3704 "2": {
3705 "name": "punctuation.accessor.optional.ts"
3706 },
3707 "3": {
3708 "name": "support.variable.property.ts"
3709 },
3710 "4": {
3711 "name": "support.constant.ts"
3712 }
3713 }
3714 },
3715 {
3716 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
3717 "captures": {
3718 "1": {
3719 "name": "support.type.object.module.ts"
3720 },
3721 "2": {
3722 "name": "support.type.object.module.ts"
3723 },
3724 "3": {
3725 "name": "punctuation.accessor.ts"
3726 },
3727 "4": {
3728 "name": "punctuation.accessor.optional.ts"
3729 },
3730 "5": {
3731 "name": "support.type.object.module.ts"
3732 }
3733 }
3734 }
3735 ]
3736 },
3737 "identifiers": {
3738 "patterns": [
3739 {
3740 "include": "#object-identifiers"
3741 },
3742 {
3743 "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))",
3744 "captures": {
3745 "1": {
3746 "name": "punctuation.accessor.ts"
3747 },
3748 "2": {
3749 "name": "punctuation.accessor.optional.ts"
3750 },
3751 "3": {
3752 "name": "entity.name.function.ts"
3753 }
3754 }
3755 },
3756 {
3757 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
3758 "captures": {
3759 "1": {
3760 "name": "punctuation.accessor.ts"
3761 },
3762 "2": {
3763 "name": "punctuation.accessor.optional.ts"
3764 },
3765 "3": {
3766 "name": "variable.other.constant.property.ts"
3767 }
3768 }
3769 },
3770 {
3771 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3772 "captures": {
3773 "1": {
3774 "name": "punctuation.accessor.ts"
3775 },
3776 "2": {
3777 "name": "punctuation.accessor.optional.ts"
3778 },
3779 "3": {
3780 "name": "variable.other.property.ts"
3781 }
3782 }
3783 },
3784 {
3785 "name": "variable.other.constant.ts",
3786 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3787 },
3788 {
3789 "name": "variable.other.readwrite.ts",
3790 "match": "[_$[:alpha:]][_$[:alnum:]]*"
3791 }
3792 ]
3793 },
3794 "object-identifiers": {
3795 "patterns": [
3796 {
3797 "name": "support.class.ts",
3798 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))"
3799 },
3800 {
3801 "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3802 "captures": {
3803 "1": {
3804 "name": "punctuation.accessor.ts"
3805 },
3806 "2": {
3807 "name": "punctuation.accessor.optional.ts"
3808 },
3809 "3": {
3810 "name": "variable.other.constant.object.property.ts"
3811 },
3812 "4": {
3813 "name": "variable.other.object.property.ts"
3814 }
3815 }
3816 },
3817 {
3818 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3819 "captures": {
3820 "1": {
3821 "name": "variable.other.constant.object.ts"
3822 },
3823 "2": {
3824 "name": "variable.other.object.ts"
3825 }
3826 }
3827 }
3828 ]
3829 },
3830 "type-annotation": {
3831 "patterns": [
3832 {
3833 "name": "meta.type.annotation.ts",
3834 "begin": "(:)(?=\\s*\\S)",
3835 "beginCaptures": {
3836 "1": {
3837 "name": "keyword.operator.type.annotation.ts"
3838 }
3839 },
3840 "end": "(?<![:|&])((?=$|^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3841 "patterns": [
3842 {
3843 "include": "#type"
3844 }
3845 ]
3846 },
3847 {
3848 "name": "meta.type.annotation.ts",
3849 "begin": "(:)",
3850 "beginCaptures": {
3851 "1": {
3852 "name": "keyword.operator.type.annotation.ts"
3853 }
3854 },
3855 "end": "(?<![:|&])((?=[,);\\}\\]]|//)|(?==[^>])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3856 "patterns": [
3857 {
3858 "include": "#type"
3859 }
3860 ]
3861 }
3862 ]
3863 },
3864 "parameter-type-annotation": {
3865 "patterns": [
3866 {
3867 "name": "meta.type.annotation.ts",
3868 "begin": "(:)",
3869 "beginCaptures": {
3870 "1": {
3871 "name": "keyword.operator.type.annotation.ts"
3872 }
3873 },
3874 "end": "(?=[,)])|(?==[^>])",
3875 "patterns": [
3876 {
3877 "include": "#type"
3878 }
3879 ]
3880 }
3881 ]
3882 },
3883 "return-type": {
3884 "patterns": [
3885 {
3886 "name": "meta.return.type.ts",
3887 "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
3888 "beginCaptures": {
3889 "1": {
3890 "name": "keyword.operator.type.annotation.ts"
3891 }
3892 },
3893 "end": "(?<![:|&])(?=$|^|[{};,]|//)",
3894 "patterns": [
3895 {
3896 "include": "#return-type-core"
3897 }
3898 ]
3899 },
3900 {
3901 "name": "meta.return.type.ts",
3902 "begin": "(?<=\\))\\s*(:)",
3903 "beginCaptures": {
3904 "1": {
3905 "name": "keyword.operator.type.annotation.ts"
3906 }
3907 },
3908 "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
3909 "patterns": [
3910 {
3911 "include": "#return-type-core"
3912 }
3913 ]
3914 }
3915 ]
3916 },
3917 "return-type-core": {
3918 "patterns": [
3919 {
3920 "include": "#comment"
3921 },
3922 {
3923 "begin": "(?<=[:|&])(?=\\s*\\{)",
3924 "end": "(?<=\\})",
3925 "patterns": [
3926 {
3927 "include": "#type-object"
3928 }
3929 ]
3930 },
3931 {
3932 "include": "#type-predicate-operator"
3933 },
3934 {
3935 "include": "#type"
3936 }
3937 ]
3938 },
3939 "arrow-return-type": {
3940 "name": "meta.return.type.arrow.ts",
3941 "begin": "(?<=\\))\\s*(:)",
3942 "beginCaptures": {
3943 "1": {
3944 "name": "keyword.operator.type.annotation.ts"
3945 }
3946 },
3947 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3948 "patterns": [
3949 {
3950 "include": "#arrow-return-type-body"
3951 }
3952 ]
3953 },
3954 "possibly-arrow-return-type": {
3955 "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)",
3956 "beginCaptures": {
3957 "1": {
3958 "name": "meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts"
3959 }
3960 },
3961 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3962 "contentName": "meta.arrow.ts meta.return.type.arrow.ts",
3963 "patterns": [
3964 {
3965 "include": "#arrow-return-type-body"
3966 }
3967 ]
3968 },
3969 "arrow-return-type-body": {
3970 "patterns": [
3971 {
3972 "begin": "(?<=[:])(?=\\s*\\{)",
3973 "end": "(?<=\\})",
3974 "patterns": [
3975 {
3976 "include": "#type-object"
3977 }
3978 ]
3979 },
3980 {
3981 "include": "#type-predicate-operator"
3982 },
3983 {
3984 "include": "#type"
3985 }
3986 ]
3987 },
3988 "type-parameters": {
3989 "name": "meta.type.parameters.ts",
3990 "begin": "(<)",
3991 "beginCaptures": {
3992 "1": {
3993 "name": "punctuation.definition.typeparameters.begin.ts"
3994 }
3995 },
3996 "end": "(>)",
3997 "endCaptures": {
3998 "1": {
3999 "name": "punctuation.definition.typeparameters.end.ts"
4000 }
4001 },
4002 "patterns": [
4003 {
4004 "include": "#comment"
4005 },
4006 {
4007 "name": "storage.modifier.ts",
4008 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4009 },
4010 {
4011 "include": "#type"
4012 },
4013 {
4014 "include": "#punctuation-comma"
4015 },
4016 {
4017 "name": "keyword.operator.assignment.ts",
4018 "match": "(=)(?!>)"
4019 }
4020 ]
4021 },
4022 "type-arguments": {
4023 "name": "meta.type.parameters.ts",
4024 "begin": "\\<",
4025 "beginCaptures": {
4026 "0": {
4027 "name": "punctuation.definition.typeparameters.begin.ts"
4028 }
4029 },
4030 "end": "\\>",
4031 "endCaptures": {
4032 "0": {
4033 "name": "punctuation.definition.typeparameters.end.ts"
4034 }
4035 },
4036 "patterns": [
4037 {
4038 "include": "#type-arguments-body"
4039 }
4040 ]
4041 },
4042 "type-arguments-body": {
4043 "patterns": [
4044 {
4045 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4046 "captures": {
4047 "0": {
4048 "name": "keyword.operator.type.ts"
4049 }
4050 }
4051 },
4052 {
4053 "include": "#type"
4054 },
4055 {
4056 "include": "#punctuation-comma"
4057 }
4058 ]
4059 },
4060 "type": {
4061 "patterns": [
4062 {
4063 "include": "#comment"
4064 },
4065 {
4066 "include": "#type-string"
4067 },
4068 {
4069 "include": "#numeric-literal"
4070 },
4071 {
4072 "include": "#type-primitive"
4073 },
4074 {
4075 "include": "#type-builtin-literals"
4076 },
4077 {
4078 "include": "#type-parameters"
4079 },
4080 {
4081 "include": "#type-tuple"
4082 },
4083 {
4084 "include": "#type-object"
4085 },
4086 {
4087 "include": "#type-operators"
4088 },
4089 {
4090 "include": "#type-conditional"
4091 },
4092 {
4093 "include": "#type-fn-type-parameters"
4094 },
4095 {
4096 "include": "#type-paren-or-function-parameters"
4097 },
4098 {
4099 "include": "#type-function-return-type"
4100 },
4101 {
4102 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
4103 "captures": {
4104 "1": {
4105 "name": "storage.modifier.ts"
4106 }
4107 }
4108 },
4109 {
4110 "include": "#type-name"
4111 }
4112 ]
4113 },
4114 "type-primitive": {
4115 "name": "support.type.primitive.ts",
4116 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4117 },
4118 "type-builtin-literals": {
4119 "name": "support.type.builtin.ts",
4120 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4121 },
4122 "type-tuple": {
4123 "name": "meta.type.tuple.ts",
4124 "begin": "\\[",
4125 "beginCaptures": {
4126 "0": {
4127 "name": "meta.brace.square.ts"
4128 }
4129 },
4130 "end": "\\]",
4131 "endCaptures": {
4132 "0": {
4133 "name": "meta.brace.square.ts"
4134 }
4135 },
4136 "patterns": [
4137 {
4138 "name": "keyword.operator.rest.ts",
4139 "match": "\\.\\.\\."
4140 },
4141 {
4142 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)",
4143 "captures": {
4144 "1": {
4145 "name": "entity.name.label.ts"
4146 },
4147 "2": {
4148 "name": "keyword.operator.optional.ts"
4149 },
4150 "3": {
4151 "name": "punctuation.separator.label.ts"
4152 }
4153 }
4154 },
4155 {
4156 "include": "#type"
4157 },
4158 {
4159 "include": "#punctuation-comma"
4160 }
4161 ]
4162 },
4163 "type-object": {
4164 "name": "meta.object.type.ts",
4165 "begin": "\\{",
4166 "beginCaptures": {
4167 "0": {
4168 "name": "punctuation.definition.block.ts"
4169 }
4170 },
4171 "end": "\\}",
4172 "endCaptures": {
4173 "0": {
4174 "name": "punctuation.definition.block.ts"
4175 }
4176 },
4177 "patterns": [
4178 {
4179 "include": "#comment"
4180 },
4181 {
4182 "include": "#method-declaration"
4183 },
4184 {
4185 "include": "#indexer-declaration"
4186 },
4187 {
4188 "include": "#indexer-mapped-type-declaration"
4189 },
4190 {
4191 "include": "#field-declaration"
4192 },
4193 {
4194 "include": "#type-annotation"
4195 },
4196 {
4197 "begin": "\\.\\.\\.",
4198 "beginCaptures": {
4199 "0": {
4200 "name": "keyword.operator.spread.ts"
4201 }
4202 },
4203 "end": "(?=\\}|;|,|$)|(?<=\\})",
4204 "patterns": [
4205 {
4206 "include": "#type"
4207 }
4208 ]
4209 },
4210 {
4211 "include": "#punctuation-comma"
4212 },
4213 {
4214 "include": "#punctuation-semicolon"
4215 },
4216 {
4217 "include": "#type"
4218 }
4219 ]
4220 },
4221 "type-conditional": {
4222 "patterns": [
4223 {
4224 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4225 "beginCaptures": {
4226 "1": {
4227 "name": "storage.modifier.ts"
4228 }
4229 },
4230 "end": "(?<=:)",
4231 "patterns": [
4232 {
4233 "begin": "\\?",
4234 "beginCaptures": {
4235 "0": {
4236 "name": "keyword.operator.ternary.ts"
4237 }
4238 },
4239 "end": ":",
4240 "endCaptures": {
4241 "0": {
4242 "name": "keyword.operator.ternary.ts"
4243 }
4244 },
4245 "patterns": [
4246 {
4247 "include": "#type"
4248 }
4249 ]
4250 },
4251 {
4252 "include": "#type"
4253 }
4254 ]
4255 }
4256 ]
4257 },
4258 "type-paren-or-function-parameters": {
4259 "name": "meta.type.paren.cover.ts",
4260 "begin": "\\(",
4261 "beginCaptures": {
4262 "0": {
4263 "name": "meta.brace.round.ts"
4264 }
4265 },
4266 "end": "\\)",
4267 "endCaptures": {
4268 "0": {
4269 "name": "meta.brace.round.ts"
4270 }
4271 },
4272 "patterns": [
4273 {
4274 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))",
4275 "captures": {
4276 "1": {
4277 "name": "storage.modifier.ts"
4278 },
4279 "2": {
4280 "name": "keyword.operator.rest.ts"
4281 },
4282 "3": {
4283 "name": "entity.name.function.ts variable.language.this.ts"
4284 },
4285 "4": {
4286 "name": "entity.name.function.ts"
4287 },
4288 "5": {
4289 "name": "keyword.operator.optional.ts"
4290 }
4291 }
4292 },
4293 {
4294 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)",
4295 "captures": {
4296 "1": {
4297 "name": "storage.modifier.ts"
4298 },
4299 "2": {
4300 "name": "keyword.operator.rest.ts"
4301 },
4302 "3": {
4303 "name": "variable.parameter.ts variable.language.this.ts"
4304 },
4305 "4": {
4306 "name": "variable.parameter.ts"
4307 },
4308 "5": {
4309 "name": "keyword.operator.optional.ts"
4310 }
4311 }
4312 },
4313 {
4314 "include": "#type-annotation"
4315 },
4316 {
4317 "name": "punctuation.separator.parameter.ts",
4318 "match": ","
4319 },
4320 {
4321 "include": "#type"
4322 }
4323 ]
4324 },
4325 "type-fn-type-parameters": {
4326 "patterns": [
4327 {
4328 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)",
4329 "beginCaptures": {
4330 "1": {
4331 "name": "meta.type.constructor.ts storage.modifier.ts"
4332 },
4333 "2": {
4334 "name": "meta.type.constructor.ts keyword.control.new.ts"
4335 }
4336 },
4337 "end": "(?<=>)",
4338 "patterns": [
4339 {
4340 "include": "#comment"
4341 },
4342 {
4343 "include": "#type-parameters"
4344 }
4345 ]
4346 },
4347 {
4348 "name": "meta.type.constructor.ts",
4349 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4350 "beginCaptures": {
4351 "1": {
4352 "name": "storage.modifier.ts"
4353 },
4354 "2": {
4355 "name": "keyword.control.new.ts"
4356 }
4357 },
4358 "end": "(?<=\\))",
4359 "patterns": [
4360 {
4361 "include": "#function-parameters"
4362 }
4363 ]
4364 },
4365 {
4366 "name": "meta.type.function.ts",
4367 "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
4368 "end": "(?<=\\))",
4369 "patterns": [
4370 {
4371 "include": "#function-parameters"
4372 }
4373 ]
4374 }
4375 ]
4376 },
4377 "type-function-return-type": {
4378 "patterns": [
4379 {
4380 "name": "meta.type.function.return.ts",
4381 "begin": "(=>)(?=\\s*\\S)",
4382 "beginCaptures": {
4383 "1": {
4384 "name": "storage.type.function.arrow.ts"
4385 }
4386 },
4387 "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)",
4388 "patterns": [
4389 {
4390 "include": "#type-function-return-type-core"
4391 }
4392 ]
4393 },
4394 {
4395 "name": "meta.type.function.return.ts",
4396 "begin": "=>",
4397 "beginCaptures": {
4398 "0": {
4399 "name": "storage.type.function.arrow.ts"
4400 }
4401 },
4402 "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4403 "patterns": [
4404 {
4405 "include": "#type-function-return-type-core"
4406 }
4407 ]
4408 }
4409 ]
4410 },
4411 "type-function-return-type-core": {
4412 "patterns": [
4413 {
4414 "include": "#comment"
4415 },
4416 {
4417 "begin": "(?<==>)(?=\\s*\\{)",
4418 "end": "(?<=\\})",
4419 "patterns": [
4420 {
4421 "include": "#type-object"
4422 }
4423 ]
4424 },
4425 {
4426 "include": "#type-predicate-operator"
4427 },
4428 {
4429 "include": "#type"
4430 }
4431 ]
4432 },
4433 "type-operators": {
4434 "patterns": [
4435 {
4436 "include": "#typeof-operator"
4437 },
4438 {
4439 "include": "#type-infer"
4440 },
4441 {
4442 "begin": "([&|])(?=\\s*\\{)",
4443 "beginCaptures": {
4444 "0": {
4445 "name": "keyword.operator.type.ts"
4446 }
4447 },
4448 "end": "(?<=\\})",
4449 "patterns": [
4450 {
4451 "include": "#type-object"
4452 }
4453 ]
4454 },
4455 {
4456 "begin": "[&|]",
4457 "beginCaptures": {
4458 "0": {
4459 "name": "keyword.operator.type.ts"
4460 }
4461 },
4462 "end": "(?=\\S)"
4463 },
4464 {
4465 "name": "keyword.operator.expression.keyof.ts",
4466 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4467 },
4468 {
4469 "name": "keyword.operator.ternary.ts",
4470 "match": "(\\?|\\:)"
4471 },
4472 {
4473 "name": "keyword.operator.expression.import.ts",
4474 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()"
4475 }
4476 ]
4477 },
4478 "type-infer": {
4479 "patterns": [
4480 {
4481 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4482 "name": "meta.type.infer.ts",
4483 "captures": {
4484 "1": {
4485 "name": "keyword.operator.expression.infer.ts"
4486 },
4487 "2": {
4488 "name": "entity.name.type.ts"
4489 },
4490 "3": {
4491 "name": "keyword.operator.expression.extends.ts"
4492 }
4493 }
4494 }
4495 ]
4496 },
4497 "type-predicate-operator": {
4498 "patterns": [
4499 {
4500 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4501 "captures": {
4502 "1": {
4503 "name": "keyword.operator.type.asserts.ts"
4504 },
4505 "2": {
4506 "name": "variable.parameter.ts variable.language.this.ts"
4507 },
4508 "3": {
4509 "name": "variable.parameter.ts"
4510 },
4511 "4": {
4512 "name": "keyword.operator.expression.is.ts"
4513 }
4514 }
4515 },
4516 {
4517 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4518 "captures": {
4519 "1": {
4520 "name": "keyword.operator.type.asserts.ts"
4521 },
4522 "2": {
4523 "name": "variable.parameter.ts variable.language.this.ts"
4524 },
4525 "3": {
4526 "name": "variable.parameter.ts"
4527 }
4528 }
4529 },
4530 {
4531 "name": "keyword.operator.type.asserts.ts",
4532 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4533 },
4534 {
4535 "name": "keyword.operator.expression.is.ts",
4536 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4537 }
4538 ]
4539 },
4540 "type-name": {
4541 "patterns": [
4542 {
4543 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)",
4544 "captures": {
4545 "1": {
4546 "name": "entity.name.type.module.ts"
4547 },
4548 "2": {
4549 "name": "punctuation.accessor.ts"
4550 },
4551 "3": {
4552 "name": "punctuation.accessor.optional.ts"
4553 },
4554 "4": {
4555 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
4556 }
4557 },
4558 "end": "(>)",
4559 "endCaptures": {
4560 "1": {
4561 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
4562 }
4563 },
4564 "contentName": "meta.type.parameters.ts",
4565 "patterns": [
4566 {
4567 "include": "#type-arguments-body"
4568 }
4569 ]
4570 },
4571 {
4572 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)",
4573 "beginCaptures": {
4574 "1": {
4575 "name": "entity.name.type.ts"
4576 },
4577 "2": {
4578 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
4579 }
4580 },
4581 "end": "(>)",
4582 "endCaptures": {
4583 "1": {
4584 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
4585 }
4586 },
4587 "contentName": "meta.type.parameters.ts",
4588 "patterns": [
4589 {
4590 "include": "#type-arguments-body"
4591 }
4592 ]
4593 },
4594 {
4595 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4596 "captures": {
4597 "1": {
4598 "name": "entity.name.type.module.ts"
4599 },
4600 "2": {
4601 "name": "punctuation.accessor.ts"
4602 },
4603 "3": {
4604 "name": "punctuation.accessor.optional.ts"
4605 }
4606 }
4607 },
4608 {
4609 "name": "entity.name.type.ts",
4610 "match": "[_$[:alpha:]][_$[:alnum:]]*"
4611 }
4612 ]
4613 },
4614 "punctuation-comma": {
4615 "name": "punctuation.separator.comma.ts",
4616 "match": ","
4617 },
4618 "punctuation-semicolon": {
4619 "name": "punctuation.terminator.statement.ts",
4620 "match": ";"
4621 },
4622 "punctuation-accessor": {
4623 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4624 "captures": {
4625 "1": {
4626 "name": "punctuation.accessor.ts"
4627 },
4628 "2": {
4629 "name": "punctuation.accessor.optional.ts"
4630 }
4631 }
4632 },
4633 "string": {
4634 "patterns": [
4635 {
4636 "include": "#qstring-single"
4637 },
4638 {
4639 "include": "#qstring-double"
4640 },
4641 {
4642 "include": "#template"
4643 }
4644 ]
4645 },
4646 "qstring-double": {
4647 "name": "string.quoted.double.ts",
4648 "begin": "\"",
4649 "beginCaptures": {
4650 "0": {
4651 "name": "punctuation.definition.string.begin.ts"
4652 }
4653 },
4654 "end": "(\")|((?:[^\\\\\\n])$)",
4655 "endCaptures": {
4656 "1": {
4657 "name": "punctuation.definition.string.end.ts"
4658 },
4659 "2": {
4660 "name": "invalid.illegal.newline.ts"
4661 }
4662 },
4663 "patterns": [
4664 {
4665 "include": "#string-character-escape"
4666 }
4667 ]
4668 },
4669 "qstring-single": {
4670 "name": "string.quoted.single.ts",
4671 "begin": "'",
4672 "beginCaptures": {
4673 "0": {
4674 "name": "punctuation.definition.string.begin.ts"
4675 }
4676 },
4677 "end": "(\\')|((?:[^\\\\\\n])$)",
4678 "endCaptures": {
4679 "1": {
4680 "name": "punctuation.definition.string.end.ts"
4681 },
4682 "2": {
4683 "name": "invalid.illegal.newline.ts"
4684 }
4685 },
4686 "patterns": [
4687 {
4688 "include": "#string-character-escape"
4689 }
4690 ]
4691 },
4692 "string-character-escape": {
4693 "name": "constant.character.escape.ts",
4694 "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
4695 },
4696 "template": {
4697 "patterns": [
4698 {
4699 "include": "#template-call"
4700 },
4701 {
4702 "name": "string.template.ts",
4703 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4704 "beginCaptures": {
4705 "1": {
4706 "name": "entity.name.function.tagged-template.ts"
4707 },
4708 "2": {
4709 "name": "punctuation.definition.string.template.begin.ts"
4710 }
4711 },
4712 "end": "`",
4713 "endCaptures": {
4714 "0": {
4715 "name": "punctuation.definition.string.template.end.ts"
4716 }
4717 },
4718 "patterns": [
4719 {
4720 "include": "#template-substitution-element"
4721 },
4722 {
4723 "include": "#string-character-escape"
4724 }
4725 ]
4726 }
4727 ]
4728 },
4729 "template-call": {
4730 "patterns": [
4731 {
4732 "name": "string.template.ts",
4733 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)",
4734 "end": "(?=`)",
4735 "patterns": [
4736 {
4737 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
4738 "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)",
4739 "patterns": [
4740 {
4741 "include": "#support-function-call-identifiers"
4742 },
4743 {
4744 "name": "entity.name.function.tagged-template.ts",
4745 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
4746 }
4747 ]
4748 },
4749 {
4750 "include": "#type-arguments"
4751 }
4752 ]
4753 },
4754 {
4755 "name": "string.template.ts",
4756 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)`)",
4757 "beginCaptures": {
4758 "1": {
4759 "name": "entity.name.function.tagged-template.ts"
4760 }
4761 },
4762 "end": "(?=`)",
4763 "patterns": [
4764 {
4765 "include": "#type-arguments"
4766 }
4767 ]
4768 }
4769 ]
4770 },
4771 "template-substitution-element": {
4772 "name": "meta.template.expression.ts",
4773 "begin": "\\$\\{",
4774 "beginCaptures": {
4775 "0": {
4776 "name": "punctuation.definition.template-expression.begin.ts"
4777 }
4778 },
4779 "end": "\\}",
4780 "endCaptures": {
4781 "0": {
4782 "name": "punctuation.definition.template-expression.end.ts"
4783 }
4784 },
4785 "patterns": [
4786 {
4787 "include": "#expression"
4788 }
4789 ],
4790 "contentName": "meta.embedded.line.ts"
4791 },
4792 "type-string": {
4793 "patterns": [
4794 {
4795 "include": "#qstring-single"
4796 },
4797 {
4798 "include": "#qstring-double"
4799 },
4800 {
4801 "include": "#template-type"
4802 }
4803 ]
4804 },
4805 "template-type": {
4806 "patterns": [
4807 {
4808 "include": "#template-call"
4809 },
4810 {
4811 "name": "string.template.ts",
4812 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4813 "beginCaptures": {
4814 "1": {
4815 "name": "entity.name.function.tagged-template.ts"
4816 },
4817 "2": {
4818 "name": "punctuation.definition.string.template.begin.ts"
4819 }
4820 },
4821 "end": "`",
4822 "endCaptures": {
4823 "0": {
4824 "name": "punctuation.definition.string.template.end.ts"
4825 }
4826 },
4827 "patterns": [
4828 {
4829 "include": "#template-type-substitution-element"
4830 },
4831 {
4832 "include": "#string-character-escape"
4833 }
4834 ]
4835 }
4836 ]
4837 },
4838 "template-type-substitution-element": {
4839 "name": "meta.template.expression.ts",
4840 "begin": "\\$\\{",
4841 "beginCaptures": {
4842 "0": {
4843 "name": "punctuation.definition.template-expression.begin.ts"
4844 }
4845 },
4846 "end": "\\}",
4847 "endCaptures": {
4848 "0": {
4849 "name": "punctuation.definition.template-expression.end.ts"
4850 }
4851 },
4852 "patterns": [
4853 {
4854 "include": "#type"
4855 }
4856 ],
4857 "contentName": "meta.embedded.line.ts"
4858 },
4859 "regex": {
4860 "patterns": [
4861 {
4862 "name": "string.regexp.ts",
4863 "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4864 "beginCaptures": {
4865 "1": {
4866 "name": "punctuation.definition.string.begin.ts"
4867 }
4868 },
4869 "end": "(/)([dgimsuy]*)",
4870 "endCaptures": {
4871 "1": {
4872 "name": "punctuation.definition.string.end.ts"
4873 },
4874 "2": {
4875 "name": "keyword.other.ts"
4876 }
4877 },
4878 "patterns": [
4879 {
4880 "include": "#regexp"
4881 }
4882 ]
4883 },
4884 {
4885 "name": "string.regexp.ts",
4886 "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4887 "beginCaptures": {
4888 "0": {
4889 "name": "punctuation.definition.string.begin.ts"
4890 }
4891 },
4892 "end": "(/)([dgimsuy]*)",
4893 "endCaptures": {
4894 "1": {
4895 "name": "punctuation.definition.string.end.ts"
4896 },
4897 "2": {
4898 "name": "keyword.other.ts"
4899 }
4900 },
4901 "patterns": [
4902 {
4903 "include": "#regexp"
4904 }
4905 ]
4906 }
4907 ]
4908 },
4909 "regexp": {
4910 "patterns": [
4911 {
4912 "name": "keyword.control.anchor.regexp",
4913 "match": "\\\\[bB]|\\^|\\$"
4914 },
4915 {
4916 "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
4917 "captures": {
4918 "0": {
4919 "name": "keyword.other.back-reference.regexp"
4920 },
4921 "1": {
4922 "name": "variable.other.regexp"
4923 }
4924 }
4925 },
4926 {
4927 "name": "keyword.operator.quantifier.regexp",
4928 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
4929 },
4930 {
4931 "name": "keyword.operator.or.regexp",
4932 "match": "\\|"
4933 },
4934 {
4935 "name": "meta.group.assertion.regexp",
4936 "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4937 "beginCaptures": {
4938 "1": {
4939 "name": "punctuation.definition.group.regexp"
4940 },
4941 "2": {
4942 "name": "punctuation.definition.group.assertion.regexp"
4943 },
4944 "3": {
4945 "name": "meta.assertion.look-ahead.regexp"
4946 },
4947 "4": {
4948 "name": "meta.assertion.negative-look-ahead.regexp"
4949 },
4950 "5": {
4951 "name": "meta.assertion.look-behind.regexp"
4952 },
4953 "6": {
4954 "name": "meta.assertion.negative-look-behind.regexp"
4955 }
4956 },
4957 "end": "(\\))",
4958 "endCaptures": {
4959 "1": {
4960 "name": "punctuation.definition.group.regexp"
4961 }
4962 },
4963 "patterns": [
4964 {
4965 "include": "#regexp"
4966 }
4967 ]
4968 },
4969 {
4970 "name": "meta.group.regexp",
4971 "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
4972 "beginCaptures": {
4973 "0": {
4974 "name": "punctuation.definition.group.regexp"
4975 },
4976 "1": {
4977 "name": "punctuation.definition.group.no-capture.regexp"
4978 },
4979 "2": {
4980 "name": "variable.other.regexp"
4981 }
4982 },
4983 "end": "\\)",
4984 "endCaptures": {
4985 "0": {
4986 "name": "punctuation.definition.group.regexp"
4987 }
4988 },
4989 "patterns": [
4990 {
4991 "include": "#regexp"
4992 }
4993 ]
4994 },
4995 {
4996 "name": "constant.other.character-class.set.regexp",
4997 "begin": "(\\[)(\\^)?",
4998 "beginCaptures": {
4999 "1": {
5000 "name": "punctuation.definition.character-class.regexp"
5001 },
5002 "2": {
5003 "name": "keyword.operator.negation.regexp"
5004 }
5005 },
5006 "end": "(\\])",
5007 "endCaptures": {
5008 "1": {
5009 "name": "punctuation.definition.character-class.regexp"
5010 }
5011 },
5012 "patterns": [
5013 {
5014 "name": "constant.other.character-class.range.regexp",
5015 "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))",
5016 "captures": {
5017 "1": {
5018 "name": "constant.character.numeric.regexp"
5019 },
5020 "2": {
5021 "name": "constant.character.control.regexp"
5022 },
5023 "3": {
5024 "name": "constant.character.escape.backslash.regexp"
5025 },
5026 "4": {
5027 "name": "constant.character.numeric.regexp"
5028 },
5029 "5": {
5030 "name": "constant.character.control.regexp"
5031 },
5032 "6": {
5033 "name": "constant.character.escape.backslash.regexp"
5034 }
5035 }
5036 },
5037 {
5038 "include": "#regex-character-class"
5039 }
5040 ]
5041 },
5042 {
5043 "include": "#regex-character-class"
5044 }
5045 ]
5046 },
5047 "regex-character-class": {
5048 "patterns": [
5049 {
5050 "name": "constant.other.character-class.regexp",
5051 "match": "\\\\[wWsSdDtrnvf]|\\."
5052 },
5053 {
5054 "name": "constant.character.numeric.regexp",
5055 "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
5056 },
5057 {
5058 "name": "constant.character.control.regexp",
5059 "match": "\\\\c[A-Z]"
5060 },
5061 {
5062 "name": "constant.character.escape.backslash.regexp",
5063 "match": "\\\\."
5064 }
5065 ]
5066 },
5067 "comment": {
5068 "patterns": [
5069 {
5070 "name": "comment.block.documentation.ts",
5071 "begin": "/\\*\\*(?!/)",
5072 "beginCaptures": {
5073 "0": {
5074 "name": "punctuation.definition.comment.ts"
5075 }
5076 },
5077 "end": "\\*/",
5078 "endCaptures": {
5079 "0": {
5080 "name": "punctuation.definition.comment.ts"
5081 }
5082 },
5083 "patterns": [
5084 {
5085 "include": "#docblock"
5086 }
5087 ]
5088 },
5089 {
5090 "name": "comment.block.ts",
5091 "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
5092 "beginCaptures": {
5093 "1": {
5094 "name": "punctuation.definition.comment.ts"
5095 },
5096 "2": {
5097 "name": "storage.type.internaldeclaration.ts"
5098 },
5099 "3": {
5100 "name": "punctuation.decorator.internaldeclaration.ts"
5101 }
5102 },
5103 "end": "\\*/",
5104 "endCaptures": {
5105 "0": {
5106 "name": "punctuation.definition.comment.ts"
5107 }
5108 }
5109 },
5110 {
5111 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5112 "beginCaptures": {
5113 "1": {
5114 "name": "punctuation.whitespace.comment.leading.ts"
5115 },
5116 "2": {
5117 "name": "comment.line.double-slash.ts"
5118 },
5119 "3": {
5120 "name": "punctuation.definition.comment.ts"
5121 },
5122 "4": {
5123 "name": "storage.type.internaldeclaration.ts"
5124 },
5125 "5": {
5126 "name": "punctuation.decorator.internaldeclaration.ts"
5127 }
5128 },
5129 "end": "(?=$)",
5130 "contentName": "comment.line.double-slash.ts"
5131 }
5132 ]
5133 },
5134 "single-line-comment-consuming-line-ending": {
5135 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5136 "beginCaptures": {
5137 "1": {
5138 "name": "punctuation.whitespace.comment.leading.ts"
5139 },
5140 "2": {
5141 "name": "comment.line.double-slash.ts"
5142 },
5143 "3": {
5144 "name": "punctuation.definition.comment.ts"
5145 },
5146 "4": {
5147 "name": "storage.type.internaldeclaration.ts"
5148 },
5149 "5": {
5150 "name": "punctuation.decorator.internaldeclaration.ts"
5151 }
5152 },
5153 "end": "(?=^)",
5154 "contentName": "comment.line.double-slash.ts"
5155 },
5156 "directives": {
5157 "name": "comment.line.triple-slash.directive.ts",
5158 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
5159 "beginCaptures": {
5160 "1": {
5161 "name": "punctuation.definition.comment.ts"
5162 }
5163 },
5164 "end": "(?=$)",
5165 "patterns": [
5166 {
5167 "name": "meta.tag.ts",
5168 "begin": "(<)(reference|amd-dependency|amd-module)",
5169 "beginCaptures": {
5170 "1": {
5171 "name": "punctuation.definition.tag.directive.ts"
5172 },
5173 "2": {
5174 "name": "entity.name.tag.directive.ts"
5175 }
5176 },
5177 "end": "/>",
5178 "endCaptures": {
5179 "0": {
5180 "name": "punctuation.definition.tag.directive.ts"
5181 }
5182 },
5183 "patterns": [
5184 {
5185 "name": "entity.other.attribute-name.directive.ts",
5186 "match": "path|types|no-default-lib|lib|name|resolution-mode"
5187 },
5188 {
5189 "name": "keyword.operator.assignment.ts",
5190 "match": "="
5191 },
5192 {
5193 "include": "#string"
5194 }
5195 ]
5196 }
5197 ]
5198 },
5199 "docblock": {
5200 "patterns": [
5201 {
5202 "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
5203 "captures": {
5204 "1": {
5205 "name": "storage.type.class.jsdoc"
5206 },
5207 "2": {
5208 "name": "punctuation.definition.block.tag.jsdoc"
5209 },
5210 "3": {
5211 "name": "constant.language.access-type.jsdoc"
5212 }
5213 }
5214 },
5215 {
5216 "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
5217 "captures": {
5218 "1": {
5219 "name": "storage.type.class.jsdoc"
5220 },
5221 "2": {
5222 "name": "punctuation.definition.block.tag.jsdoc"
5223 },
5224 "3": {
5225 "name": "entity.name.type.instance.jsdoc"
5226 },
5227 "4": {
5228 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5229 },
5230 "5": {
5231 "name": "constant.other.email.link.underline.jsdoc"
5232 },
5233 "6": {
5234 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5235 }
5236 }
5237 },
5238 {
5239 "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
5240 "captures": {
5241 "1": {
5242 "name": "storage.type.class.jsdoc"
5243 },
5244 "2": {
5245 "name": "punctuation.definition.block.tag.jsdoc"
5246 },
5247 "3": {
5248 "name": "entity.name.type.instance.jsdoc"
5249 },
5250 "4": {
5251 "name": "keyword.operator.control.jsdoc"
5252 },
5253 "5": {
5254 "name": "entity.name.type.instance.jsdoc"
5255 }
5256 }
5257 },
5258 {
5259 "name": "meta.example.jsdoc",
5260 "begin": "((@)example)\\s+",
5261 "end": "(?=@|\\*/)",
5262 "beginCaptures": {
5263 "1": {
5264 "name": "storage.type.class.jsdoc"
5265 },
5266 "2": {
5267 "name": "punctuation.definition.block.tag.jsdoc"
5268 }
5269 },
5270 "patterns": [
5271 {
5272 "match": "^\\s\\*\\s+"
5273 },
5274 {
5275 "contentName": "constant.other.description.jsdoc",
5276 "begin": "\\G(<)caption(>)",
5277 "beginCaptures": {
5278 "0": {
5279 "name": "entity.name.tag.inline.jsdoc"
5280 },
5281 "1": {
5282 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5283 },
5284 "2": {
5285 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5286 }
5287 },
5288 "end": "(</)caption(>)|(?=\\*/)",
5289 "endCaptures": {
5290 "0": {
5291 "name": "entity.name.tag.inline.jsdoc"
5292 },
5293 "1": {
5294 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5295 },
5296 "2": {
5297 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5298 }
5299 }
5300 },
5301 {
5302 "match": "[^\\s@*](?:[^*]|\\*[^/])*",
5303 "captures": {
5304 "0": {
5305 "name": "source.embedded.ts"
5306 }
5307 }
5308 }
5309 ]
5310 },
5311 {
5312 "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
5313 "captures": {
5314 "1": {
5315 "name": "storage.type.class.jsdoc"
5316 },
5317 "2": {
5318 "name": "punctuation.definition.block.tag.jsdoc"
5319 },
5320 "3": {
5321 "name": "constant.language.symbol-type.jsdoc"
5322 }
5323 }
5324 },
5325 {
5326 "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
5327 "captures": {
5328 "1": {
5329 "name": "storage.type.class.jsdoc"
5330 },
5331 "2": {
5332 "name": "punctuation.definition.block.tag.jsdoc"
5333 },
5334 "3": {
5335 "name": "variable.other.link.underline.jsdoc"
5336 },
5337 "4": {
5338 "name": "entity.name.type.instance.jsdoc"
5339 }
5340 }
5341 },
5342 {
5343 "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)",
5344 "captures": {
5345 "1": {
5346 "name": "storage.type.class.jsdoc"
5347 },
5348 "2": {
5349 "name": "punctuation.definition.block.tag.jsdoc"
5350 },
5351 "3": {
5352 "name": "variable.other.jsdoc"
5353 }
5354 }
5355 },
5356 {
5357 "begin": "(?x)((@)template)\\s+(?={)",
5358 "beginCaptures": {
5359 "1": {
5360 "name": "storage.type.class.jsdoc"
5361 },
5362 "2": {
5363 "name": "punctuation.definition.block.tag.jsdoc"
5364 }
5365 },
5366 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5367 "patterns": [
5368 {
5369 "include": "#jsdoctype"
5370 },
5371 {
5372 "name": "variable.other.jsdoc",
5373 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5374 }
5375 ]
5376 },
5377 {
5378 "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
5379 "captures": {
5380 "1": {
5381 "name": "storage.type.class.jsdoc"
5382 },
5383 "2": {
5384 "name": "punctuation.definition.block.tag.jsdoc"
5385 },
5386 "3": {
5387 "name": "variable.other.jsdoc"
5388 }
5389 }
5390 },
5391 {
5392 "begin": "((@)typedef)\\s+(?={)",
5393 "beginCaptures": {
5394 "1": {
5395 "name": "storage.type.class.jsdoc"
5396 },
5397 "2": {
5398 "name": "punctuation.definition.block.tag.jsdoc"
5399 }
5400 },
5401 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5402 "patterns": [
5403 {
5404 "include": "#jsdoctype"
5405 },
5406 {
5407 "name": "entity.name.type.instance.jsdoc",
5408 "match": "(?:[^@\\s*/]|\\*[^/])+"
5409 }
5410 ]
5411 },
5412 {
5413 "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
5414 "beginCaptures": {
5415 "1": {
5416 "name": "storage.type.class.jsdoc"
5417 },
5418 "2": {
5419 "name": "punctuation.definition.block.tag.jsdoc"
5420 }
5421 },
5422 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5423 "patterns": [
5424 {
5425 "include": "#jsdoctype"
5426 },
5427 {
5428 "name": "variable.other.jsdoc",
5429 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5430 },
5431 {
5432 "name": "variable.other.jsdoc",
5433 "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
5434 "captures": {
5435 "1": {
5436 "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
5437 },
5438 "2": {
5439 "name": "keyword.operator.assignment.jsdoc"
5440 },
5441 "3": {
5442 "name": "source.embedded.ts"
5443 },
5444 "4": {
5445 "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
5446 },
5447 "5": {
5448 "name": "invalid.illegal.syntax.jsdoc"
5449 }
5450 }
5451 }
5452 ]
5453 },
5454 {
5455 "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)",
5456 "beginCaptures": {
5457 "1": {
5458 "name": "storage.type.class.jsdoc"
5459 },
5460 "2": {
5461 "name": "punctuation.definition.block.tag.jsdoc"
5462 }
5463 },
5464 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5465 "patterns": [
5466 {
5467 "include": "#jsdoctype"
5468 }
5469 ]
5470 },
5471 {
5472 "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
5473 "captures": {
5474 "1": {
5475 "name": "storage.type.class.jsdoc"
5476 },
5477 "2": {
5478 "name": "punctuation.definition.block.tag.jsdoc"
5479 },
5480 "3": {
5481 "name": "entity.name.type.instance.jsdoc"
5482 }
5483 }
5484 },
5485 {
5486 "contentName": "variable.other.jsdoc",
5487 "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
5488 "beginCaptures": {
5489 "1": {
5490 "name": "storage.type.class.jsdoc"
5491 },
5492 "2": {
5493 "name": "punctuation.definition.block.tag.jsdoc"
5494 },
5495 "3": {
5496 "name": "variable.other.jsdoc"
5497 },
5498 "4": {
5499 "name": "punctuation.definition.string.begin.jsdoc"
5500 }
5501 },
5502 "end": "(\\3)|(?=$|\\*/)",
5503 "endCaptures": {
5504 "0": {
5505 "name": "variable.other.jsdoc"
5506 },
5507 "1": {
5508 "name": "punctuation.definition.string.end.jsdoc"
5509 }
5510 }
5511 },
5512 {
5513 "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
5514 "captures": {
5515 "1": {
5516 "name": "storage.type.class.jsdoc"
5517 },
5518 "2": {
5519 "name": "punctuation.definition.block.tag.jsdoc"
5520 },
5521 "3": {
5522 "name": "variable.other.jsdoc"
5523 }
5524 }
5525 },
5526 {
5527 "name": "storage.type.class.jsdoc",
5528 "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b",
5529 "captures": {
5530 "1": {
5531 "name": "punctuation.definition.block.tag.jsdoc"
5532 }
5533 }
5534 },
5535 {
5536 "include": "#inline-tags"
5537 },
5538 {
5539 "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)",
5540 "captures": {
5541 "1": {
5542 "name": "storage.type.class.jsdoc"
5543 },
5544 "2": {
5545 "name": "punctuation.definition.block.tag.jsdoc"
5546 }
5547 }
5548 }
5549 ]
5550 },
5551 "brackets": {
5552 "patterns": [
5553 {
5554 "begin": "{",
5555 "end": "}|(?=\\*/)",
5556 "patterns": [
5557 {
5558 "include": "#brackets"
5559 }
5560 ]
5561 },
5562 {
5563 "begin": "\\[",
5564 "end": "\\]|(?=\\*/)",
5565 "patterns": [
5566 {
5567 "include": "#brackets"
5568 }
5569 ]
5570 }
5571 ]
5572 },
5573 "inline-tags": {
5574 "patterns": [
5575 {
5576 "name": "constant.other.description.jsdoc",
5577 "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
5578 "captures": {
5579 "1": {
5580 "name": "punctuation.definition.bracket.square.begin.jsdoc"
5581 },
5582 "2": {
5583 "name": "punctuation.definition.bracket.square.end.jsdoc"
5584 }
5585 }
5586 },
5587 {
5588 "name": "entity.name.type.instance.jsdoc",
5589 "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
5590 "beginCaptures": {
5591 "1": {
5592 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5593 },
5594 "2": {
5595 "name": "storage.type.class.jsdoc"
5596 },
5597 "3": {
5598 "name": "punctuation.definition.inline.tag.jsdoc"
5599 }
5600 },
5601 "end": "}|(?=\\*/)",
5602 "endCaptures": {
5603 "0": {
5604 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5605 }
5606 },
5607 "patterns": [
5608 {
5609 "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
5610 "captures": {
5611 "1": {
5612 "name": "variable.other.link.underline.jsdoc"
5613 },
5614 "2": {
5615 "name": "punctuation.separator.pipe.jsdoc"
5616 }
5617 }
5618 },
5619 {
5620 "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
5621 "captures": {
5622 "1": {
5623 "name": "variable.other.description.jsdoc"
5624 },
5625 "2": {
5626 "name": "punctuation.separator.pipe.jsdoc"
5627 }
5628 }
5629 }
5630 ]
5631 }
5632 ]
5633 },
5634 "jsdoctype": {
5635 "patterns": [
5636 {
5637 "contentName": "entity.name.type.instance.jsdoc",
5638 "begin": "\\G({)",
5639 "beginCaptures": {
5640 "0": {
5641 "name": "entity.name.type.instance.jsdoc"
5642 },
5643 "1": {
5644 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5645 }
5646 },
5647 "end": "((}))\\s*|(?=\\*/)",
5648 "endCaptures": {
5649 "1": {
5650 "name": "entity.name.type.instance.jsdoc"
5651 },
5652 "2": {
5653 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5654 }
5655 },
5656 "patterns": [
5657 {
5658 "include": "#brackets"
5659 }
5660 ]
5661 }
5662 ]
5663 }
5664 }
5665 }
5666