PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.5.0
Code Block Pro – Beautiful Syntax Highlighting v1.5.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.5.0, at build/shiki/languages/typescript.tmLanguage.json

5,660 lines 241.8 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/0dfae8cc4807fecfbf8f1add095d9817df824c95",
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:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(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)\\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\\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)\\s+",
2779 "beginCaptures": {
2780 "1": {
2781 "name": "keyword.control.as.ts"
2782 }
2783 },
2784 "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+))",
2785 "patterns": [
2786 {
2787 "include": "#type"
2788 }
2789 ]
2790 },
2791 {
2792 "name": "meta.object.member.ts",
2793 "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
2794 "end": "(?=,|\\}|$|\\/\\/|\\/\\*)",
2795 "patterns": [
2796 {
2797 "include": "#expression"
2798 }
2799 ]
2800 },
2801 {
2802 "name": "meta.object.member.ts",
2803 "begin": ":",
2804 "beginCaptures": {
2805 "0": {
2806 "name": "meta.object-literal.key.ts punctuation.separator.key-value.ts"
2807 }
2808 },
2809 "end": "(?=,|\\})",
2810 "patterns": [
2811 {
2812 "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2813 "beginCaptures": {
2814 "1": {
2815 "name": "storage.modifier.async.ts"
2816 }
2817 },
2818 "end": "(?<=\\))",
2819 "patterns": [
2820 {
2821 "include": "#type-parameters"
2822 },
2823 {
2824 "begin": "\\(",
2825 "beginCaptures": {
2826 "0": {
2827 "name": "meta.brace.round.ts"
2828 }
2829 },
2830 "end": "\\)",
2831 "endCaptures": {
2832 "0": {
2833 "name": "meta.brace.round.ts"
2834 }
2835 },
2836 "patterns": [
2837 {
2838 "include": "#expression-inside-possibly-arrow-parens"
2839 }
2840 ]
2841 }
2842 ]
2843 },
2844 {
2845 "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2846 "beginCaptures": {
2847 "1": {
2848 "name": "storage.modifier.async.ts"
2849 },
2850 "2": {
2851 "name": "meta.brace.round.ts"
2852 }
2853 },
2854 "end": "\\)",
2855 "endCaptures": {
2856 "0": {
2857 "name": "meta.brace.round.ts"
2858 }
2859 },
2860 "patterns": [
2861 {
2862 "include": "#expression-inside-possibly-arrow-parens"
2863 }
2864 ]
2865 },
2866 {
2867 "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2868 "beginCaptures": {
2869 "1": {
2870 "name": "storage.modifier.async.ts"
2871 }
2872 },
2873 "end": "(?<=\\>)",
2874 "patterns": [
2875 {
2876 "include": "#type-parameters"
2877 }
2878 ]
2879 },
2880 {
2881 "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2882 "beginCaptures": {
2883 "1": {
2884 "name": "meta.brace.round.ts"
2885 }
2886 },
2887 "end": "\\)",
2888 "endCaptures": {
2889 "0": {
2890 "name": "meta.brace.round.ts"
2891 }
2892 },
2893 "patterns": [
2894 {
2895 "include": "#expression-inside-possibly-arrow-parens"
2896 }
2897 ]
2898 },
2899 {
2900 "include": "#possibly-arrow-return-type"
2901 },
2902 {
2903 "include": "#expression"
2904 }
2905 ]
2906 },
2907 {
2908 "include": "#punctuation-comma"
2909 }
2910 ]
2911 },
2912 "ternary-expression": {
2913 "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)",
2914 "beginCaptures": {
2915 "1": {
2916 "name": "keyword.operator.ternary.ts"
2917 }
2918 },
2919 "end": "\\s*(:)",
2920 "endCaptures": {
2921 "1": {
2922 "name": "keyword.operator.ternary.ts"
2923 }
2924 },
2925 "patterns": [
2926 {
2927 "include": "#expression"
2928 }
2929 ]
2930 },
2931 "function-call": {
2932 "patterns": [
2933 {
2934 "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*)?\\())",
2935 "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*)?\\())",
2936 "patterns": [
2937 {
2938 "name": "meta.function-call.ts",
2939 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
2940 "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*)?\\())",
2941 "patterns": [
2942 {
2943 "include": "#function-call-target"
2944 }
2945 ]
2946 },
2947 {
2948 "include": "#comment"
2949 },
2950 {
2951 "include": "#function-call-optionals"
2952 },
2953 {
2954 "include": "#type-arguments"
2955 },
2956 {
2957 "include": "#paren-expression"
2958 }
2959 ]
2960 },
2961 {
2962 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
2963 "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
2964 "patterns": [
2965 {
2966 "name": "meta.function-call.ts",
2967 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
2968 "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))",
2969 "patterns": [
2970 {
2971 "include": "#function-call-target"
2972 }
2973 ]
2974 },
2975 {
2976 "include": "#comment"
2977 },
2978 {
2979 "include": "#function-call-optionals"
2980 },
2981 {
2982 "include": "#type-arguments"
2983 }
2984 ]
2985 }
2986 ]
2987 },
2988 "function-call-target": {
2989 "patterns": [
2990 {
2991 "include": "#support-function-call-identifiers"
2992 },
2993 {
2994 "name": "entity.name.function.ts",
2995 "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)"
2996 }
2997 ]
2998 },
2999 "function-call-optionals": {
3000 "patterns": [
3001 {
3002 "name": "meta.function-call.ts punctuation.accessor.optional.ts",
3003 "match": "\\?\\."
3004 },
3005 {
3006 "name": "meta.function-call.ts keyword.operator.definiteassignment.ts",
3007 "match": "\\!"
3008 }
3009 ]
3010 },
3011 "support-function-call-identifiers": {
3012 "patterns": [
3013 {
3014 "include": "#literal"
3015 },
3016 {
3017 "include": "#support-objects"
3018 },
3019 {
3020 "include": "#object-identifiers"
3021 },
3022 {
3023 "include": "#punctuation-accessor"
3024 },
3025 {
3026 "name": "keyword.operator.expression.import.ts",
3027 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))"
3028 }
3029 ]
3030 },
3031 "new-expr": {
3032 "name": "new.expr.ts",
3033 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3034 "beginCaptures": {
3035 "1": {
3036 "name": "keyword.operator.new.ts"
3037 }
3038 },
3039 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3040 "patterns": [
3041 {
3042 "include": "#expression"
3043 }
3044 ]
3045 },
3046 "instanceof-expr": {
3047 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3048 "beginCaptures": {
3049 "1": {
3050 "name": "keyword.operator.expression.instanceof.ts"
3051 }
3052 },
3053 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3054 "patterns": [
3055 {
3056 "include": "#type"
3057 }
3058 ]
3059 },
3060 "paren-expression-possibly-arrow": {
3061 "patterns": [
3062 {
3063 "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
3064 "beginCaptures": {
3065 "1": {
3066 "name": "storage.modifier.async.ts"
3067 }
3068 },
3069 "end": "(?<=\\))",
3070 "patterns": [
3071 {
3072 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3073 }
3074 ]
3075 },
3076 {
3077 "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<))\\s*$)",
3078 "beginCaptures": {
3079 "1": {
3080 "name": "storage.modifier.async.ts"
3081 }
3082 },
3083 "end": "(?<=\\))",
3084 "patterns": [
3085 {
3086 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3087 }
3088 ]
3089 },
3090 {
3091 "include": "#possibly-arrow-return-type"
3092 }
3093 ]
3094 },
3095 "paren-expression-possibly-arrow-with-typeparameters": {
3096 "patterns": [
3097 {
3098 "include": "#type-parameters"
3099 },
3100 {
3101 "begin": "\\(",
3102 "beginCaptures": {
3103 "0": {
3104 "name": "meta.brace.round.ts"
3105 }
3106 },
3107 "end": "\\)",
3108 "endCaptures": {
3109 "0": {
3110 "name": "meta.brace.round.ts"
3111 }
3112 },
3113 "patterns": [
3114 {
3115 "include": "#expression-inside-possibly-arrow-parens"
3116 }
3117 ]
3118 }
3119 ]
3120 },
3121 "expression-inside-possibly-arrow-parens": {
3122 "patterns": [
3123 {
3124 "include": "#expressionWithoutIdentifiers"
3125 },
3126 {
3127 "include": "#comment"
3128 },
3129 {
3130 "include": "#string"
3131 },
3132 {
3133 "include": "#decorator"
3134 },
3135 {
3136 "include": "#destructuring-parameter"
3137 },
3138 {
3139 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
3140 "captures": {
3141 "1": {
3142 "name": "storage.modifier.ts"
3143 }
3144 }
3145 },
3146 {
3147 "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)))",
3148 "captures": {
3149 "1": {
3150 "name": "storage.modifier.ts"
3151 },
3152 "2": {
3153 "name": "keyword.operator.rest.ts"
3154 },
3155 "3": {
3156 "name": "entity.name.function.ts variable.language.this.ts"
3157 },
3158 "4": {
3159 "name": "entity.name.function.ts"
3160 },
3161 "5": {
3162 "name": "keyword.operator.optional.ts"
3163 }
3164 }
3165 },
3166 {
3167 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)",
3168 "captures": {
3169 "1": {
3170 "name": "storage.modifier.ts"
3171 },
3172 "2": {
3173 "name": "keyword.operator.rest.ts"
3174 },
3175 "3": {
3176 "name": "variable.parameter.ts variable.language.this.ts"
3177 },
3178 "4": {
3179 "name": "variable.parameter.ts"
3180 },
3181 "5": {
3182 "name": "keyword.operator.optional.ts"
3183 }
3184 }
3185 },
3186 {
3187 "include": "#type-annotation"
3188 },
3189 {
3190 "include": "#variable-initializer"
3191 },
3192 {
3193 "name": "punctuation.separator.parameter.ts",
3194 "match": ","
3195 },
3196 {
3197 "include": "#identifiers"
3198 },
3199 {
3200 "include": "#expressionPunctuations"
3201 }
3202 ]
3203 },
3204 "paren-expression": {
3205 "begin": "\\(",
3206 "beginCaptures": {
3207 "0": {
3208 "name": "meta.brace.round.ts"
3209 }
3210 },
3211 "end": "\\)",
3212 "endCaptures": {
3213 "0": {
3214 "name": "meta.brace.round.ts"
3215 }
3216 },
3217 "patterns": [
3218 {
3219 "include": "#expression"
3220 }
3221 ]
3222 },
3223 "cast": {
3224 "patterns": [
3225 {
3226 "name": "cast.expr.ts",
3227 "match": "\\s*(<)\\s*(const)\\s*(>)",
3228 "captures": {
3229 "1": {
3230 "name": "meta.brace.angle.ts"
3231 },
3232 "2": {
3233 "name": "storage.modifier.ts"
3234 },
3235 "3": {
3236 "name": "meta.brace.angle.ts"
3237 }
3238 }
3239 },
3240 {
3241 "name": "cast.expr.ts",
3242 "begin": "(?:(?<!\\+\\+|--)(?<=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:>*?\\&\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(<)(?!<?\\=)(?!\\s*$)",
3243 "beginCaptures": {
3244 "1": {
3245 "name": "meta.brace.angle.ts"
3246 }
3247 },
3248 "end": "(\\>)",
3249 "endCaptures": {
3250 "1": {
3251 "name": "meta.brace.angle.ts"
3252 }
3253 },
3254 "patterns": [
3255 {
3256 "include": "#type"
3257 }
3258 ]
3259 },
3260 {
3261 "name": "cast.expr.ts",
3262 "begin": "(?:(?<=^))\\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\\s*>)",
3263 "beginCaptures": {
3264 "1": {
3265 "name": "meta.brace.angle.ts"
3266 }
3267 },
3268 "end": "(\\>)",
3269 "endCaptures": {
3270 "1": {
3271 "name": "meta.brace.angle.ts"
3272 }
3273 },
3274 "patterns": [
3275 {
3276 "include": "#type"
3277 }
3278 ]
3279 }
3280 ]
3281 },
3282 "expression-operators": {
3283 "patterns": [
3284 {
3285 "name": "keyword.control.flow.ts",
3286 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3287 },
3288 {
3289 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)",
3290 "beginCaptures": {
3291 "1": {
3292 "name": "keyword.control.flow.ts"
3293 }
3294 },
3295 "end": "\\*",
3296 "endCaptures": {
3297 "0": {
3298 "name": "keyword.generator.asterisk.ts"
3299 }
3300 },
3301 "patterns": [
3302 {
3303 "include": "#comment"
3304 }
3305 ]
3306 },
3307 {
3308 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?",
3309 "captures": {
3310 "1": {
3311 "name": "keyword.control.flow.ts"
3312 },
3313 "2": {
3314 "name": "keyword.generator.asterisk.ts"
3315 }
3316 }
3317 },
3318 {
3319 "name": "keyword.operator.expression.delete.ts",
3320 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3321 },
3322 {
3323 "name": "keyword.operator.expression.in.ts",
3324 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3325 },
3326 {
3327 "name": "keyword.operator.expression.of.ts",
3328 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3329 },
3330 {
3331 "name": "keyword.operator.expression.instanceof.ts",
3332 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3333 },
3334 {
3335 "name": "keyword.operator.new.ts",
3336 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3337 },
3338 {
3339 "include": "#typeof-operator"
3340 },
3341 {
3342 "name": "keyword.operator.expression.void.ts",
3343 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3344 },
3345 {
3346 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
3347 "captures": {
3348 "1": {
3349 "name": "keyword.control.as.ts"
3350 },
3351 "2": {
3352 "name": "storage.modifier.ts"
3353 }
3354 }
3355 },
3356 {
3357 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
3358 "beginCaptures": {
3359 "1": {
3360 "name": "keyword.control.as.ts"
3361 }
3362 },
3363 "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+)|(\\s+\\<))",
3364 "patterns": [
3365 {
3366 "include": "#type"
3367 }
3368 ]
3369 },
3370 {
3371 "name": "keyword.operator.spread.ts",
3372 "match": "\\.\\.\\."
3373 },
3374 {
3375 "name": "keyword.operator.assignment.compound.ts",
3376 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
3377 },
3378 {
3379 "name": "keyword.operator.assignment.compound.bitwise.ts",
3380 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
3381 },
3382 {
3383 "name": "keyword.operator.bitwise.shift.ts",
3384 "match": "<<|>>>|>>"
3385 },
3386 {
3387 "name": "keyword.operator.comparison.ts",
3388 "match": "===|!==|==|!="
3389 },
3390 {
3391 "name": "keyword.operator.relational.ts",
3392 "match": "<=|>=|<>|<|>"
3393 },
3394 {
3395 "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))",
3396 "captures": {
3397 "1": {
3398 "name": "keyword.operator.logical.ts"
3399 },
3400 "2": {
3401 "name": "keyword.operator.assignment.compound.ts"
3402 },
3403 "3": {
3404 "name": "keyword.operator.arithmetic.ts"
3405 }
3406 }
3407 },
3408 {
3409 "name": "keyword.operator.logical.ts",
3410 "match": "\\!|&&|\\|\\||\\?\\?"
3411 },
3412 {
3413 "name": "keyword.operator.bitwise.ts",
3414 "match": "\\&|~|\\^|\\|"
3415 },
3416 {
3417 "name": "keyword.operator.assignment.ts",
3418 "match": "\\="
3419 },
3420 {
3421 "name": "keyword.operator.decrement.ts",
3422 "match": "--"
3423 },
3424 {
3425 "name": "keyword.operator.increment.ts",
3426 "match": "\\+\\+"
3427 },
3428 {
3429 "name": "keyword.operator.arithmetic.ts",
3430 "match": "%|\\*|/|-|\\+"
3431 },
3432 {
3433 "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))",
3434 "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))",
3435 "endCaptures": {
3436 "1": {
3437 "name": "keyword.operator.assignment.compound.ts"
3438 },
3439 "2": {
3440 "name": "keyword.operator.arithmetic.ts"
3441 }
3442 },
3443 "patterns": [
3444 {
3445 "include": "#comment"
3446 }
3447 ]
3448 },
3449 {
3450 "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))",
3451 "captures": {
3452 "1": {
3453 "name": "keyword.operator.assignment.compound.ts"
3454 },
3455 "2": {
3456 "name": "keyword.operator.arithmetic.ts"
3457 }
3458 }
3459 }
3460 ]
3461 },
3462 "typeof-operator": {
3463 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3464 "beginCaptures": {
3465 "0": {
3466 "name": "keyword.operator.expression.typeof.ts"
3467 }
3468 },
3469 "end": "(?=[,);}\\]=>:&|{\\?]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
3470 "patterns": [
3471 {
3472 "include": "#expression"
3473 }
3474 ]
3475 },
3476 "literal": {
3477 "patterns": [
3478 {
3479 "include": "#numeric-literal"
3480 },
3481 {
3482 "include": "#boolean-literal"
3483 },
3484 {
3485 "include": "#null-literal"
3486 },
3487 {
3488 "include": "#undefined-literal"
3489 },
3490 {
3491 "include": "#numericConstant-literal"
3492 },
3493 {
3494 "include": "#array-literal"
3495 },
3496 {
3497 "include": "#this-literal"
3498 },
3499 {
3500 "include": "#super-literal"
3501 }
3502 ]
3503 },
3504 "array-literal": {
3505 "name": "meta.array.literal.ts",
3506 "begin": "\\s*(\\[)",
3507 "beginCaptures": {
3508 "1": {
3509 "name": "meta.brace.square.ts"
3510 }
3511 },
3512 "end": "\\]",
3513 "endCaptures": {
3514 "0": {
3515 "name": "meta.brace.square.ts"
3516 }
3517 },
3518 "patterns": [
3519 {
3520 "include": "#expression"
3521 },
3522 {
3523 "include": "#punctuation-comma"
3524 }
3525 ]
3526 },
3527 "numeric-literal": {
3528 "patterns": [
3529 {
3530 "name": "constant.numeric.hex.ts",
3531 "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)",
3532 "captures": {
3533 "1": {
3534 "name": "storage.type.numeric.bigint.ts"
3535 }
3536 }
3537 },
3538 {
3539 "name": "constant.numeric.binary.ts",
3540 "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)",
3541 "captures": {
3542 "1": {
3543 "name": "storage.type.numeric.bigint.ts"
3544 }
3545 }
3546 },
3547 {
3548 "name": "constant.numeric.octal.ts",
3549 "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)",
3550 "captures": {
3551 "1": {
3552 "name": "storage.type.numeric.bigint.ts"
3553 }
3554 }
3555 },
3556 {
3557 "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)(?!\\$)",
3558 "captures": {
3559 "0": {
3560 "name": "constant.numeric.decimal.ts"
3561 },
3562 "1": {
3563 "name": "meta.delimiter.decimal.period.ts"
3564 },
3565 "2": {
3566 "name": "storage.type.numeric.bigint.ts"
3567 },
3568 "3": {
3569 "name": "meta.delimiter.decimal.period.ts"
3570 },
3571 "4": {
3572 "name": "storage.type.numeric.bigint.ts"
3573 },
3574 "5": {
3575 "name": "meta.delimiter.decimal.period.ts"
3576 },
3577 "6": {
3578 "name": "storage.type.numeric.bigint.ts"
3579 },
3580 "7": {
3581 "name": "storage.type.numeric.bigint.ts"
3582 },
3583 "8": {
3584 "name": "meta.delimiter.decimal.period.ts"
3585 },
3586 "9": {
3587 "name": "storage.type.numeric.bigint.ts"
3588 },
3589 "10": {
3590 "name": "meta.delimiter.decimal.period.ts"
3591 },
3592 "11": {
3593 "name": "storage.type.numeric.bigint.ts"
3594 },
3595 "12": {
3596 "name": "meta.delimiter.decimal.period.ts"
3597 },
3598 "13": {
3599 "name": "storage.type.numeric.bigint.ts"
3600 },
3601 "14": {
3602 "name": "storage.type.numeric.bigint.ts"
3603 }
3604 }
3605 }
3606 ]
3607 },
3608 "boolean-literal": {
3609 "patterns": [
3610 {
3611 "name": "constant.language.boolean.true.ts",
3612 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3613 },
3614 {
3615 "name": "constant.language.boolean.false.ts",
3616 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3617 }
3618 ]
3619 },
3620 "null-literal": {
3621 "name": "constant.language.null.ts",
3622 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3623 },
3624 "this-literal": {
3625 "name": "variable.language.this.ts",
3626 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)"
3627 },
3628 "super-literal": {
3629 "name": "variable.language.super.ts",
3630 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)"
3631 },
3632 "undefined-literal": {
3633 "name": "constant.language.undefined.ts",
3634 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3635 },
3636 "numericConstant-literal": {
3637 "patterns": [
3638 {
3639 "name": "constant.language.nan.ts",
3640 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3641 },
3642 {
3643 "name": "constant.language.infinity.ts",
3644 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3645 }
3646 ]
3647 },
3648 "support-objects": {
3649 "patterns": [
3650 {
3651 "name": "variable.language.arguments.ts",
3652 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
3653 },
3654 {
3655 "name": "support.class.promise.ts",
3656 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
3657 },
3658 {
3659 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
3660 "captures": {
3661 "1": {
3662 "name": "keyword.control.import.ts"
3663 },
3664 "2": {
3665 "name": "punctuation.accessor.ts"
3666 },
3667 "3": {
3668 "name": "punctuation.accessor.optional.ts"
3669 },
3670 "4": {
3671 "name": "support.variable.property.importmeta.ts"
3672 }
3673 }
3674 },
3675 {
3676 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)",
3677 "captures": {
3678 "1": {
3679 "name": "keyword.operator.new.ts"
3680 },
3681 "2": {
3682 "name": "punctuation.accessor.ts"
3683 },
3684 "3": {
3685 "name": "punctuation.accessor.optional.ts"
3686 },
3687 "4": {
3688 "name": "support.variable.property.target.ts"
3689 }
3690 }
3691 },
3692 {
3693 "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(?!\\$)))",
3694 "captures": {
3695 "1": {
3696 "name": "punctuation.accessor.ts"
3697 },
3698 "2": {
3699 "name": "punctuation.accessor.optional.ts"
3700 },
3701 "3": {
3702 "name": "support.variable.property.ts"
3703 },
3704 "4": {
3705 "name": "support.constant.ts"
3706 }
3707 }
3708 },
3709 {
3710 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
3711 "captures": {
3712 "1": {
3713 "name": "support.type.object.module.ts"
3714 },
3715 "2": {
3716 "name": "support.type.object.module.ts"
3717 },
3718 "3": {
3719 "name": "punctuation.accessor.ts"
3720 },
3721 "4": {
3722 "name": "punctuation.accessor.optional.ts"
3723 },
3724 "5": {
3725 "name": "support.type.object.module.ts"
3726 }
3727 }
3728 }
3729 ]
3730 },
3731 "identifiers": {
3732 "patterns": [
3733 {
3734 "include": "#object-identifiers"
3735 },
3736 {
3737 "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))",
3738 "captures": {
3739 "1": {
3740 "name": "punctuation.accessor.ts"
3741 },
3742 "2": {
3743 "name": "punctuation.accessor.optional.ts"
3744 },
3745 "3": {
3746 "name": "entity.name.function.ts"
3747 }
3748 }
3749 },
3750 {
3751 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
3752 "captures": {
3753 "1": {
3754 "name": "punctuation.accessor.ts"
3755 },
3756 "2": {
3757 "name": "punctuation.accessor.optional.ts"
3758 },
3759 "3": {
3760 "name": "variable.other.constant.property.ts"
3761 }
3762 }
3763 },
3764 {
3765 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3766 "captures": {
3767 "1": {
3768 "name": "punctuation.accessor.ts"
3769 },
3770 "2": {
3771 "name": "punctuation.accessor.optional.ts"
3772 },
3773 "3": {
3774 "name": "variable.other.property.ts"
3775 }
3776 }
3777 },
3778 {
3779 "name": "variable.other.constant.ts",
3780 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3781 },
3782 {
3783 "name": "variable.other.readwrite.ts",
3784 "match": "[_$[:alpha:]][_$[:alnum:]]*"
3785 }
3786 ]
3787 },
3788 "object-identifiers": {
3789 "patterns": [
3790 {
3791 "name": "support.class.ts",
3792 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))"
3793 },
3794 {
3795 "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3796 "captures": {
3797 "1": {
3798 "name": "punctuation.accessor.ts"
3799 },
3800 "2": {
3801 "name": "punctuation.accessor.optional.ts"
3802 },
3803 "3": {
3804 "name": "variable.other.constant.object.property.ts"
3805 },
3806 "4": {
3807 "name": "variable.other.object.property.ts"
3808 }
3809 }
3810 },
3811 {
3812 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3813 "captures": {
3814 "1": {
3815 "name": "variable.other.constant.object.ts"
3816 },
3817 "2": {
3818 "name": "variable.other.object.ts"
3819 }
3820 }
3821 }
3822 ]
3823 },
3824 "type-annotation": {
3825 "patterns": [
3826 {
3827 "name": "meta.type.annotation.ts",
3828 "begin": "(:)(?=\\s*\\S)",
3829 "beginCaptures": {
3830 "1": {
3831 "name": "keyword.operator.type.annotation.ts"
3832 }
3833 },
3834 "end": "(?<![:|&])((?=$|^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3835 "patterns": [
3836 {
3837 "include": "#type"
3838 }
3839 ]
3840 },
3841 {
3842 "name": "meta.type.annotation.ts",
3843 "begin": "(:)",
3844 "beginCaptures": {
3845 "1": {
3846 "name": "keyword.operator.type.annotation.ts"
3847 }
3848 },
3849 "end": "(?<![:|&])((?=[,);\\}\\]]|//)|(?==[^>])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3850 "patterns": [
3851 {
3852 "include": "#type"
3853 }
3854 ]
3855 }
3856 ]
3857 },
3858 "parameter-type-annotation": {
3859 "patterns": [
3860 {
3861 "name": "meta.type.annotation.ts",
3862 "begin": "(:)",
3863 "beginCaptures": {
3864 "1": {
3865 "name": "keyword.operator.type.annotation.ts"
3866 }
3867 },
3868 "end": "(?=[,)])|(?==[^>])",
3869 "patterns": [
3870 {
3871 "include": "#type"
3872 }
3873 ]
3874 }
3875 ]
3876 },
3877 "return-type": {
3878 "patterns": [
3879 {
3880 "name": "meta.return.type.ts",
3881 "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
3882 "beginCaptures": {
3883 "1": {
3884 "name": "keyword.operator.type.annotation.ts"
3885 }
3886 },
3887 "end": "(?<![:|&])(?=$|^|[{};,]|//)",
3888 "patterns": [
3889 {
3890 "include": "#return-type-core"
3891 }
3892 ]
3893 },
3894 {
3895 "name": "meta.return.type.ts",
3896 "begin": "(?<=\\))\\s*(:)",
3897 "beginCaptures": {
3898 "1": {
3899 "name": "keyword.operator.type.annotation.ts"
3900 }
3901 },
3902 "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
3903 "patterns": [
3904 {
3905 "include": "#return-type-core"
3906 }
3907 ]
3908 }
3909 ]
3910 },
3911 "return-type-core": {
3912 "patterns": [
3913 {
3914 "include": "#comment"
3915 },
3916 {
3917 "begin": "(?<=[:|&])(?=\\s*\\{)",
3918 "end": "(?<=\\})",
3919 "patterns": [
3920 {
3921 "include": "#type-object"
3922 }
3923 ]
3924 },
3925 {
3926 "include": "#type-predicate-operator"
3927 },
3928 {
3929 "include": "#type"
3930 }
3931 ]
3932 },
3933 "arrow-return-type": {
3934 "name": "meta.return.type.arrow.ts",
3935 "begin": "(?<=\\))\\s*(:)",
3936 "beginCaptures": {
3937 "1": {
3938 "name": "keyword.operator.type.annotation.ts"
3939 }
3940 },
3941 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3942 "patterns": [
3943 {
3944 "include": "#arrow-return-type-body"
3945 }
3946 ]
3947 },
3948 "possibly-arrow-return-type": {
3949 "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)",
3950 "beginCaptures": {
3951 "1": {
3952 "name": "meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts"
3953 }
3954 },
3955 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3956 "contentName": "meta.arrow.ts meta.return.type.arrow.ts",
3957 "patterns": [
3958 {
3959 "include": "#arrow-return-type-body"
3960 }
3961 ]
3962 },
3963 "arrow-return-type-body": {
3964 "patterns": [
3965 {
3966 "begin": "(?<=[:])(?=\\s*\\{)",
3967 "end": "(?<=\\})",
3968 "patterns": [
3969 {
3970 "include": "#type-object"
3971 }
3972 ]
3973 },
3974 {
3975 "include": "#type-predicate-operator"
3976 },
3977 {
3978 "include": "#type"
3979 }
3980 ]
3981 },
3982 "type-parameters": {
3983 "name": "meta.type.parameters.ts",
3984 "begin": "(<)",
3985 "beginCaptures": {
3986 "1": {
3987 "name": "punctuation.definition.typeparameters.begin.ts"
3988 }
3989 },
3990 "end": "(>)",
3991 "endCaptures": {
3992 "1": {
3993 "name": "punctuation.definition.typeparameters.end.ts"
3994 }
3995 },
3996 "patterns": [
3997 {
3998 "include": "#comment"
3999 },
4000 {
4001 "name": "storage.modifier.ts",
4002 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4003 },
4004 {
4005 "include": "#type"
4006 },
4007 {
4008 "include": "#punctuation-comma"
4009 },
4010 {
4011 "name": "keyword.operator.assignment.ts",
4012 "match": "(=)(?!>)"
4013 }
4014 ]
4015 },
4016 "type-arguments": {
4017 "name": "meta.type.parameters.ts",
4018 "begin": "\\<",
4019 "beginCaptures": {
4020 "0": {
4021 "name": "punctuation.definition.typeparameters.begin.ts"
4022 }
4023 },
4024 "end": "\\>",
4025 "endCaptures": {
4026 "0": {
4027 "name": "punctuation.definition.typeparameters.end.ts"
4028 }
4029 },
4030 "patterns": [
4031 {
4032 "include": "#type-arguments-body"
4033 }
4034 ]
4035 },
4036 "type-arguments-body": {
4037 "patterns": [
4038 {
4039 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4040 "captures": {
4041 "0": {
4042 "name": "keyword.operator.type.ts"
4043 }
4044 }
4045 },
4046 {
4047 "include": "#type"
4048 },
4049 {
4050 "include": "#punctuation-comma"
4051 }
4052 ]
4053 },
4054 "type": {
4055 "patterns": [
4056 {
4057 "include": "#comment"
4058 },
4059 {
4060 "include": "#type-string"
4061 },
4062 {
4063 "include": "#numeric-literal"
4064 },
4065 {
4066 "include": "#type-primitive"
4067 },
4068 {
4069 "include": "#type-builtin-literals"
4070 },
4071 {
4072 "include": "#type-parameters"
4073 },
4074 {
4075 "include": "#type-tuple"
4076 },
4077 {
4078 "include": "#type-object"
4079 },
4080 {
4081 "include": "#type-operators"
4082 },
4083 {
4084 "include": "#type-conditional"
4085 },
4086 {
4087 "include": "#type-fn-type-parameters"
4088 },
4089 {
4090 "include": "#type-paren-or-function-parameters"
4091 },
4092 {
4093 "include": "#type-function-return-type"
4094 },
4095 {
4096 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
4097 "captures": {
4098 "1": {
4099 "name": "storage.modifier.ts"
4100 }
4101 }
4102 },
4103 {
4104 "include": "#type-name"
4105 }
4106 ]
4107 },
4108 "type-primitive": {
4109 "name": "support.type.primitive.ts",
4110 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4111 },
4112 "type-builtin-literals": {
4113 "name": "support.type.builtin.ts",
4114 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4115 },
4116 "type-tuple": {
4117 "name": "meta.type.tuple.ts",
4118 "begin": "\\[",
4119 "beginCaptures": {
4120 "0": {
4121 "name": "meta.brace.square.ts"
4122 }
4123 },
4124 "end": "\\]",
4125 "endCaptures": {
4126 "0": {
4127 "name": "meta.brace.square.ts"
4128 }
4129 },
4130 "patterns": [
4131 {
4132 "name": "keyword.operator.rest.ts",
4133 "match": "\\.\\.\\."
4134 },
4135 {
4136 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)",
4137 "captures": {
4138 "1": {
4139 "name": "entity.name.label.ts"
4140 },
4141 "2": {
4142 "name": "keyword.operator.optional.ts"
4143 },
4144 "3": {
4145 "name": "punctuation.separator.label.ts"
4146 }
4147 }
4148 },
4149 {
4150 "include": "#type"
4151 },
4152 {
4153 "include": "#punctuation-comma"
4154 }
4155 ]
4156 },
4157 "type-object": {
4158 "name": "meta.object.type.ts",
4159 "begin": "\\{",
4160 "beginCaptures": {
4161 "0": {
4162 "name": "punctuation.definition.block.ts"
4163 }
4164 },
4165 "end": "\\}",
4166 "endCaptures": {
4167 "0": {
4168 "name": "punctuation.definition.block.ts"
4169 }
4170 },
4171 "patterns": [
4172 {
4173 "include": "#comment"
4174 },
4175 {
4176 "include": "#method-declaration"
4177 },
4178 {
4179 "include": "#indexer-declaration"
4180 },
4181 {
4182 "include": "#indexer-mapped-type-declaration"
4183 },
4184 {
4185 "include": "#field-declaration"
4186 },
4187 {
4188 "include": "#type-annotation"
4189 },
4190 {
4191 "begin": "\\.\\.\\.",
4192 "beginCaptures": {
4193 "0": {
4194 "name": "keyword.operator.spread.ts"
4195 }
4196 },
4197 "end": "(?=\\}|;|,|$)|(?<=\\})",
4198 "patterns": [
4199 {
4200 "include": "#type"
4201 }
4202 ]
4203 },
4204 {
4205 "include": "#punctuation-comma"
4206 },
4207 {
4208 "include": "#punctuation-semicolon"
4209 },
4210 {
4211 "include": "#type"
4212 }
4213 ]
4214 },
4215 "type-conditional": {
4216 "patterns": [
4217 {
4218 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4219 "beginCaptures": {
4220 "1": {
4221 "name": "storage.modifier.ts"
4222 }
4223 },
4224 "end": "(?<=:)",
4225 "patterns": [
4226 {
4227 "begin": "\\?",
4228 "beginCaptures": {
4229 "0": {
4230 "name": "keyword.operator.ternary.ts"
4231 }
4232 },
4233 "end": ":",
4234 "endCaptures": {
4235 "0": {
4236 "name": "keyword.operator.ternary.ts"
4237 }
4238 },
4239 "patterns": [
4240 {
4241 "include": "#type"
4242 }
4243 ]
4244 },
4245 {
4246 "include": "#type"
4247 }
4248 ]
4249 }
4250 ]
4251 },
4252 "type-paren-or-function-parameters": {
4253 "name": "meta.type.paren.cover.ts",
4254 "begin": "\\(",
4255 "beginCaptures": {
4256 "0": {
4257 "name": "meta.brace.round.ts"
4258 }
4259 },
4260 "end": "\\)",
4261 "endCaptures": {
4262 "0": {
4263 "name": "meta.brace.round.ts"
4264 }
4265 },
4266 "patterns": [
4267 {
4268 "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*))))))))",
4269 "captures": {
4270 "1": {
4271 "name": "storage.modifier.ts"
4272 },
4273 "2": {
4274 "name": "keyword.operator.rest.ts"
4275 },
4276 "3": {
4277 "name": "entity.name.function.ts variable.language.this.ts"
4278 },
4279 "4": {
4280 "name": "entity.name.function.ts"
4281 },
4282 "5": {
4283 "name": "keyword.operator.optional.ts"
4284 }
4285 }
4286 },
4287 {
4288 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)",
4289 "captures": {
4290 "1": {
4291 "name": "storage.modifier.ts"
4292 },
4293 "2": {
4294 "name": "keyword.operator.rest.ts"
4295 },
4296 "3": {
4297 "name": "variable.parameter.ts variable.language.this.ts"
4298 },
4299 "4": {
4300 "name": "variable.parameter.ts"
4301 },
4302 "5": {
4303 "name": "keyword.operator.optional.ts"
4304 }
4305 }
4306 },
4307 {
4308 "include": "#type-annotation"
4309 },
4310 {
4311 "name": "punctuation.separator.parameter.ts",
4312 "match": ","
4313 },
4314 {
4315 "include": "#type"
4316 }
4317 ]
4318 },
4319 "type-fn-type-parameters": {
4320 "patterns": [
4321 {
4322 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)",
4323 "beginCaptures": {
4324 "1": {
4325 "name": "meta.type.constructor.ts storage.modifier.ts"
4326 },
4327 "2": {
4328 "name": "meta.type.constructor.ts keyword.control.new.ts"
4329 }
4330 },
4331 "end": "(?<=>)",
4332 "patterns": [
4333 {
4334 "include": "#comment"
4335 },
4336 {
4337 "include": "#type-parameters"
4338 }
4339 ]
4340 },
4341 {
4342 "name": "meta.type.constructor.ts",
4343 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4344 "beginCaptures": {
4345 "1": {
4346 "name": "storage.modifier.ts"
4347 },
4348 "2": {
4349 "name": "keyword.control.new.ts"
4350 }
4351 },
4352 "end": "(?<=\\))",
4353 "patterns": [
4354 {
4355 "include": "#function-parameters"
4356 }
4357 ]
4358 },
4359 {
4360 "name": "meta.type.function.ts",
4361 "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
4362 "end": "(?<=\\))",
4363 "patterns": [
4364 {
4365 "include": "#function-parameters"
4366 }
4367 ]
4368 }
4369 ]
4370 },
4371 "type-function-return-type": {
4372 "patterns": [
4373 {
4374 "name": "meta.type.function.return.ts",
4375 "begin": "(=>)(?=\\s*\\S)",
4376 "beginCaptures": {
4377 "1": {
4378 "name": "storage.type.function.arrow.ts"
4379 }
4380 },
4381 "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)",
4382 "patterns": [
4383 {
4384 "include": "#type-function-return-type-core"
4385 }
4386 ]
4387 },
4388 {
4389 "name": "meta.type.function.return.ts",
4390 "begin": "=>",
4391 "beginCaptures": {
4392 "0": {
4393 "name": "storage.type.function.arrow.ts"
4394 }
4395 },
4396 "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4397 "patterns": [
4398 {
4399 "include": "#type-function-return-type-core"
4400 }
4401 ]
4402 }
4403 ]
4404 },
4405 "type-function-return-type-core": {
4406 "patterns": [
4407 {
4408 "include": "#comment"
4409 },
4410 {
4411 "begin": "(?<==>)(?=\\s*\\{)",
4412 "end": "(?<=\\})",
4413 "patterns": [
4414 {
4415 "include": "#type-object"
4416 }
4417 ]
4418 },
4419 {
4420 "include": "#type-predicate-operator"
4421 },
4422 {
4423 "include": "#type"
4424 }
4425 ]
4426 },
4427 "type-operators": {
4428 "patterns": [
4429 {
4430 "include": "#typeof-operator"
4431 },
4432 {
4433 "include": "#type-infer"
4434 },
4435 {
4436 "begin": "([&|])(?=\\s*\\{)",
4437 "beginCaptures": {
4438 "0": {
4439 "name": "keyword.operator.type.ts"
4440 }
4441 },
4442 "end": "(?<=\\})",
4443 "patterns": [
4444 {
4445 "include": "#type-object"
4446 }
4447 ]
4448 },
4449 {
4450 "begin": "[&|]",
4451 "beginCaptures": {
4452 "0": {
4453 "name": "keyword.operator.type.ts"
4454 }
4455 },
4456 "end": "(?=\\S)"
4457 },
4458 {
4459 "name": "keyword.operator.expression.keyof.ts",
4460 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4461 },
4462 {
4463 "name": "keyword.operator.ternary.ts",
4464 "match": "(\\?|\\:)"
4465 },
4466 {
4467 "name": "keyword.operator.expression.import.ts",
4468 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()"
4469 }
4470 ]
4471 },
4472 "type-infer": {
4473 "patterns": [
4474 {
4475 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4476 "name": "meta.type.infer.ts",
4477 "captures": {
4478 "1": {
4479 "name": "keyword.operator.expression.infer.ts"
4480 },
4481 "2": {
4482 "name": "entity.name.type.ts"
4483 },
4484 "3": {
4485 "name": "keyword.operator.expression.extends.ts"
4486 }
4487 }
4488 }
4489 ]
4490 },
4491 "type-predicate-operator": {
4492 "patterns": [
4493 {
4494 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4495 "captures": {
4496 "1": {
4497 "name": "keyword.operator.type.asserts.ts"
4498 },
4499 "2": {
4500 "name": "variable.parameter.ts variable.language.this.ts"
4501 },
4502 "3": {
4503 "name": "variable.parameter.ts"
4504 },
4505 "4": {
4506 "name": "keyword.operator.expression.is.ts"
4507 }
4508 }
4509 },
4510 {
4511 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4512 "captures": {
4513 "1": {
4514 "name": "keyword.operator.type.asserts.ts"
4515 },
4516 "2": {
4517 "name": "variable.parameter.ts variable.language.this.ts"
4518 },
4519 "3": {
4520 "name": "variable.parameter.ts"
4521 }
4522 }
4523 },
4524 {
4525 "name": "keyword.operator.type.asserts.ts",
4526 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4527 },
4528 {
4529 "name": "keyword.operator.expression.is.ts",
4530 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4531 }
4532 ]
4533 },
4534 "type-name": {
4535 "patterns": [
4536 {
4537 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)",
4538 "captures": {
4539 "1": {
4540 "name": "entity.name.type.module.ts"
4541 },
4542 "2": {
4543 "name": "punctuation.accessor.ts"
4544 },
4545 "3": {
4546 "name": "punctuation.accessor.optional.ts"
4547 },
4548 "4": {
4549 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
4550 }
4551 },
4552 "end": "(>)",
4553 "endCaptures": {
4554 "1": {
4555 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
4556 }
4557 },
4558 "contentName": "meta.type.parameters.ts",
4559 "patterns": [
4560 {
4561 "include": "#type-arguments-body"
4562 }
4563 ]
4564 },
4565 {
4566 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)",
4567 "beginCaptures": {
4568 "1": {
4569 "name": "entity.name.type.ts"
4570 },
4571 "2": {
4572 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
4573 }
4574 },
4575 "end": "(>)",
4576 "endCaptures": {
4577 "1": {
4578 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
4579 }
4580 },
4581 "contentName": "meta.type.parameters.ts",
4582 "patterns": [
4583 {
4584 "include": "#type-arguments-body"
4585 }
4586 ]
4587 },
4588 {
4589 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4590 "captures": {
4591 "1": {
4592 "name": "entity.name.type.module.ts"
4593 },
4594 "2": {
4595 "name": "punctuation.accessor.ts"
4596 },
4597 "3": {
4598 "name": "punctuation.accessor.optional.ts"
4599 }
4600 }
4601 },
4602 {
4603 "name": "entity.name.type.ts",
4604 "match": "[_$[:alpha:]][_$[:alnum:]]*"
4605 }
4606 ]
4607 },
4608 "punctuation-comma": {
4609 "name": "punctuation.separator.comma.ts",
4610 "match": ","
4611 },
4612 "punctuation-semicolon": {
4613 "name": "punctuation.terminator.statement.ts",
4614 "match": ";"
4615 },
4616 "punctuation-accessor": {
4617 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4618 "captures": {
4619 "1": {
4620 "name": "punctuation.accessor.ts"
4621 },
4622 "2": {
4623 "name": "punctuation.accessor.optional.ts"
4624 }
4625 }
4626 },
4627 "string": {
4628 "patterns": [
4629 {
4630 "include": "#qstring-single"
4631 },
4632 {
4633 "include": "#qstring-double"
4634 },
4635 {
4636 "include": "#template"
4637 }
4638 ]
4639 },
4640 "qstring-double": {
4641 "name": "string.quoted.double.ts",
4642 "begin": "\"",
4643 "beginCaptures": {
4644 "0": {
4645 "name": "punctuation.definition.string.begin.ts"
4646 }
4647 },
4648 "end": "(\")|((?:[^\\\\\\n])$)",
4649 "endCaptures": {
4650 "1": {
4651 "name": "punctuation.definition.string.end.ts"
4652 },
4653 "2": {
4654 "name": "invalid.illegal.newline.ts"
4655 }
4656 },
4657 "patterns": [
4658 {
4659 "include": "#string-character-escape"
4660 }
4661 ]
4662 },
4663 "qstring-single": {
4664 "name": "string.quoted.single.ts",
4665 "begin": "'",
4666 "beginCaptures": {
4667 "0": {
4668 "name": "punctuation.definition.string.begin.ts"
4669 }
4670 },
4671 "end": "(\\')|((?:[^\\\\\\n])$)",
4672 "endCaptures": {
4673 "1": {
4674 "name": "punctuation.definition.string.end.ts"
4675 },
4676 "2": {
4677 "name": "invalid.illegal.newline.ts"
4678 }
4679 },
4680 "patterns": [
4681 {
4682 "include": "#string-character-escape"
4683 }
4684 ]
4685 },
4686 "string-character-escape": {
4687 "name": "constant.character.escape.ts",
4688 "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]?|.|$)"
4689 },
4690 "template": {
4691 "patterns": [
4692 {
4693 "include": "#template-call"
4694 },
4695 {
4696 "name": "string.template.ts",
4697 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4698 "beginCaptures": {
4699 "1": {
4700 "name": "entity.name.function.tagged-template.ts"
4701 },
4702 "2": {
4703 "name": "punctuation.definition.string.template.begin.ts"
4704 }
4705 },
4706 "end": "`",
4707 "endCaptures": {
4708 "0": {
4709 "name": "punctuation.definition.string.template.end.ts"
4710 }
4711 },
4712 "patterns": [
4713 {
4714 "include": "#template-substitution-element"
4715 },
4716 {
4717 "include": "#string-character-escape"
4718 }
4719 ]
4720 }
4721 ]
4722 },
4723 "template-call": {
4724 "patterns": [
4725 {
4726 "name": "string.template.ts",
4727 "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*)?`)",
4728 "end": "(?=`)",
4729 "patterns": [
4730 {
4731 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
4732 "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*)?`)",
4733 "patterns": [
4734 {
4735 "include": "#support-function-call-identifiers"
4736 },
4737 {
4738 "name": "entity.name.function.tagged-template.ts",
4739 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
4740 }
4741 ]
4742 },
4743 {
4744 "include": "#type-arguments"
4745 }
4746 ]
4747 },
4748 {
4749 "name": "string.template.ts",
4750 "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*)`)",
4751 "beginCaptures": {
4752 "1": {
4753 "name": "entity.name.function.tagged-template.ts"
4754 }
4755 },
4756 "end": "(?=`)",
4757 "patterns": [
4758 {
4759 "include": "#type-arguments"
4760 }
4761 ]
4762 }
4763 ]
4764 },
4765 "template-substitution-element": {
4766 "name": "meta.template.expression.ts",
4767 "begin": "\\$\\{",
4768 "beginCaptures": {
4769 "0": {
4770 "name": "punctuation.definition.template-expression.begin.ts"
4771 }
4772 },
4773 "end": "\\}",
4774 "endCaptures": {
4775 "0": {
4776 "name": "punctuation.definition.template-expression.end.ts"
4777 }
4778 },
4779 "patterns": [
4780 {
4781 "include": "#expression"
4782 }
4783 ],
4784 "contentName": "meta.embedded.line.ts"
4785 },
4786 "type-string": {
4787 "patterns": [
4788 {
4789 "include": "#qstring-single"
4790 },
4791 {
4792 "include": "#qstring-double"
4793 },
4794 {
4795 "include": "#template-type"
4796 }
4797 ]
4798 },
4799 "template-type": {
4800 "patterns": [
4801 {
4802 "include": "#template-call"
4803 },
4804 {
4805 "name": "string.template.ts",
4806 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4807 "beginCaptures": {
4808 "1": {
4809 "name": "entity.name.function.tagged-template.ts"
4810 },
4811 "2": {
4812 "name": "punctuation.definition.string.template.begin.ts"
4813 }
4814 },
4815 "end": "`",
4816 "endCaptures": {
4817 "0": {
4818 "name": "punctuation.definition.string.template.end.ts"
4819 }
4820 },
4821 "patterns": [
4822 {
4823 "include": "#template-type-substitution-element"
4824 },
4825 {
4826 "include": "#string-character-escape"
4827 }
4828 ]
4829 }
4830 ]
4831 },
4832 "template-type-substitution-element": {
4833 "name": "meta.template.expression.ts",
4834 "begin": "\\$\\{",
4835 "beginCaptures": {
4836 "0": {
4837 "name": "punctuation.definition.template-expression.begin.ts"
4838 }
4839 },
4840 "end": "\\}",
4841 "endCaptures": {
4842 "0": {
4843 "name": "punctuation.definition.template-expression.end.ts"
4844 }
4845 },
4846 "patterns": [
4847 {
4848 "include": "#type"
4849 }
4850 ],
4851 "contentName": "meta.embedded.line.ts"
4852 },
4853 "regex": {
4854 "patterns": [
4855 {
4856 "name": "string.regexp.ts",
4857 "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4858 "beginCaptures": {
4859 "1": {
4860 "name": "punctuation.definition.string.begin.ts"
4861 }
4862 },
4863 "end": "(/)([dgimsuy]*)",
4864 "endCaptures": {
4865 "1": {
4866 "name": "punctuation.definition.string.end.ts"
4867 },
4868 "2": {
4869 "name": "keyword.other.ts"
4870 }
4871 },
4872 "patterns": [
4873 {
4874 "include": "#regexp"
4875 }
4876 ]
4877 },
4878 {
4879 "name": "string.regexp.ts",
4880 "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4881 "beginCaptures": {
4882 "0": {
4883 "name": "punctuation.definition.string.begin.ts"
4884 }
4885 },
4886 "end": "(/)([dgimsuy]*)",
4887 "endCaptures": {
4888 "1": {
4889 "name": "punctuation.definition.string.end.ts"
4890 },
4891 "2": {
4892 "name": "keyword.other.ts"
4893 }
4894 },
4895 "patterns": [
4896 {
4897 "include": "#regexp"
4898 }
4899 ]
4900 }
4901 ]
4902 },
4903 "regexp": {
4904 "patterns": [
4905 {
4906 "name": "keyword.control.anchor.regexp",
4907 "match": "\\\\[bB]|\\^|\\$"
4908 },
4909 {
4910 "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
4911 "captures": {
4912 "0": {
4913 "name": "keyword.other.back-reference.regexp"
4914 },
4915 "1": {
4916 "name": "variable.other.regexp"
4917 }
4918 }
4919 },
4920 {
4921 "name": "keyword.operator.quantifier.regexp",
4922 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
4923 },
4924 {
4925 "name": "keyword.operator.or.regexp",
4926 "match": "\\|"
4927 },
4928 {
4929 "name": "meta.group.assertion.regexp",
4930 "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4931 "beginCaptures": {
4932 "1": {
4933 "name": "punctuation.definition.group.regexp"
4934 },
4935 "2": {
4936 "name": "punctuation.definition.group.assertion.regexp"
4937 },
4938 "3": {
4939 "name": "meta.assertion.look-ahead.regexp"
4940 },
4941 "4": {
4942 "name": "meta.assertion.negative-look-ahead.regexp"
4943 },
4944 "5": {
4945 "name": "meta.assertion.look-behind.regexp"
4946 },
4947 "6": {
4948 "name": "meta.assertion.negative-look-behind.regexp"
4949 }
4950 },
4951 "end": "(\\))",
4952 "endCaptures": {
4953 "1": {
4954 "name": "punctuation.definition.group.regexp"
4955 }
4956 },
4957 "patterns": [
4958 {
4959 "include": "#regexp"
4960 }
4961 ]
4962 },
4963 {
4964 "name": "meta.group.regexp",
4965 "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
4966 "beginCaptures": {
4967 "0": {
4968 "name": "punctuation.definition.group.regexp"
4969 },
4970 "1": {
4971 "name": "punctuation.definition.group.no-capture.regexp"
4972 },
4973 "2": {
4974 "name": "variable.other.regexp"
4975 }
4976 },
4977 "end": "\\)",
4978 "endCaptures": {
4979 "0": {
4980 "name": "punctuation.definition.group.regexp"
4981 }
4982 },
4983 "patterns": [
4984 {
4985 "include": "#regexp"
4986 }
4987 ]
4988 },
4989 {
4990 "name": "constant.other.character-class.set.regexp",
4991 "begin": "(\\[)(\\^)?",
4992 "beginCaptures": {
4993 "1": {
4994 "name": "punctuation.definition.character-class.regexp"
4995 },
4996 "2": {
4997 "name": "keyword.operator.negation.regexp"
4998 }
4999 },
5000 "end": "(\\])",
5001 "endCaptures": {
5002 "1": {
5003 "name": "punctuation.definition.character-class.regexp"
5004 }
5005 },
5006 "patterns": [
5007 {
5008 "name": "constant.other.character-class.range.regexp",
5009 "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])|(\\\\.))",
5010 "captures": {
5011 "1": {
5012 "name": "constant.character.numeric.regexp"
5013 },
5014 "2": {
5015 "name": "constant.character.control.regexp"
5016 },
5017 "3": {
5018 "name": "constant.character.escape.backslash.regexp"
5019 },
5020 "4": {
5021 "name": "constant.character.numeric.regexp"
5022 },
5023 "5": {
5024 "name": "constant.character.control.regexp"
5025 },
5026 "6": {
5027 "name": "constant.character.escape.backslash.regexp"
5028 }
5029 }
5030 },
5031 {
5032 "include": "#regex-character-class"
5033 }
5034 ]
5035 },
5036 {
5037 "include": "#regex-character-class"
5038 }
5039 ]
5040 },
5041 "regex-character-class": {
5042 "patterns": [
5043 {
5044 "name": "constant.other.character-class.regexp",
5045 "match": "\\\\[wWsSdDtrnvf]|\\."
5046 },
5047 {
5048 "name": "constant.character.numeric.regexp",
5049 "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
5050 },
5051 {
5052 "name": "constant.character.control.regexp",
5053 "match": "\\\\c[A-Z]"
5054 },
5055 {
5056 "name": "constant.character.escape.backslash.regexp",
5057 "match": "\\\\."
5058 }
5059 ]
5060 },
5061 "comment": {
5062 "patterns": [
5063 {
5064 "name": "comment.block.documentation.ts",
5065 "begin": "/\\*\\*(?!/)",
5066 "beginCaptures": {
5067 "0": {
5068 "name": "punctuation.definition.comment.ts"
5069 }
5070 },
5071 "end": "\\*/",
5072 "endCaptures": {
5073 "0": {
5074 "name": "punctuation.definition.comment.ts"
5075 }
5076 },
5077 "patterns": [
5078 {
5079 "include": "#docblock"
5080 }
5081 ]
5082 },
5083 {
5084 "name": "comment.block.ts",
5085 "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
5086 "beginCaptures": {
5087 "1": {
5088 "name": "punctuation.definition.comment.ts"
5089 },
5090 "2": {
5091 "name": "storage.type.internaldeclaration.ts"
5092 },
5093 "3": {
5094 "name": "punctuation.decorator.internaldeclaration.ts"
5095 }
5096 },
5097 "end": "\\*/",
5098 "endCaptures": {
5099 "0": {
5100 "name": "punctuation.definition.comment.ts"
5101 }
5102 }
5103 },
5104 {
5105 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5106 "beginCaptures": {
5107 "1": {
5108 "name": "punctuation.whitespace.comment.leading.ts"
5109 },
5110 "2": {
5111 "name": "comment.line.double-slash.ts"
5112 },
5113 "3": {
5114 "name": "punctuation.definition.comment.ts"
5115 },
5116 "4": {
5117 "name": "storage.type.internaldeclaration.ts"
5118 },
5119 "5": {
5120 "name": "punctuation.decorator.internaldeclaration.ts"
5121 }
5122 },
5123 "end": "(?=$)",
5124 "contentName": "comment.line.double-slash.ts"
5125 }
5126 ]
5127 },
5128 "single-line-comment-consuming-line-ending": {
5129 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5130 "beginCaptures": {
5131 "1": {
5132 "name": "punctuation.whitespace.comment.leading.ts"
5133 },
5134 "2": {
5135 "name": "comment.line.double-slash.ts"
5136 },
5137 "3": {
5138 "name": "punctuation.definition.comment.ts"
5139 },
5140 "4": {
5141 "name": "storage.type.internaldeclaration.ts"
5142 },
5143 "5": {
5144 "name": "punctuation.decorator.internaldeclaration.ts"
5145 }
5146 },
5147 "end": "(?=^)",
5148 "contentName": "comment.line.double-slash.ts"
5149 },
5150 "directives": {
5151 "name": "comment.line.triple-slash.directive.ts",
5152 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
5153 "beginCaptures": {
5154 "1": {
5155 "name": "punctuation.definition.comment.ts"
5156 }
5157 },
5158 "end": "(?=$)",
5159 "patterns": [
5160 {
5161 "name": "meta.tag.ts",
5162 "begin": "(<)(reference|amd-dependency|amd-module)",
5163 "beginCaptures": {
5164 "1": {
5165 "name": "punctuation.definition.tag.directive.ts"
5166 },
5167 "2": {
5168 "name": "entity.name.tag.directive.ts"
5169 }
5170 },
5171 "end": "/>",
5172 "endCaptures": {
5173 "0": {
5174 "name": "punctuation.definition.tag.directive.ts"
5175 }
5176 },
5177 "patterns": [
5178 {
5179 "name": "entity.other.attribute-name.directive.ts",
5180 "match": "path|types|no-default-lib|lib|name|resolution-mode"
5181 },
5182 {
5183 "name": "keyword.operator.assignment.ts",
5184 "match": "="
5185 },
5186 {
5187 "include": "#string"
5188 }
5189 ]
5190 }
5191 ]
5192 },
5193 "docblock": {
5194 "patterns": [
5195 {
5196 "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
5197 "captures": {
5198 "1": {
5199 "name": "storage.type.class.jsdoc"
5200 },
5201 "2": {
5202 "name": "punctuation.definition.block.tag.jsdoc"
5203 },
5204 "3": {
5205 "name": "constant.language.access-type.jsdoc"
5206 }
5207 }
5208 },
5209 {
5210 "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
5211 "captures": {
5212 "1": {
5213 "name": "storage.type.class.jsdoc"
5214 },
5215 "2": {
5216 "name": "punctuation.definition.block.tag.jsdoc"
5217 },
5218 "3": {
5219 "name": "entity.name.type.instance.jsdoc"
5220 },
5221 "4": {
5222 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5223 },
5224 "5": {
5225 "name": "constant.other.email.link.underline.jsdoc"
5226 },
5227 "6": {
5228 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5229 }
5230 }
5231 },
5232 {
5233 "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
5234 "captures": {
5235 "1": {
5236 "name": "storage.type.class.jsdoc"
5237 },
5238 "2": {
5239 "name": "punctuation.definition.block.tag.jsdoc"
5240 },
5241 "3": {
5242 "name": "entity.name.type.instance.jsdoc"
5243 },
5244 "4": {
5245 "name": "keyword.operator.control.jsdoc"
5246 },
5247 "5": {
5248 "name": "entity.name.type.instance.jsdoc"
5249 }
5250 }
5251 },
5252 {
5253 "name": "meta.example.jsdoc",
5254 "begin": "((@)example)\\s+",
5255 "end": "(?=@|\\*/)",
5256 "beginCaptures": {
5257 "1": {
5258 "name": "storage.type.class.jsdoc"
5259 },
5260 "2": {
5261 "name": "punctuation.definition.block.tag.jsdoc"
5262 }
5263 },
5264 "patterns": [
5265 {
5266 "match": "^\\s\\*\\s+"
5267 },
5268 {
5269 "contentName": "constant.other.description.jsdoc",
5270 "begin": "\\G(<)caption(>)",
5271 "beginCaptures": {
5272 "0": {
5273 "name": "entity.name.tag.inline.jsdoc"
5274 },
5275 "1": {
5276 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5277 },
5278 "2": {
5279 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5280 }
5281 },
5282 "end": "(</)caption(>)|(?=\\*/)",
5283 "endCaptures": {
5284 "0": {
5285 "name": "entity.name.tag.inline.jsdoc"
5286 },
5287 "1": {
5288 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5289 },
5290 "2": {
5291 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5292 }
5293 }
5294 },
5295 {
5296 "match": "[^\\s@*](?:[^*]|\\*[^/])*",
5297 "captures": {
5298 "0": {
5299 "name": "source.embedded.ts"
5300 }
5301 }
5302 }
5303 ]
5304 },
5305 {
5306 "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
5307 "captures": {
5308 "1": {
5309 "name": "storage.type.class.jsdoc"
5310 },
5311 "2": {
5312 "name": "punctuation.definition.block.tag.jsdoc"
5313 },
5314 "3": {
5315 "name": "constant.language.symbol-type.jsdoc"
5316 }
5317 }
5318 },
5319 {
5320 "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)",
5321 "captures": {
5322 "1": {
5323 "name": "storage.type.class.jsdoc"
5324 },
5325 "2": {
5326 "name": "punctuation.definition.block.tag.jsdoc"
5327 },
5328 "3": {
5329 "name": "variable.other.link.underline.jsdoc"
5330 },
5331 "4": {
5332 "name": "entity.name.type.instance.jsdoc"
5333 }
5334 }
5335 },
5336 {
5337 "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)",
5338 "captures": {
5339 "1": {
5340 "name": "storage.type.class.jsdoc"
5341 },
5342 "2": {
5343 "name": "punctuation.definition.block.tag.jsdoc"
5344 },
5345 "3": {
5346 "name": "variable.other.jsdoc"
5347 }
5348 }
5349 },
5350 {
5351 "begin": "(?x)((@)template)\\s+(?={)",
5352 "beginCaptures": {
5353 "1": {
5354 "name": "storage.type.class.jsdoc"
5355 },
5356 "2": {
5357 "name": "punctuation.definition.block.tag.jsdoc"
5358 }
5359 },
5360 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5361 "patterns": [
5362 {
5363 "include": "#jsdoctype"
5364 },
5365 {
5366 "name": "variable.other.jsdoc",
5367 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5368 }
5369 ]
5370 },
5371 {
5372 "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
5373 "captures": {
5374 "1": {
5375 "name": "storage.type.class.jsdoc"
5376 },
5377 "2": {
5378 "name": "punctuation.definition.block.tag.jsdoc"
5379 },
5380 "3": {
5381 "name": "variable.other.jsdoc"
5382 }
5383 }
5384 },
5385 {
5386 "begin": "((@)typedef)\\s+(?={)",
5387 "beginCaptures": {
5388 "1": {
5389 "name": "storage.type.class.jsdoc"
5390 },
5391 "2": {
5392 "name": "punctuation.definition.block.tag.jsdoc"
5393 }
5394 },
5395 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5396 "patterns": [
5397 {
5398 "include": "#jsdoctype"
5399 },
5400 {
5401 "name": "entity.name.type.instance.jsdoc",
5402 "match": "(?:[^@\\s*/]|\\*[^/])+"
5403 }
5404 ]
5405 },
5406 {
5407 "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
5408 "beginCaptures": {
5409 "1": {
5410 "name": "storage.type.class.jsdoc"
5411 },
5412 "2": {
5413 "name": "punctuation.definition.block.tag.jsdoc"
5414 }
5415 },
5416 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5417 "patterns": [
5418 {
5419 "include": "#jsdoctype"
5420 },
5421 {
5422 "name": "variable.other.jsdoc",
5423 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5424 },
5425 {
5426 "name": "variable.other.jsdoc",
5427 "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/])+)?|(?=\\*/))",
5428 "captures": {
5429 "1": {
5430 "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
5431 },
5432 "2": {
5433 "name": "keyword.operator.assignment.jsdoc"
5434 },
5435 "3": {
5436 "name": "source.embedded.ts"
5437 },
5438 "4": {
5439 "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
5440 },
5441 "5": {
5442 "name": "invalid.illegal.syntax.jsdoc"
5443 }
5444 }
5445 }
5446 ]
5447 },
5448 {
5449 "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+(?={)",
5450 "beginCaptures": {
5451 "1": {
5452 "name": "storage.type.class.jsdoc"
5453 },
5454 "2": {
5455 "name": "punctuation.definition.block.tag.jsdoc"
5456 }
5457 },
5458 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5459 "patterns": [
5460 {
5461 "include": "#jsdoctype"
5462 }
5463 ]
5464 },
5465 {
5466 "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)",
5467 "captures": {
5468 "1": {
5469 "name": "storage.type.class.jsdoc"
5470 },
5471 "2": {
5472 "name": "punctuation.definition.block.tag.jsdoc"
5473 },
5474 "3": {
5475 "name": "entity.name.type.instance.jsdoc"
5476 }
5477 }
5478 },
5479 {
5480 "contentName": "variable.other.jsdoc",
5481 "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
5482 "beginCaptures": {
5483 "1": {
5484 "name": "storage.type.class.jsdoc"
5485 },
5486 "2": {
5487 "name": "punctuation.definition.block.tag.jsdoc"
5488 },
5489 "3": {
5490 "name": "variable.other.jsdoc"
5491 },
5492 "4": {
5493 "name": "punctuation.definition.string.begin.jsdoc"
5494 }
5495 },
5496 "end": "(\\3)|(?=$|\\*/)",
5497 "endCaptures": {
5498 "0": {
5499 "name": "variable.other.jsdoc"
5500 },
5501 "1": {
5502 "name": "punctuation.definition.string.end.jsdoc"
5503 }
5504 }
5505 },
5506 {
5507 "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
5508 "captures": {
5509 "1": {
5510 "name": "storage.type.class.jsdoc"
5511 },
5512 "2": {
5513 "name": "punctuation.definition.block.tag.jsdoc"
5514 },
5515 "3": {
5516 "name": "variable.other.jsdoc"
5517 }
5518 }
5519 },
5520 {
5521 "name": "storage.type.class.jsdoc",
5522 "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",
5523 "captures": {
5524 "1": {
5525 "name": "punctuation.definition.block.tag.jsdoc"
5526 }
5527 }
5528 },
5529 {
5530 "include": "#inline-tags"
5531 },
5532 {
5533 "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)",
5534 "captures": {
5535 "1": {
5536 "name": "storage.type.class.jsdoc"
5537 },
5538 "2": {
5539 "name": "punctuation.definition.block.tag.jsdoc"
5540 }
5541 }
5542 }
5543 ]
5544 },
5545 "brackets": {
5546 "patterns": [
5547 {
5548 "begin": "{",
5549 "end": "}|(?=\\*/)",
5550 "patterns": [
5551 {
5552 "include": "#brackets"
5553 }
5554 ]
5555 },
5556 {
5557 "begin": "\\[",
5558 "end": "\\]|(?=\\*/)",
5559 "patterns": [
5560 {
5561 "include": "#brackets"
5562 }
5563 ]
5564 }
5565 ]
5566 },
5567 "inline-tags": {
5568 "patterns": [
5569 {
5570 "name": "constant.other.description.jsdoc",
5571 "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
5572 "captures": {
5573 "1": {
5574 "name": "punctuation.definition.bracket.square.begin.jsdoc"
5575 },
5576 "2": {
5577 "name": "punctuation.definition.bracket.square.end.jsdoc"
5578 }
5579 }
5580 },
5581 {
5582 "name": "entity.name.type.instance.jsdoc",
5583 "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
5584 "beginCaptures": {
5585 "1": {
5586 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5587 },
5588 "2": {
5589 "name": "storage.type.class.jsdoc"
5590 },
5591 "3": {
5592 "name": "punctuation.definition.inline.tag.jsdoc"
5593 }
5594 },
5595 "end": "}|(?=\\*/)",
5596 "endCaptures": {
5597 "0": {
5598 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5599 }
5600 },
5601 "patterns": [
5602 {
5603 "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
5604 "captures": {
5605 "1": {
5606 "name": "variable.other.link.underline.jsdoc"
5607 },
5608 "2": {
5609 "name": "punctuation.separator.pipe.jsdoc"
5610 }
5611 }
5612 },
5613 {
5614 "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
5615 "captures": {
5616 "1": {
5617 "name": "variable.other.description.jsdoc"
5618 },
5619 "2": {
5620 "name": "punctuation.separator.pipe.jsdoc"
5621 }
5622 }
5623 }
5624 ]
5625 }
5626 ]
5627 },
5628 "jsdoctype": {
5629 "patterns": [
5630 {
5631 "contentName": "entity.name.type.instance.jsdoc",
5632 "begin": "\\G({)",
5633 "beginCaptures": {
5634 "0": {
5635 "name": "entity.name.type.instance.jsdoc"
5636 },
5637 "1": {
5638 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5639 }
5640 },
5641 "end": "((}))\\s*|(?=\\*/)",
5642 "endCaptures": {
5643 "1": {
5644 "name": "entity.name.type.instance.jsdoc"
5645 },
5646 "2": {
5647 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5648 }
5649 },
5650 "patterns": [
5651 {
5652 "include": "#brackets"
5653 }
5654 ]
5655 }
5656 ]
5657 }
5658 }
5659 }
5660