index.d.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. | 'line'
  16. | 'line2'
  17. | 'pipe'
  18. | 'simpleDots'
  19. | 'simpleDotsScrolling'
  20. | 'star'
  21. | 'star2'
  22. | 'flip'
  23. | 'hamburger'
  24. | 'growVertical'
  25. | 'growHorizontal'
  26. | 'balloon'
  27. | 'balloon2'
  28. | 'noise'
  29. | 'bounce'
  30. | 'boxBounce'
  31. | 'boxBounce2'
  32. | 'triangle'
  33. | 'arc'
  34. | 'circle'
  35. | 'squareCorners'
  36. | 'circleQuarters'
  37. | 'circleHalves'
  38. | 'squish'
  39. | 'toggle'
  40. | 'toggle2'
  41. | 'toggle3'
  42. | 'toggle4'
  43. | 'toggle5'
  44. | 'toggle6'
  45. | 'toggle7'
  46. | 'toggle8'
  47. | 'toggle9'
  48. | 'toggle10'
  49. | 'toggle11'
  50. | 'toggle12'
  51. | 'toggle13'
  52. | 'arrow'
  53. | 'arrow2'
  54. | 'arrow3'
  55. | 'bouncingBar'
  56. | 'bouncingBall'
  57. | 'smiley'
  58. | 'monkey'
  59. | 'hearts'
  60. | 'clock'
  61. | 'earth'
  62. | 'moon'
  63. | 'runner'
  64. | 'pong'
  65. | 'shark'
  66. | 'dqpb'
  67. | 'weather'
  68. | 'christmas'
  69. | 'grenade'
  70. | 'point'
  71. | 'layer';
  72. interface Spinner {
  73. /**
  74. Recommended interval.
  75. */
  76. readonly interval: number;
  77. /**
  78. A list of frames to show for the spinner.
  79. */
  80. readonly frames: string[];
  81. }
  82. }
  83. /**
  84. 60+ spinners for use in the terminal.
  85. @example
  86. ```
  87. import cliSpinners = require('cli-spinners');
  88. console.log(cliSpinners.dots);
  89. // {
  90. // interval: 80,
  91. // frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
  92. // }
  93. ```
  94. */
  95. declare const cliSpinners: {
  96. readonly [spinnerName in cliSpinners.SpinnerName]: cliSpinners.Spinner;
  97. } & {
  98. // TODO: Remove this for the next major release
  99. default: typeof cliSpinners;
  100. };
  101. export = cliSpinners;