UNPKG

1.41 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/// <reference types="node" />
12
13export interface Options {
14 text?: string | undefined;
15 stream?: NodeJS.WritableStream | undefined;
16 onTick?(this: Spinner, msg: string): void;
17}
18
19export class Spinner {
20 static setDefaultSpinnerString(spinnerString: string | number): typeof Spinner;
21 static setDefaultSpinnerDelay(spinnerDelay: number): typeof Spinner;
22
23 readonly stream: NodeJS.WritableStream;
24
25 constructor(titleOrOptions?: string | Options);
26
27 start(): this;
28 stop(clear?: boolean): this;
29 isSpinning(): boolean;
30 clearLine(stream: NodeJS.WritableStream): this;
31 setSpinnerString(spinnerString: string | number): this;
32 setSpinnerTitle(title: string): this;
33 setSpinnerDelay(spinnerDelay: number): this;
34}
35
36````
37
38### Additional Details
39 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
40 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
41
42# Credits
43These definitions were written by [Jay Anslow](https://github.com/janslow).
44
\No newline at end of file