Interface TypeResolvingService

interface TypeResolvingService {
    resolve<T extends Type = Type>(selector: unknown): T;
    tryToResolve<T extends Type = Type>(selector: unknown): undefined | T;
}

Implemented by

Methods

  • Finds the specified type in the type system. This method does not care about the initialization state of the found type, this method is restricted to just search and find any type according to the given TypeSelector.

    Type Parameters

    Parameters

    • selector: unknown

      the specification for the desired type

    Returns T

    the found type; or an exception, if the type cannot be resolved

  • Tries to find the specified type in the type system. This method does not care about the initialization state of the found type, this method is restricted to just search and find any type according to the given TypeSelector.

    Type Parameters

    Parameters

    • selector: unknown

      the specification for the desired type

    Returns undefined | T

    the found type or undefined, it there is no such type in the type system