File tree Expand file tree Collapse file tree 4 files changed +112
-0
lines changed
tests/baselines/reference/JSDocParsing Expand file tree Collapse file tree 4 files changed +112
-0
lines changed Original file line number Diff line number Diff line change @@ -6502,6 +6502,8 @@ namespace ts {
6502
6502
case "augments" :
6503
6503
tag = parseAugmentsTag ( atToken , tagName ) ;
6504
6504
break ;
6505
+ case "arg" :
6506
+ case "argument" :
6505
6507
case "param" :
6506
6508
tag = parseParamTag ( atToken , tagName ) ;
6507
6509
break ;
Original file line number Diff line number Diff line change @@ -241,6 +241,18 @@ namespace ts {
241
241
*/` ) ;
242
242
243
243
244
+ parsesCorrectly ( "argSynonymForParamTag" ,
245
+ `/**
246
+ * @arg {number} name1 Description
247
+ */` ) ;
248
+
249
+
250
+ parsesCorrectly ( "argumentSynonymForParamTag" ,
251
+ `/**
252
+ * @argument {number} name1 Description
253
+ */` ) ;
254
+
255
+
244
256
parsesCorrectly ( "templateTag" ,
245
257
`/**
246
258
* @template T
Original file line number Diff line number Diff line change
1
+ {
2
+ "kind" : " JSDocComment" ,
3
+ "pos" : 0 ,
4
+ "end" : 44 ,
5
+ "tags" : {
6
+ "0" : {
7
+ "kind" : " JSDocParameterTag" ,
8
+ "pos" : 8 ,
9
+ "end" : 27 ,
10
+ "atToken" : {
11
+ "kind" : " AtToken" ,
12
+ "pos" : 8 ,
13
+ "end" : 9
14
+ },
15
+ "tagName" : {
16
+ "kind" : " Identifier" ,
17
+ "pos" : 9 ,
18
+ "end" : 12 ,
19
+ "text" : " arg"
20
+ },
21
+ "typeExpression" : {
22
+ "kind" : " JSDocTypeExpression" ,
23
+ "pos" : 13 ,
24
+ "end" : 21 ,
25
+ "type" : {
26
+ "kind" : " NumberKeyword" ,
27
+ "pos" : 14 ,
28
+ "end" : 20
29
+ }
30
+ },
31
+ "postParameterName" : {
32
+ "kind" : " Identifier" ,
33
+ "pos" : 22 ,
34
+ "end" : 27 ,
35
+ "text" : " name1"
36
+ },
37
+ "parameterName" : {
38
+ "kind" : " Identifier" ,
39
+ "pos" : 22 ,
40
+ "end" : 27 ,
41
+ "text" : " name1"
42
+ },
43
+ "comment" : " Description"
44
+ },
45
+ "length" : 1 ,
46
+ "pos" : 8 ,
47
+ "end" : 27
48
+ }
49
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "kind" : " JSDocComment" ,
3
+ "pos" : 0 ,
4
+ "end" : 49 ,
5
+ "tags" : {
6
+ "0" : {
7
+ "kind" : " JSDocParameterTag" ,
8
+ "pos" : 8 ,
9
+ "end" : 32 ,
10
+ "atToken" : {
11
+ "kind" : " AtToken" ,
12
+ "pos" : 8 ,
13
+ "end" : 9
14
+ },
15
+ "tagName" : {
16
+ "kind" : " Identifier" ,
17
+ "pos" : 9 ,
18
+ "end" : 17 ,
19
+ "text" : " argument"
20
+ },
21
+ "typeExpression" : {
22
+ "kind" : " JSDocTypeExpression" ,
23
+ "pos" : 18 ,
24
+ "end" : 26 ,
25
+ "type" : {
26
+ "kind" : " NumberKeyword" ,
27
+ "pos" : 19 ,
28
+ "end" : 25
29
+ }
30
+ },
31
+ "postParameterName" : {
32
+ "kind" : " Identifier" ,
33
+ "pos" : 27 ,
34
+ "end" : 32 ,
35
+ "text" : " name1"
36
+ },
37
+ "parameterName" : {
38
+ "kind" : " Identifier" ,
39
+ "pos" : 27 ,
40
+ "end" : 32 ,
41
+ "text" : " name1"
42
+ },
43
+ "comment" : " Description"
44
+ },
45
+ "length" : 1 ,
46
+ "pos" : 8 ,
47
+ "end" : 32
48
+ }
49
+ }
You can’t perform that action at this time.
0 commit comments