Interface IContainer<T>

A light weight inversion of control (IOC) container

interface IContainer<T> {
    Get<D>(dependency): D;
    Init(t): void;
}

Type Parameters

  • T

Implemented by

Methods

Methods

  • Retrieve the desired dependency through type safe lambda syntax

    Type Parameters

    • D

    Parameters

    • dependency: ((t) => D)

      Selection function for the desired dependency

        • (t): D
        • Parameters

          Returns D

    Returns D

  • Set the dependencies to be managed by the Container Call this method outside the module which constructs the Container instance in order to preserve inversion.

    Parameters

    • t: T

      Concrete dependencies conforming to abstractions in T

    Returns void

Generated using TypeDoc