Interface ContainerRead

Subset of container methods. Needs to be implemented to create decorators. Contains read methods from a Container by RefSymbol.

interface ContainerRead {
    get: (<T>(ref: RefSymbol<T>) => undefined | T);
    getOrFail: (<T>(ref: RefSymbol<T>) => T);
}

Hierarchy (view full)

Properties

Properties

get: (<T>(ref: RefSymbol<T>) => undefined | T)

Retrieves the data from the container referenced by the given RefSymbol. If there is no data available it returns undefined but never throws an exception.

Type declaration

    • <T>(ref): undefined | T
    • Type Parameters

      • T

      Parameters

      Returns undefined | T

      The referenced data from the container or undefined.

getOrFail: (<T>(ref: RefSymbol<T>) => T)

Retrieves the data from the container referenced by the given RefSymbol. If there is no data available it throws an exception defined by the container.

Type declaration

    • <T>(ref): T
    • Type Parameters

      • T

      Parameters

      Returns T

      The referenced data from the container.