UNPKG

1.66 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/cli-spinner`
3
4# Summary
5This package contains type definitions for cli-spinner (https://github.com/helloIAmPau/node-spinner).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cli-spinner.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cli-spinner/index.d.ts)
10````ts
11// Type definitions for cli-spinner 0.2
12// Project: https://github.com/helloIAmPau/node-spinner
13// Definitions by: Jay Anslow <https://github.com/janslow>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
16/// <reference types="node" />
17
18export interface Options {
19 text?: string | undefined;
20 stream?: NodeJS.WritableStream | undefined;
21 onTick?(this: Spinner, msg: string): void;
22}
23
24export class Spinner {
25 static setDefaultSpinnerString(spinnerString: string | number): typeof Spinner;
26 static setDefaultSpinnerDelay(spinnerDelay: number): typeof Spinner;
27
28 readonly stream: NodeJS.WritableStream;
29
30 constructor(titleOrOptions?: string | Options);
31
32 start(): this;
33 stop(clear?: boolean): this;
34 isSpinning(): boolean;
35 clearLine(stream: NodeJS.WritableStream): this;
36 setSpinnerString(spinnerString: string | number): this;
37 setSpinnerTitle(title: string): this;
38 setSpinnerDelay(spinnerDelay: number): this;
39}
40
41````
42
43### Additional Details
44 * Last updated: Thu, 08 Jul 2021 09:07:56 GMT
45 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
46 * Global values: none
47
48# Credits
49These definitions were written by [Jay Anslow](https://github.com/janslow).
50
\No newline at end of file