• Curried function that will produce a function that can be used to retrieve or create new instances of a IFutureModel given an ID and options.

    Parameters

    Returns ((modelId) => ((futureOptions) => IFutureModel<Record<string, unknown>>))

    • an instance of the IFutureModel that was either created or retrieved from the KOS Model framework if already existing.

    Remarks

    This serves as a convenience allowing for models to consumers to use a shorthand method when multiple models need to be created. The first level of function will accept a KOS Model Factory and return a function that can accept a single model ID parameter. This will return a factory function that can accept a model options parameter and instantiate a new instance of a model or retrieve a an existing model.