UNPKG

@ng-doc/builder

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

13 lines (12 loc) 856 B
import { ObservableInputTuple } from 'rxjs'; import { Builder, BuilderState, CacheStrategy } from '../types'; /** * 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. * @param tag - A string that identifies the builder. * @param builders - An array of Observables of BuilderState. * @param buildFn - A function that takes the results of the successful Observables and returns a Promise. * @param cacheStrategy - An optional CacheStrategy object. * @returns An Observable of BuilderState. */ export declare function factory<T, R, TCacheData>(tag: string, builders: readonly [...ObservableInputTuple<Array<BuilderState<T>>>], buildFn: (...args: T[]) => Promise<R> | R, cacheStrategy?: CacheStrategy<TCacheData, R>): Builder<R>;