factory
Generic types: | T R TCacheData |
The factory function is a powerful tool for creating complex builders. It should be used when you need to build something based on the results of multiple other builders.
Presentation
function factory (
tag: string,
builders: readonly ObservableInput <BuilderState <T>>[],
buildFn: (...args: T[]) => R | Promise<R>,
cacheStrategy?: CacheStrategy <TCacheData, R> | undefined,
): Builder <R>;
Returns
Parameters
Name | Type | Description |
---|---|---|
tag | string | @param tag - A string that identifies the builder. |
builders | readonly | @param builders - An array of Observables of BuilderState. |
buildFn | (...args: T[]) => R | Promise<R> | @param buildFn - A function that takes the results of the successful Observables and returns a Promise. |
cacheStrategy |
| @param cacheStrategy - An optional CacheStrategy object. |