Skip to content

Commit 0ead501

Browse files
author
Yui T
committed
Update tests and baselines
1 parent 4838eff commit 0ead501

File tree

5 files changed

+44
-30
lines changed

5 files changed

+44
-30
lines changed

tests/baselines/reference/jsDocTypeTag2.js

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -431,28 +431,8 @@
431431
"kind": "space"
432432
},
433433
{
434-
"text": "(",
435-
"kind": "punctuation"
436-
},
437-
{
438-
"text": ")",
439-
"kind": "punctuation"
440-
},
441-
{
442-
"text": " ",
443-
"kind": "space"
444-
},
445-
{
446-
"text": "=>",
447-
"kind": "punctuation"
448-
},
449-
{
450-
"text": " ",
451-
"kind": "space"
452-
},
453-
{
454-
"text": "any",
455-
"kind": "keyword"
434+
"text": "Function",
435+
"kind": "localName"
456436
}
457437
],
458438
"documentation": [],

tests/baselines/reference/jsDocTypes2.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ anyT1 = "hi";
1111
const x = (a) => a + 1;
1212
x(1);
1313

14+
/** @type {function} */
15+
const y = (a) => a + 1;
16+
x(1);
17+
1418
/** @type {function (number)} */
1519
const x1 = (a) => a + 1;
1620
x1(0);
@@ -29,6 +33,9 @@ anyT1 = "hi";
2933
/** @type {Function} */
3034
var x = function (a) { return a + 1; };
3135
x(1);
36+
/** @type {function} */
37+
var y = function (a) { return a + 1; };
38+
x(1);
3239
/** @type {function (number)} */
3340
var x1 = function (a) { return a + 1; };
3441
x1(0);

tests/baselines/reference/jsDocTypes2.symbols

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,30 @@ const x = (a) => a + 1;
2020
x(1);
2121
>x : Symbol(x, Decl(0.js, 9, 5))
2222

23+
/** @type {function} */
24+
const y = (a) => a + 1;
25+
>y : Symbol(y, Decl(0.js, 13, 5))
26+
>a : Symbol(a, Decl(0.js, 13, 11))
27+
>a : Symbol(a, Decl(0.js, 13, 11))
28+
29+
x(1);
30+
>x : Symbol(x, Decl(0.js, 9, 5))
31+
2332
/** @type {function (number)} */
2433
const x1 = (a) => a + 1;
25-
>x1 : Symbol(x1, Decl(0.js, 13, 5))
26-
>a : Symbol(a, Decl(0.js, 13, 12))
27-
>a : Symbol(a, Decl(0.js, 13, 12))
34+
>x1 : Symbol(x1, Decl(0.js, 17, 5))
35+
>a : Symbol(a, Decl(0.js, 17, 12))
36+
>a : Symbol(a, Decl(0.js, 17, 12))
2837

2938
x1(0);
30-
>x1 : Symbol(x1, Decl(0.js, 13, 5))
39+
>x1 : Symbol(x1, Decl(0.js, 17, 5))
3140

3241
/** @type {function (number): number} */
3342
const x2 = (a) => a + 1;
34-
>x2 : Symbol(x2, Decl(0.js, 17, 5))
35-
>a : Symbol(a, Decl(0.js, 17, 12))
36-
>a : Symbol(a, Decl(0.js, 17, 12))
43+
>x2 : Symbol(x2, Decl(0.js, 21, 5))
44+
>a : Symbol(a, Decl(0.js, 21, 12))
45+
>a : Symbol(a, Decl(0.js, 21, 12))
3746

3847
x2(0);
39-
>x2 : Symbol(x2, Decl(0.js, 17, 5))
48+
>x2 : Symbol(x2, Decl(0.js, 21, 5))
4049

tests/baselines/reference/jsDocTypes2.types

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ x(1);
2929
>x : Function
3030
>1 : 1
3131

32+
/** @type {function} */
33+
const y = (a) => a + 1;
34+
>y : Function
35+
>(a) => a + 1 : (a: any) => any
36+
>a : any
37+
>a + 1 : any
38+
>a : any
39+
>1 : 1
40+
41+
x(1);
42+
>x(1) : any
43+
>x : Function
44+
>1 : 1
45+
3246
/** @type {function (number)} */
3347
const x1 = (a) => a + 1;
3448
>x1 : (arg0: number) => any

tests/cases/conformance/salsa/jsDocTypes2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ anyT1 = "hi";
1414
const x = (a) => a + 1;
1515
x(1);
1616

17+
/** @type {function} */
18+
const y = (a) => a + 1;
19+
x(1);
20+
1721
/** @type {function (number)} */
1822
const x1 = (a) => a + 1;
1923
x1(0);

0 commit comments

Comments
 (0)