Skip to content

Commit f0c3aab

Browse files
Type arguments
1 parent f132dd3 commit f0c3aab

File tree

6 files changed

+92
-10
lines changed

6 files changed

+92
-10
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
let value: Map<string, number>;
2+
---
3+
4+
[#1 Range] =
5+
[#1 Domain] = 0:0-0:31
6+
>-------------------------------<
7+
0| let value: Map<string, number>;
8+
9+
10+
[#2 Range] =
11+
[#2 Domain] = 0:15-0:29
12+
>--------------<
13+
0| let value: Map<string, number>;
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
let value: Map<string, number>;
2+
---
3+
4+
[#1 Content] = 0:11-0:30
5+
>-------------------<
6+
0| let value: Map<string, number>;
7+
8+
[#1 Removal] = 0:9-0:30
9+
>---------------------<
10+
0| let value: Map<string, number>;
11+
12+
[#1 Leading delimiter] = 0:10-0:11
13+
>-<
14+
0| let value: Map<string, number>;
15+
16+
[#1 Domain] = 0:0-0:31
17+
>-------------------------------<
18+
0| let value: Map<string, number>;
19+
20+
[#1 Insertion delimiter] = " "
21+
22+
23+
[#2 Content] =
24+
[#2 Removal] =
25+
[#2 Domain] = 0:15-0:21
26+
>------<
27+
0| let value: Map<string, number>;
28+
29+
[#2 Insertion delimiter] = " "
30+
31+
32+
[#3 Content] =
33+
[#3 Domain] = 0:23-0:29
34+
>------<
35+
0| let value: Map<string, number>;
36+
37+
[#3 Removal] = 0:22-0:29
38+
>-------<
39+
0| let value: Map<string, number>;
40+
41+
[#3 Leading delimiter] = 0:22-0:23
42+
>-<
43+
0| let value: Map<string, number>;
44+
45+
[#3 Insertion delimiter] = " "
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
<Aaa>bbb
22
---
33

4-
[Content] = 0:1-0:4
4+
[#1 Content] = 0:1-0:4
55
>---<
66
0| <Aaa>bbb
77

8-
[Removal] = 0:0-0:5
8+
[#1 Removal] = 0:0-0:5
99
>-----<
1010
0| <Aaa>bbb
1111

12-
[Domain] = 0:0-0:8
12+
[#1 Domain] = 0:0-0:8
1313
>--------<
1414
0| <Aaa>bbb
1515

16-
[Insertion delimiter] = " "
16+
[#1 Insertion delimiter] = " "
17+
18+
19+
[#2 Content] =
20+
[#2 Removal] =
21+
[#2 Domain] = 0:1-0:4
22+
>---<
23+
0| <Aaa>bbb
24+
25+
[#2 Insertion delimiter] = " "

packages/common/src/scopeSupportFacets/typescript.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { javascriptCoreScopeSupport } from "./javascript";
22
import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types";
33
import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types";
44

5-
const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;
5+
const { supported, notApplicable } = ScopeSupportFacetLevel;
66

77
export const typescriptScopeSupport: LanguageScopeSupportFacetMap = {
88
...javascriptCoreScopeSupport,
@@ -21,14 +21,11 @@ export const typescriptScopeSupport: LanguageScopeSupportFacetMap = {
2121
"type.enum": supported,
2222
"type.return": supported,
2323
"type.variable": supported,
24+
"type.typeArgument": supported,
25+
"type.typeArgument.iteration": supported,
2426

2527
"value.typeAlias": supported,
2628

27-
// Unsupported
28-
29-
"type.typeArgument": unsupported,
30-
"type.typeArgument.iteration": unsupported,
31-
3229
// Not applicable
3330

3431
element: notApplicable,

queries/java.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@
495495
">" @type.iteration.end.startOf
496496
.
497497
)
498+
498499
;;!! foo(name: string) {}
499500
;;! ^^^^^^^^^^^^
500501
(

queries/typescript.core.scm

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,26 @@
406406
"=>" @disqualifyDelimiter
407407
)
408408

409+
;;!! class Aaa { }
410+
;;! ^
409411
(class_body
410412
.
411413
"{" @type.iteration.start.endOf
412414
"}" @type.iteration.end.startOf
413415
.
414416
)
417+
418+
;;!! Map<string, number>
419+
;;! ^^^^^^ ^^^^^^
420+
(type_arguments
421+
(_) @type
422+
)
423+
424+
;;!! Map<string, number>
425+
;;! ^^^^^^^^^^^^^^
426+
(type_arguments
427+
.
428+
"<" @type.iteration.start.endOf
429+
">" @type.iteration.end.startOf
430+
.
431+
)

0 commit comments

Comments
 (0)