• Wrap a newable class/function in a factory function.

    Type Parameters

    • const TArgs extends readonly unknown[]

      The argument types for the FactoryClass. Generally inferred.

    • const R

      The return type. Generally inferred.

    Parameters

    Returns FactoryFn<TArgs, R>

    A callable factory function.