index.d.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. interface Spinner {
  86. /**
  87. Recommended interval.
  88. */
  89. readonly interval: number;
  90. /**
  91. A list of frames to show for the spinner.
  92. */
  93. readonly frames: string[];
  94. }
  95. }
  96. /**
  97. 70+ spinners for use in the terminal.
  98. @example
  99. ```
  100. import cliSpinners = require('cli-spinners');
  101. console.log(cliSpinners.dots);
  102. // {
  103. // interval: 80,
  104. // frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
  105. // }
  106. ```
  107. */
  108. declare const cliSpinners: {
  109. readonly [spinnerName in cliSpinners.SpinnerName]: cliSpinners.Spinner;
  110. } & {
  111. /**
  112. Returns a random spinner each time it's called.
  113. */
  114. readonly random: cliSpinners.Spinner;
  115. // TODO: Remove this for the next major release
  116. default: typeof cliSpinners;
  117. };
  118. export = cliSpinners;