Function optional

  • Decorate a token with an optional value. This value is be used as default value in case a container does not have registered token.

    Type Parameters

    • T

    Parameters

    • token: Token<T>

      Existed token.

    • optionalValue: T

      Default value for the resolver.

    Returns OptionalToken<T>

  • Type Parameters

    • T

    Parameters

    Returns OptionalToken<T | undefined>

Generated using TypeDoc