forked from microsoft/TypeScript
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bind typedef/enum on all assignment decl kinds (microsoft#33240)
This fixes a crash on exports, but the code now handles all kinds returned from getAssignmentDeclarationPropertyAccessKind.
- Loading branch information
1 parent
31c8659
commit e896ad9
Showing
7 changed files
with
84 additions
and
1 deletion.
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/conformance/jsdoc/enumTagOnExports.js === | ||
/** @enum {number} */ | ||
exports.a = {}; | ||
>exports.a : Symbol(a, Decl(enumTagOnExports.js, 0, 0), Decl(enumTagOnExports.js, 1, 8), Decl(enumTagOnExports.js, 0, 4)) | ||
>exports : Symbol(a, Decl(enumTagOnExports.js, 0, 0), Decl(enumTagOnExports.js, 1, 8), Decl(enumTagOnExports.js, 0, 4)) | ||
>a : Symbol(a, Decl(enumTagOnExports.js, 0, 0), Decl(enumTagOnExports.js, 1, 8), Decl(enumTagOnExports.js, 0, 4)) | ||
|
||
/** @enum {string} */ | ||
module.exports.b = {}; | ||
>module.exports.b : Symbol(b, Decl(enumTagOnExports.js, 1, 15), Decl(enumTagOnExports.js, 4, 15), Decl(enumTagOnExports.js, 3, 4)) | ||
>module.exports : Symbol(b, Decl(enumTagOnExports.js, 1, 15), Decl(enumTagOnExports.js, 4, 15), Decl(enumTagOnExports.js, 3, 4)) | ||
>module : Symbol(module, Decl(enumTagOnExports.js, 1, 15)) | ||
>exports : Symbol("tests/cases/conformance/jsdoc/enumTagOnExports", Decl(enumTagOnExports.js, 0, 0)) | ||
>b : Symbol(b, Decl(enumTagOnExports.js, 1, 15), Decl(enumTagOnExports.js, 4, 15), Decl(enumTagOnExports.js, 3, 4)) | ||
|
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/conformance/jsdoc/enumTagOnExports.js === | ||
/** @enum {number} */ | ||
exports.a = {}; | ||
>exports.a = {} : {} | ||
>exports.a : typeof a | ||
>exports : typeof import("tests/cases/conformance/jsdoc/enumTagOnExports") | ||
>a : typeof a | ||
>{} : {} | ||
|
||
/** @enum {string} */ | ||
module.exports.b = {}; | ||
>module.exports.b = {} : {} | ||
>module.exports.b : typeof b | ||
>module.exports : typeof import("tests/cases/conformance/jsdoc/enumTagOnExports") | ||
>module : { "tests/cases/conformance/jsdoc/enumTagOnExports": typeof import("tests/cases/conformance/jsdoc/enumTagOnExports"); } | ||
>exports : typeof import("tests/cases/conformance/jsdoc/enumTagOnExports") | ||
>b : typeof b | ||
>{} : {} | ||
|
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,7 @@ | ||
=== tests/cases/conformance/jsdoc/enumTagOnExports.js === | ||
/** @enum {string} */ | ||
module.exports = {}; | ||
>module.exports : Symbol("tests/cases/conformance/jsdoc/enumTagOnExports", Decl(enumTagOnExports.js, 0, 0)) | ||
>module : Symbol(module, Decl(enumTagOnExports.js, 0, 0)) | ||
>exports : Symbol("tests/cases/conformance/jsdoc/enumTagOnExports", Decl(enumTagOnExports.js, 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,9 @@ | ||
=== tests/cases/conformance/jsdoc/enumTagOnExports.js === | ||
/** @enum {string} */ | ||
module.exports = {}; | ||
>module.exports = {} : typeof import("tests/cases/conformance/jsdoc/enumTagOnExports") | ||
>module.exports : typeof import("tests/cases/conformance/jsdoc/enumTagOnExports") | ||
>module : { "tests/cases/conformance/jsdoc/enumTagOnExports": typeof import("tests/cases/conformance/jsdoc/enumTagOnExports"); } | ||
>exports : typeof import("tests/cases/conformance/jsdoc/enumTagOnExports") | ||
>{} : {} | ||
|
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,10 @@ | ||
// @filename: enumTagOnExports.js | ||
// @allowjs: true | ||
// @checkjs: true | ||
// @noemit: true | ||
|
||
/** @enum {number} */ | ||
exports.a = {}; | ||
|
||
/** @enum {string} */ | ||
module.exports.b = {}; |
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,7 @@ | ||
// @filename: enumTagOnExports.js | ||
// @allowjs: true | ||
// @checkjs: true | ||
// @noemit: true | ||
|
||
/** @enum {string} */ | ||
module.exports = {}; |