index.d.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. declare const figureSet: {
  2. readonly tick: string;
  3. readonly cross: string;
  4. readonly star: string;
  5. readonly square: string;
  6. readonly squareSmall: string;
  7. readonly squareSmallFilled: string;
  8. readonly play: string;
  9. readonly circle: string;
  10. readonly circleFilled: string;
  11. readonly circleDotted: string;
  12. readonly circleDouble: string;
  13. readonly circleCircle: string;
  14. readonly circleCross: string;
  15. readonly circlePipe: string;
  16. readonly circleQuestionMark: string;
  17. readonly bullet: string;
  18. readonly dot: string;
  19. readonly line: string;
  20. readonly ellipsis: string;
  21. readonly pointer: string;
  22. readonly pointerSmall: string;
  23. readonly info: string;
  24. readonly warning: string;
  25. readonly hamburger: string;
  26. readonly smiley: string;
  27. readonly mustache: string;
  28. readonly heart: string;
  29. readonly nodejs: string;
  30. readonly arrowUp: string;
  31. readonly arrowDown: string;
  32. readonly arrowLeft: string;
  33. readonly arrowRight: string;
  34. readonly radioOn: string;
  35. readonly radioOff: string;
  36. readonly checkboxOn: string;
  37. readonly checkboxOff: string;
  38. readonly checkboxCircleOn: string;
  39. readonly checkboxCircleOff: string;
  40. readonly questionMarkPrefix: string;
  41. readonly oneHalf: string;
  42. readonly oneThird: string;
  43. readonly oneQuarter: string;
  44. readonly oneFifth: string;
  45. readonly oneSixth: string;
  46. readonly oneSeventh: string;
  47. readonly oneEighth: string;
  48. readonly oneNinth: string;
  49. readonly oneTenth: string;
  50. readonly twoThirds: string;
  51. readonly twoFifths: string;
  52. readonly threeQuarters: string;
  53. readonly threeFifths: string;
  54. readonly threeEighths: string;
  55. readonly fourFifths: string;
  56. readonly fiveSixths: string;
  57. readonly fiveEighths: string;
  58. readonly sevenEighth: string;
  59. }
  60. type FigureSet = typeof figureSet
  61. declare const figures: {
  62. /**
  63. Replace Unicode symbols depending on the OS.
  64. @param string - String where the Unicode symbols will be replaced with fallback symbols depending on the OS.
  65. @returns The input with replaced fallback Unicode symbols on Windows.
  66. @example
  67. ```
  68. import figures = require('figures');
  69. console.log(figures('✔︎ check'));
  70. // On non-Windows OSes: ✔︎ check
  71. // On Windows: √ check
  72. console.log(figures.tick);
  73. // On non-Windows OSes: ✔︎
  74. // On Windows: √
  75. ```
  76. */
  77. (string: string): string;
  78. /**
  79. Symbols to use when not running on Windows.
  80. */
  81. readonly main: FigureSet;
  82. /**
  83. Symbols to use when running on Windows.
  84. */
  85. readonly windows: FigureSet;
  86. } & FigureSet;
  87. export = figures;