Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // Type definitions for Chalk
  2. // Definitions by: Thomas Sauer <https://github.com/t-sauer>
  3. export const enum Level {
  4. None = 0,
  5. Basic = 1,
  6. Ansi256 = 2,
  7. TrueColor = 3
  8. }
  9. export interface ChalkOptions {
  10. enabled?: boolean;
  11. level?: Level;
  12. }
  13. export interface ChalkConstructor {
  14. new (options?: ChalkOptions): Chalk;
  15. (options?: ChalkOptions): Chalk;
  16. }
  17. export interface ColorSupport {
  18. level: Level;
  19. hasBasic: boolean;
  20. has256: boolean;
  21. has16m: boolean;
  22. }
  23. export interface Chalk {
  24. (...text: string[]): string;
  25. (text: TemplateStringsArray, ...placeholders: string[]): string;
  26. constructor: ChalkConstructor;
  27. enabled: boolean;
  28. level: Level;
  29. rgb(r: number, g: number, b: number): this;
  30. hsl(h: number, s: number, l: number): this;
  31. hsv(h: number, s: number, v: number): this;
  32. hwb(h: number, w: number, b: number): this;
  33. bgHex(color: string): this;
  34. bgKeyword(color: string): this;
  35. bgRgb(r: number, g: number, b: number): this;
  36. bgHsl(h: number, s: number, l: number): this;
  37. bgHsv(h: number, s: number, v: number): this;
  38. bgHwb(h: number, w: number, b: number): this;
  39. hex(color: string): this;
  40. keyword(color: string): this;
  41. readonly reset: this;
  42. readonly bold: this;
  43. readonly dim: this;
  44. readonly italic: this;
  45. readonly underline: this;
  46. readonly inverse: this;
  47. readonly hidden: this;
  48. readonly strikethrough: this;
  49. readonly visible: this;
  50. readonly black: this;
  51. readonly red: this;
  52. readonly green: this;
  53. readonly yellow: this;
  54. readonly blue: this;
  55. readonly magenta: this;
  56. readonly cyan: this;
  57. readonly white: this;
  58. readonly gray: this;
  59. readonly grey: this;
  60. readonly blackBright: this;
  61. readonly redBright: this;
  62. readonly greenBright: this;
  63. readonly yellowBright: this;
  64. readonly blueBright: this;
  65. readonly magentaBright: this;
  66. readonly cyanBright: this;
  67. readonly whiteBright: this;
  68. readonly bgBlack: this;
  69. readonly bgRed: this;
  70. readonly bgGreen: this;
  71. readonly bgYellow: this;
  72. readonly bgBlue: this;
  73. readonly bgMagenta: this;
  74. readonly bgCyan: this;
  75. readonly bgWhite: this;
  76. readonly bgBlackBright: this;
  77. readonly bgRedBright: this;
  78. readonly bgGreenBright: this;
  79. readonly bgYellowBright: this;
  80. readonly bgBlueBright: this;
  81. readonly bgMagentaBright: this;
  82. readonly bgCyanBright: this;
  83. readonly bgWhiteBright: this;
  84. }
  85. declare const chalk: Chalk & { supportsColor: ColorSupport };
  86. export default chalk