index.d.ts 2.0 KB

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