nano-injector
    Preparing search index...

    Interface Provider<T>

    A Provider is a core concept in the library. It is essentially a function that facilitates binding to a specific value.

    interface Provider<T> {
        "[ID_SYMBOL]": number;
        "[NAME_SYMBOL]"?: string;
        (): T;
        <DefValT>(defValue: DefValT): T | DefValT;
    }

    Type Parameters

    • T
    • Returns the value bound to this provider. Throws an exception if the value is not found. To avoid an exception, pass a default value.

      Returns T

    • Returns the value bound to this provider, or the default value if the bound value is not found.

      Type Parameters

      • DefValT

      Parameters

      Returns T | DefValT

    Index

    Properties

    "[ID_SYMBOL]": number
    "[NAME_SYMBOL]"?: string