UNPKG

@bigmi/core

Version:

TypeScript library for Bitcoin apps.

10 lines (9 loc) 355 B
type PollOptions<T> = { emitOnBegin?: boolean | undefined; initialWaitTime?: ((data: T | undefined) => Promise<number>) | undefined; interval: number; }; export declare function poll<T>(fn: ({ unpoll }: { unpoll: () => void; }) => Promise<T | undefined>, { emitOnBegin, initialWaitTime, interval }: PollOptions<T>): () => void; export {};