@lppedd/di-wise-neo - v0.19.0
    Preparing search index...

    Function optional

    • Injects the instance associated with the given class, or undefined if the class is not registered in the container.

      Throws an error if a circular dependency is detected. Use optionalBy if resolving circular dependencies is necessary.

      Type Parameters

      • Instance extends object

      Parameters

      Returns Instance | undefined

    • Injects the value associated with the given token, or undefined if the token is not registered in the container.

      Throws an error if a circular dependency is detected. Use optionalBy if resolving circular dependencies is necessary.

      Type Parameters

      • Value

      Parameters

      Returns Value | undefined