Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Namespace

A namespace stores all dependencies

Hierarchy

  • Namespace

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Private interfaces

interfaces: Map<string, Interface> = ...

Accessors

empty

  • get empty(): boolean
  • Returns if this Namespace is empty or not

    Returns boolean

Methods

bind

  • Starts a dependency bind and returns an object to bind various values

    Type parameters

    • I

      Passed to {@link BindObject}

    Parameters

    • name: string

      The dependency name

    Returns ToObject<I>

rebind

resolve

  • resolve(dependency: string, filter?: Filter): unknown
  • resolve(dependency: string, filter?: Filter, array?: boolean): unknown
  • Resolves a dependency

    Parameters

    • dependency: string

      A dependency name (e.g. "SmallHouse")

    • Optional filter: Filter

      Filter dependencies

    Returns unknown

  • Resolves a dependency array

    Parameters

    • dependency: string

      A dependency name (e.g. "SmallHouse")

    • Optional filter: Filter

      Filter dependencies

    • Optional array: boolean

      If true, this will resolve an array. The array size can be controlled using {@link Filter.arrayMaxSize}

    Returns unknown

unbind

  • unbind(name: string): void
  • Unbinds a dependency

    Parameters

    • name: string

      The dependency name

    Returns void