mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 20:14:05 -05:00
Fix crash on aliased,exported @enum tag in jsdoc (#36996)
THe code to bind `@enum` and `@typedef` didn't handle the case that the
`@enum` was on a property assignment to an alias of module.exports.
Specifically, `x` needs to be correctly aliased to the file's symbol in
the example below:
```
var x = module.exports = {};
/** @enum {string} */
x.E = {
A: "A"
};
```
This commit is contained in:
committed by
GitHub
parent
65e7acce58
commit
3e3df8702c
9
tests/cases/conformance/jsdoc/exportedAliasedEnumTag.ts
Normal file
9
tests/cases/conformance/jsdoc/exportedAliasedEnumTag.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// @noemit: true
|
||||
// @allowjs: true
|
||||
// @filename: exportedAliasedEnumTag.js
|
||||
var middlewarify = module.exports = {};
|
||||
|
||||
/** @enum */
|
||||
middlewarify.Type = {
|
||||
BEFORE: 'before'
|
||||
};
|
||||
Reference in New Issue
Block a user