• Take an instance of a model or an id and gets an instance

    Type Parameters

    Parameters

    • idOrModel: string | T

      Model or id

    • type: Type<T>

      Type of the model

    Returns T

    An instance of the model (same as given if it was already an instance)