UNPKG

610 BTypeScriptView Raw
1declare namespace setupThrobber {
2 export interface Throbber {
3 start(): void;
4 stop(): void;
5 restart(): void;
6 }
7
8 export class Iterator {
9 readonly index: number;
10 readonly running: boolean;
11 next(): string;
12 reset(): string;
13 }
14}
15/**
16 * Writes throbber string to *write* function at given *interval*. Optionally throbber output can be formatted with given *format* function
17 */
18declare function setupThrobber(write: (str: string) => void, interval: number, format?: (throbber: string) => string): setupThrobber.Throbber;
19export = setupThrobber;