MCPcopy
hub / github.com/jsdoc/jsdoc / resolveEnum

Method resolveEnum

lib/jsdoc/src/parser.js:639–659  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

637
638 // TODO: docs
639 resolveEnum(e) {
640 const doclets = this.resolvePropertyParents(e.code.node.parent);
641
642 doclets.forEach(doclet => {
643 if (doclet && doclet.isEnum) {
644 doclet.properties = doclet.properties || [];
645
646 // members of an enum inherit the enum's type
647 if (doclet.type && !e.doclet.type) {
648 // clone the type to prevent circular refs
649 e.doclet.type = jsdoc.util.doop(doclet.type);
650 }
651
652 delete e.doclet.undocumented;
653 e.doclet.defaultvalue = e.doclet.meta.code.value;
654
655 // add the doclet to the parent's properties
656 doclet.properties.push(e.doclet);
657 }
658 });
659 }
660}
661exports.Parser = Parser;
662

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected