Registry Class

Defined in: packages/megadoc-plugin-js/lib/Parser/Registry.js

A registry of all the docs and their AST nodes and paths.

Constructor Documentation

Registry()

Static Property Documentation

  • docs: Array.<Object>

    lololo

Instance Method Documentation

    findAliasedLendTarget(path: recast.path, alias: String) -> Object

    This will look for an identifier that has a @lends entry. For example:

    /** @lends Something * /
    var helpers = {};
    
    /** @module * /
    var Something = {};
    
    helpers.someProp = '5'; // <- at this path, we will locate "helpers"
                            // above

    Parameters (2)

    path
    recast.path
    alias
    String

    The name of the identifier. In the example above, this will be "helpers" (as this will be the receiver we parse during analysis.)

    Return Value

    lendEntry
    Object

    findAliasedReceiver() -> String

    Return Value

    String

    The actual/resolved receiver.

    findClosestLend(path: recast.path) -> Object

    Locate the closest @lend doc to a given path.

    Parameters (1)

    path
    recast.path

    Return Values

    lendEntry
    Object
    lendEntry.receiver
    String

    The target of the @lends.

    lendEntry.scope
    String

    Could be a "prototype" if @lends Something.prototype.

    findClosestModule(path: recast.path) -> String

    Locate the first (if any) module doc whose path is an ancestor of the given path.

    Parameters (1)

    path
    recast.path

    Return Value

    String

    The module ID.