-
-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathindex.d.ts
138 lines (129 loc) · 2.01 KB
/
index.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// TODO: Load the spinner names from the JSON file.
export type SpinnerName =
| 'dots'
| 'dots2'
| 'dots3'
| 'dots4'
| 'dots5'
| 'dots6'
| 'dots7'
| 'dots8'
| 'dots9'
| 'dots10'
| 'dots11'
| 'dots12'
| 'dots13'
| 'dots14'
| 'dots8Bit'
| 'dotsCircle'
| 'sand'
| 'line'
| 'line2'
| 'pipe'
| 'simpleDots'
| 'simpleDotsScrolling'
| 'star'
| 'star2'
| 'flip'
| 'hamburger'
| 'growVertical'
| 'growHorizontal'
| 'balloon'
| 'balloon2'
| 'noise'
| 'bounce'
| 'boxBounce'
| 'boxBounce2'
| 'binary'
| 'triangle'
| 'arc'
| 'circle'
| 'squareCorners'
| 'circleQuarters'
| 'circleHalves'
| 'squish'
| 'toggle'
| 'toggle2'
| 'toggle3'
| 'toggle4'
| 'toggle5'
| 'toggle6'
| 'toggle7'
| 'toggle8'
| 'toggle9'
| 'toggle10'
| 'toggle11'
| 'toggle12'
| 'toggle13'
| 'arrow'
| 'arrow2'
| 'arrow3'
| 'bouncingBar'
| 'bouncingBall'
| 'smiley'
| 'monkey'
| 'hearts'
| 'clock'
| 'earth'
| 'material'
| 'moon'
| 'runner'
| 'pong'
| 'shark'
| 'dqpb'
| 'weather'
| 'christmas'
| 'grenade'
| 'point'
| 'layer'
| 'betaWave'
| 'fingerDance'
| 'fistBump'
| 'soccerHeader'
| 'mindblown'
| 'speaker'
| 'orangePulse'
| 'bluePulse'
| 'orangeBluePulse'
| 'timeTravel'
| 'aesthetic'
| 'dwarfFortress';
export type Spinner = {
/**
The recommended interval.
*/
readonly interval: number;
/**
A list of frames to show for the spinner.
*/
readonly frames: string[];
};
/**
70+ spinners for use in the terminal.
@example
```
import cliSpinners from 'cli-spinners';
console.log(cliSpinners.dots);
// {
// interval: 80,
// frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
// }
```
*/
declare const cliSpinners: {
readonly [spinnerName in SpinnerName]: Spinner;
};
export default cliSpinners;
/**
Get a random spinner.
@example
```
import {randomSpinner} from 'cli-spinners';
console.log(randomSpinner());
// {
// interval: 80,
// frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
// }
```
*/
export function randomSpinner(): Spinner;