Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
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 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. // Imported from DefinitelyTyped project.
  2. // TypeScript definitions for ansi-colors
  3. // Definitions by: Rogier Schouten <https://github.com/rogierschouten>
  4. // Integrated by: Jordan Mele <https://github.com/Silic0nS0ldier>
  5. interface SymbolsType {
  6. check: string;
  7. cross: string;
  8. info: string;
  9. line: string;
  10. pointer: string;
  11. pointerSmall: string;
  12. question: string;
  13. warning: string;
  14. }
  15. type StyleArrayStructure = [number, number];
  16. interface StyleArrayProperties {
  17. open: string;
  18. close: string;
  19. closeRe: string;
  20. }
  21. type StyleType = StyleArrayStructure & StyleArrayProperties;
  22. export interface StyleFunction extends StylesType<StyleFunction> {
  23. (s: string): string;
  24. }
  25. interface StylesType<T> {
  26. // modifiers
  27. reset: T;
  28. bold: T;
  29. dim: T;
  30. italic: T;
  31. underline: T;
  32. inverse: T;
  33. hidden: T;
  34. strikethrough: T;
  35. // colors
  36. black: T;
  37. red: T;
  38. green: T;
  39. yellow: T;
  40. blue: T;
  41. magenta: T;
  42. cyan: T;
  43. white: T;
  44. gray: T;
  45. grey: T;
  46. // bright colors
  47. blackBright: T;
  48. redBright: T;
  49. greenBright: T;
  50. yellowBright: T;
  51. blueBright: T;
  52. magentaBright: T;
  53. cyanBright: T;
  54. whiteBright: T;
  55. // background colors
  56. bgBlack: T;
  57. bgRed: T;
  58. bgGreen: T;
  59. bgYellow: T;
  60. bgBlue: T;
  61. bgMagenta: T;
  62. bgCyan: T;
  63. bgWhite: T;
  64. // bright background colors
  65. bgBlackBright: T;
  66. bgRedBright: T;
  67. bgGreenBright: T;
  68. bgYellowBright: T;
  69. bgBlueBright: T;
  70. bgMagentaBright: T;
  71. bgCyanBright: T;
  72. bgWhiteBright: T;
  73. }
  74. // modifiers
  75. export const reset: StyleFunction;
  76. export const bold: StyleFunction;
  77. export const dim: StyleFunction;
  78. export const italic: StyleFunction;
  79. export const underline: StyleFunction;
  80. export const inverse: StyleFunction;
  81. export const hidden: StyleFunction;
  82. export const strikethrough: StyleFunction;
  83. // colors
  84. export const black: StyleFunction;
  85. export const red: StyleFunction;
  86. export const green: StyleFunction;
  87. export const yellow: StyleFunction;
  88. export const blue: StyleFunction;
  89. export const magenta: StyleFunction;
  90. export const cyan: StyleFunction;
  91. export const white: StyleFunction;
  92. export const gray: StyleFunction;
  93. export const grey: StyleFunction;
  94. // bright colors
  95. export const blackBright: StyleFunction;
  96. export const redBright: StyleFunction;
  97. export const greenBright: StyleFunction;
  98. export const yellowBright: StyleFunction;
  99. export const blueBright: StyleFunction;
  100. export const magentaBright: StyleFunction;
  101. export const cyanBright: StyleFunction;
  102. export const whiteBright: StyleFunction;
  103. // background colors
  104. export const bgBlack: StyleFunction;
  105. export const bgRed: StyleFunction;
  106. export const bgGreen: StyleFunction;
  107. export const bgYellow: StyleFunction;
  108. export const bgBlue: StyleFunction;
  109. export const bgMagenta: StyleFunction;
  110. export const bgCyan: StyleFunction;
  111. export const bgWhite: StyleFunction;
  112. // bright background colors
  113. export const bgBlackBright: StyleFunction;
  114. export const bgRedBright: StyleFunction;
  115. export const bgGreenBright: StyleFunction;
  116. export const bgYellowBright: StyleFunction;
  117. export const bgBlueBright: StyleFunction;
  118. export const bgMagentaBright: StyleFunction;
  119. export const bgCyanBright: StyleFunction;
  120. export const bgWhiteBright: StyleFunction;
  121. export let enabled: boolean;
  122. export let visible: boolean;
  123. export const ansiRegex: RegExp;
  124. /**
  125. * Remove styles from string
  126. */
  127. export function stripColor(s: string): string;
  128. /**
  129. * Remove styles from string
  130. */
  131. export function strip(s: string): string;
  132. /**
  133. * Remove styles from string
  134. */
  135. export function unstyle(s: string): string;
  136. export const styles: StylesType<StyleType>;
  137. export const symbols: SymbolsType;
  138. /**
  139. * Outputs a string with check-symbol as prefix
  140. */
  141. export function ok(...args: string[]): string;