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:
Nathan Shively-Sanders
2020-02-24 16:13:18 -08:00
committed by GitHub
parent 65e7acce58
commit 3e3df8702c
4 changed files with 53 additions and 1 deletions

View File

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