Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.9 KB
|
Line | |
---|
1 | declare namespace cliSpinners {
|
---|
2 | type SpinnerName =
|
---|
3 | | 'dots'
|
---|
4 | | 'dots2'
|
---|
5 | | 'dots3'
|
---|
6 | | 'dots4'
|
---|
7 | | 'dots5'
|
---|
8 | | 'dots6'
|
---|
9 | | 'dots7'
|
---|
10 | | 'dots8'
|
---|
11 | | 'dots9'
|
---|
12 | | 'dots10'
|
---|
13 | | 'dots11'
|
---|
14 | | 'dots12'
|
---|
15 | | 'dots8Bit'
|
---|
16 | | 'line'
|
---|
17 | | 'line2'
|
---|
18 | | 'pipe'
|
---|
19 | | 'simpleDots'
|
---|
20 | | 'simpleDotsScrolling'
|
---|
21 | | 'star'
|
---|
22 | | 'star2'
|
---|
23 | | 'flip'
|
---|
24 | | 'hamburger'
|
---|
25 | | 'growVertical'
|
---|
26 | | 'growHorizontal'
|
---|
27 | | 'balloon'
|
---|
28 | | 'balloon2'
|
---|
29 | | 'noise'
|
---|
30 | | 'bounce'
|
---|
31 | | 'boxBounce'
|
---|
32 | | 'boxBounce2'
|
---|
33 | | 'triangle'
|
---|
34 | | 'arc'
|
---|
35 | | 'circle'
|
---|
36 | | 'squareCorners'
|
---|
37 | | 'circleQuarters'
|
---|
38 | | 'circleHalves'
|
---|
39 | | 'squish'
|
---|
40 | | 'toggle'
|
---|
41 | | 'toggle2'
|
---|
42 | | 'toggle3'
|
---|
43 | | 'toggle4'
|
---|
44 | | 'toggle5'
|
---|
45 | | 'toggle6'
|
---|
46 | | 'toggle7'
|
---|
47 | | 'toggle8'
|
---|
48 | | 'toggle9'
|
---|
49 | | 'toggle10'
|
---|
50 | | 'toggle11'
|
---|
51 | | 'toggle12'
|
---|
52 | | 'toggle13'
|
---|
53 | | 'arrow'
|
---|
54 | | 'arrow2'
|
---|
55 | | 'arrow3'
|
---|
56 | | 'bouncingBar'
|
---|
57 | | 'bouncingBall'
|
---|
58 | | 'smiley'
|
---|
59 | | 'monkey'
|
---|
60 | | 'hearts'
|
---|
61 | | 'clock'
|
---|
62 | | 'earth'
|
---|
63 | | 'material'
|
---|
64 | | 'moon'
|
---|
65 | | 'runner'
|
---|
66 | | 'pong'
|
---|
67 | | 'shark'
|
---|
68 | | 'dqpb'
|
---|
69 | | 'weather'
|
---|
70 | | 'christmas'
|
---|
71 | | 'grenade'
|
---|
72 | | 'point'
|
---|
73 | | 'layer'
|
---|
74 | | 'betaWave'
|
---|
75 | | 'fingerDance'
|
---|
76 | | 'fistBump'
|
---|
77 | | 'soccerHeader'
|
---|
78 | | 'mindblown'
|
---|
79 | | 'speaker'
|
---|
80 | | 'orangePulse'
|
---|
81 | | 'bluePulse'
|
---|
82 | | 'orangeBluePulse'
|
---|
83 | | 'timeTravel'
|
---|
84 | | 'aesthetic';
|
---|
85 |
|
---|
86 | interface Spinner {
|
---|
87 | /**
|
---|
88 | Recommended interval.
|
---|
89 | */
|
---|
90 | readonly interval: number;
|
---|
91 |
|
---|
92 | /**
|
---|
93 | A list of frames to show for the spinner.
|
---|
94 | */
|
---|
95 | readonly frames: string[];
|
---|
96 | }
|
---|
97 | }
|
---|
98 |
|
---|
99 | /**
|
---|
100 | 70+ spinners for use in the terminal.
|
---|
101 |
|
---|
102 | @example
|
---|
103 | ```
|
---|
104 | import cliSpinners = require('cli-spinners');
|
---|
105 |
|
---|
106 | console.log(cliSpinners.dots);
|
---|
107 | // {
|
---|
108 | // interval: 80,
|
---|
109 | // frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
|
---|
110 | // }
|
---|
111 | ```
|
---|
112 | */
|
---|
113 | declare const cliSpinners: {
|
---|
114 | readonly [spinnerName in cliSpinners.SpinnerName]: cliSpinners.Spinner;
|
---|
115 | } & {
|
---|
116 | /**
|
---|
117 | Returns a random spinner each time it's called.
|
---|
118 | */
|
---|
119 | readonly random: cliSpinners.Spinner;
|
---|
120 |
|
---|
121 | // TODO: Remove this for the next major release
|
---|
122 | default: typeof cliSpinners;
|
---|
123 | };
|
---|
124 |
|
---|
125 | export = cliSpinners;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.