forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ora.d.ts
26 lines (25 loc) · 786 Bytes
/
ora.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Type definitions for ora
// Project: https://github.com/sindresorhus/ora
// Definitions by: Basarat Ali Syed <https://github.com/basarat/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'ora' {
type Color = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray';
type Text = string;
interface Options {
text?: Text;
spinner?: string | { interval?: number; frames: string[]; }
color?: Color;
stream?: any;
}
interface Instance {
start(): void;
stop(): void;
clear(): void;
frame(): void;
render(): void;
text: Text;
color: Color;
}
function ora(options: Options | Text): Instance;
export = ora;
}