UNPKG

628 BTypeScriptView Raw
1import type { Callback } from '@polkadot/types/types';
2import type { UnsubscribePromise } from '../types/index.js';
3export type CombinatorCallback<T extends unknown[]> = Callback<T>;
4export type CombinatorFunction = (cb: Callback<any>) => UnsubscribePromise;
5export declare class Combinator<T extends unknown[] = unknown[]> {
6 #private;
7 constructor(fns: (CombinatorFunction | [CombinatorFunction, ...unknown[]])[], callback: CombinatorCallback<T>);
8 protected _allHasFired(): boolean;
9 protected _createCallback(index: number): (value: any) => void;
10 protected _triggerUpdate(): void;
11 unsubscribe(): void;
12}