UNPKG

react-dayo

Version:

A Queue component for notification etc

34 lines (33 loc) 767 B
import { IInterval } from './interfaces'; /** * Value Object */ export declare class Interval implements IInterval { private static instance; static create(): Interval; private emitter; private constructor(); private items; private intervalId; /** * just run with `window.setInterval` */ private startTick; /** * Weather running `window.setInterval` */ private isRunningTick; /** * To stop running `window.setInterval` */ private stopTick; private hasItems; /** * whether item has */ private has; private add; private remove; wait(item: unknown, condition: (onTick: (cb: () => void) => void) => Promise<void>): Promise<void>; } export default Interval;