Namespace used to resolve naming conflicts.

Hierarchy

  • EsNamespace

Implements

Constructors

Accessors

Methods

  • Registers symbol within namespace and assigns a name for it.

    The symbol will be visible within namespace itself and its nested ones.

    Called by symbol declaration method.

    Type Parameters

    • TNaming extends EsNaming

      Type of symbol naming.

    Parameters

    • symbol: EsSymbol<TNaming>

      Symbol to bind.

    • createNaming: ((naming) => TNaming)

      Naming factory function that accepts partial symbol naming.

        • (naming): TNaming
        • Parameters

          Returns TNaming

    Returns TNaming

    Symbol naming.

    Throws

    TypeError if the symbol is already named within another namespace.

  • Checks whether this namespace encloses another one.

    Parameters

    Returns boolean

    true if the given namespace is nested within this namespace or any namespaces nested within it, or false otherwise.

  • Searches for the symbol named in this namespace or one of enclosing namespaces.

    Type Parameters

    • TNaming extends EsNaming

      Type of symbol naming.

    Parameters

    Returns undefined | TNaming

    Either found symbol naming, or undefined when symbol is not visible.

Generated using TypeDoc