Function makePromiseSpace
- makePromiseSpace<T>(optsOrLog?): PromiseSpaceOf<T, {}, {}>
Type Parameters
- T extends Record<string, unknown> = Record<string, unknown>
Parameters
Optional
optsOrLog: {
(...data: any[]): void;
(message?: any, ...optionalParams: any[]): void;
} | ({ log?: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; } | undefined; } & ({ hooks?: PromiseSpaceHooks | undefined; } | { store: MapStore<string, any>; })) = {}
Make { produce, consume } where for each name,
consume[name]
is a promise andproduce[name].resolve
resolves it.Note: repeated resolve()s without an intervening reset() are noops.