How to use the jsdoctypeparser.Builder.ModuleName function in jsdoctypeparser

To help you get started, we’ve selected a few jsdoctypeparser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jscs-dev / jscs-jsdoc / lib / jsdoc.js View on Github external
if (node.entries) {
                res.concat(node.entries.map(function(subnode) {
                    subnode.parentElement = node;
                    _iterateDocTypes(subnode, cb);
                }));
            }
            break;

        case node instanceof TypeBuilder.RecordType.Entry:
            // name: string,
            // typeUnion: TypeUnion
            node.typeUnion.collectionNode = node;
            res = _iterateDocTypes(node.typeUnion, cb);
            break;

        case node instanceof TypeBuilder.ModuleName:
            node.typeName = node.name;
            node.module = true;
            res = cb(node);
            break;

        default:
            throw new Error('DocType: Unsupported doc node');
    }

    return res;
}