index.d.ts 813 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Originally by: Rogier Schouten <https://github.com/rogierschouten>
  2. // Adapted by: Madhav Varshney <https://github.com/madhavarshney>
  3. declare namespace kleur {
  4. interface Color {
  5. (x: string | number): string;
  6. (): Kleur;
  7. }
  8. interface Kleur {
  9. // Colors
  10. black: Color;
  11. red: Color;
  12. green: Color;
  13. yellow: Color;
  14. blue: Color;
  15. magenta: Color;
  16. cyan: Color;
  17. white: Color;
  18. gray: Color;
  19. grey: Color;
  20. // Backgrounds
  21. bgBlack: Color;
  22. bgRed: Color;
  23. bgGreen: Color;
  24. bgYellow: Color;
  25. bgBlue: Color;
  26. bgMagenta: Color;
  27. bgCyan: Color;
  28. bgWhite: Color;
  29. // Modifiers
  30. reset: Color;
  31. bold: Color;
  32. dim: Color;
  33. italic: Color;
  34. underline: Color;
  35. inverse: Color;
  36. hidden: Color;
  37. strikethrough: Color;
  38. }
  39. }
  40. declare let kleur: kleur.Kleur & { enabled: boolean };
  41. export = kleur;