TypeScript/tests/cases/conformance/jsdoc/exportedAliasedEnumTag.ts
Nathan Shively-Sanders 3e3df8702c
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"
};
```
2020-02-24 16:13:18 -08:00

10 lines
173 B
TypeScript

// @noemit: true
// @allowjs: true
// @filename: exportedAliasedEnumTag.js
var middlewarify = module.exports = {};
/** @enum */
middlewarify.Type = {
BEFORE: 'before'
};