Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix jsdoc iterator on expression of export assignment (#30558)
- Loading branch information
1 parent
867c992
commit b8e3c41
Showing
7 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=== tests/cases/compiler/a.js === | ||
/** | ||
No type information for this code. * A number, or a string containing a number. | ||
No type information for this code. * @typedef {(number|string)} NumberLike | ||
No type information for this code. */ | ||
No type information for this code. | ||
No type information for this code./** @type {NumberLike[]} */export default ([ ]); | ||
No type information for this code. | ||
No type information for this code.=== tests/cases/compiler/b.ts === | ||
import A from './a' | ||
>A : Symbol(A, Decl(b.ts, 0, 6)) | ||
|
||
A[0] | ||
>A : Symbol(A, Decl(b.ts, 0, 6)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
=== tests/cases/compiler/a.js === | ||
/** | ||
* A number, or a string containing a number. | ||
* @typedef {(number|string)} NumberLike | ||
*/ | ||
|
||
/** @type {NumberLike[]} */export default ([ ]); | ||
>([ ]) : (string | number)[] | ||
>[ ] : undefined[] | ||
|
||
=== tests/cases/compiler/b.ts === | ||
import A from './a' | ||
>A : (string | number)[] | ||
|
||
A[0] | ||
>A[0] : string | number | ||
>A : (string | number)[] | ||
>0 : 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=== tests/cases/compiler/a.js === | ||
/** | ||
No type information for this code. * A number, or a string containing a number. | ||
No type information for this code. * @typedef {(number|string)} NumberLike | ||
No type information for this code. */ | ||
No type information for this code. | ||
No type information for this code.export default /** @type {NumberLike[]} */([ ]); | ||
No type information for this code. | ||
No type information for this code.=== tests/cases/compiler/b.ts === | ||
import A from './a' | ||
>A : Symbol(A, Decl(b.ts, 0, 6)) | ||
|
||
A[0] | ||
>A : Symbol(A, Decl(b.ts, 0, 6)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
=== tests/cases/compiler/a.js === | ||
/** | ||
* A number, or a string containing a number. | ||
* @typedef {(number|string)} NumberLike | ||
*/ | ||
|
||
export default /** @type {NumberLike[]} */([ ]); | ||
>([ ]) : (string | number)[] | ||
>[ ] : undefined[] | ||
|
||
=== tests/cases/compiler/b.ts === | ||
import A from './a' | ||
>A : (string | number)[] | ||
|
||
A[0] | ||
>A[0] : string | number | ||
>A : (string | number)[] | ||
>0 : 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
// @allowJs: true | ||
// @checkJs: true | ||
// @noEmit: true | ||
|
||
/** | ||
* A number, or a string containing a number. | ||
* @typedef {(number|string)} NumberLike | ||
*/ | ||
|
||
// @Filename: a.js | ||
/** @type {NumberLike[]} */export default ([ ]); | ||
|
||
// @Filename: b.ts | ||
import A from './a' | ||
A[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
// @allowJs: true | ||
// @checkJs: true | ||
// @noEmit: true | ||
|
||
/** | ||
* A number, or a string containing a number. | ||
* @typedef {(number|string)} NumberLike | ||
*/ | ||
|
||
// @Filename: a.js | ||
export default /** @type {NumberLike[]} */([ ]); | ||
|
||
// @Filename: b.ts | ||
import A from './a' | ||
A[0] |