Files
DefinitelyTyped/ora/index.d.ts
2016-04-27 21:30:22 -07:00

26 lines
694 B
TypeScript

// 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
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;
}
declare function ora(options: Options | Text): Instance;
export = ora;