Skip to content

Commit d8222bf

Browse files
committed
update test
1 parent 1fb4f72 commit d8222bf

File tree

3 files changed

+43
-18
lines changed

3 files changed

+43
-18
lines changed
Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
=== tests/cases/compiler/test.js ===
2-
;
3-
No type information for this code./** @typedef {object} NotADuplicateIdentifier */
4-
No type information for this code.
5-
No type information for this code.(2 * 2);
6-
No type information for this code.
7-
No type information for this code./** @typedef {object} AlsoNotADuplicate */
8-
No type information for this code.
9-
No type information for this code.(2 * 2) + 1;
10-
No type information for this code.
11-
No type information for this code.
12-
No type information for this code.
2+
// @ts-check
3+
/** @typedef {number} NotADuplicateIdentifier */
4+
5+
(2 * 2);
6+
7+
/** @typedef {number} AlsoNotADuplicate */
8+
9+
(2 * 2) + 1;
10+
11+
12+
/**
13+
*
14+
* @param a {NotADuplicateIdentifier}
15+
* @param b {AlsoNotADuplicate}
16+
*/
17+
function makeSureTypedefsAreStillRecognized(a, b) {}
18+
>makeSureTypedefsAreStillRecognized : Symbol(makeSureTypedefsAreStillRecognized, Decl(test.js, 7, 12))
19+
>a : Symbol(a, Decl(test.js, 15, 44))
20+
>b : Symbol(b, Decl(test.js, 15, 46))
21+
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
=== tests/cases/compiler/test.js ===
2-
;
3-
/** @typedef {object} NotADuplicateIdentifier */
2+
// @ts-check
3+
/** @typedef {number} NotADuplicateIdentifier */
44

55
(2 * 2);
66
>(2 * 2) : number
77
>2 * 2 : number
88
>2 : 2
99
>2 : 2
1010

11-
/** @typedef {object} AlsoNotADuplicate */
11+
/** @typedef {number} AlsoNotADuplicate */
1212

1313
(2 * 2) + 1;
1414
>(2 * 2) + 1 : number
@@ -19,3 +19,13 @@
1919
>1 : 1
2020

2121

22+
/**
23+
*
24+
* @param a {NotADuplicateIdentifier}
25+
* @param b {AlsoNotADuplicate}
26+
*/
27+
function makeSureTypedefsAreStillRecognized(a, b) {}
28+
>makeSureTypedefsAreStillRecognized : (a: number, b: number) => void
29+
>a : number
30+
>b : number
31+
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
// @allowJs: true
2-
// @checkJs: true
32
// @noEmit: true
43

54
// @filename: test.js
6-
;
7-
/** @typedef {object} NotADuplicateIdentifier */
5+
// @ts-check
6+
/** @typedef {number} NotADuplicateIdentifier */
87

98
(2 * 2);
109

11-
/** @typedef {object} AlsoNotADuplicate */
10+
/** @typedef {number} AlsoNotADuplicate */
1211

1312
(2 * 2) + 1;
1413

14+
15+
/**
16+
*
17+
* @param a {NotADuplicateIdentifier}
18+
* @param b {AlsoNotADuplicate}
19+
*/
20+
function makeSureTypedefsAreStillRecognized(a, b) {}

0 commit comments

Comments
 (0)