Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

console.d.ts 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. declare module 'console' {
  2. import { InspectOptions } from 'util';
  3. global {
  4. // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
  5. interface Console {
  6. Console: NodeJS.ConsoleConstructor;
  7. /**
  8. * A simple assertion test that verifies whether `value` is truthy.
  9. * If it is not, an `AssertionError` is thrown.
  10. * If provided, the error `message` is formatted using `util.format()` and used as the error message.
  11. */
  12. assert(value: any, message?: string, ...optionalParams: any[]): void;
  13. /**
  14. * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY.
  15. * When `stdout` is not a TTY, this method does nothing.
  16. */
  17. clear(): void;
  18. /**
  19. * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`.
  20. */
  21. count(label?: string): void;
  22. /**
  23. * Resets the internal counter specific to `label`.
  24. */
  25. countReset(label?: string): void;
  26. /**
  27. * The `console.debug()` function is an alias for {@link console.log}.
  28. */
  29. debug(message?: any, ...optionalParams: any[]): void;
  30. /**
  31. * Uses {@link util.inspect} on `obj` and prints the resulting string to `stdout`.
  32. * This function bypasses any custom `inspect()` function defined on `obj`.
  33. */
  34. dir(obj: any, options?: InspectOptions): void;
  35. /**
  36. * This method calls {@link console.log} passing it the arguments received. Please note that this method does not produce any XML formatting
  37. */
  38. dirxml(...data: any[]): void;
  39. /**
  40. * Prints to `stderr` with newline.
  41. */
  42. error(message?: any, ...optionalParams: any[]): void;
  43. /**
  44. * Increases indentation of subsequent lines by two spaces.
  45. * If one or more `label`s are provided, those are printed first without the additional indentation.
  46. */
  47. group(...label: any[]): void;
  48. /**
  49. * The `console.groupCollapsed()` function is an alias for {@link console.group}.
  50. */
  51. groupCollapsed(...label: any[]): void;
  52. /**
  53. * Decreases indentation of subsequent lines by two spaces.
  54. */
  55. groupEnd(): void;
  56. /**
  57. * The {@link console.info} function is an alias for {@link console.log}.
  58. */
  59. info(message?: any, ...optionalParams: any[]): void;
  60. /**
  61. * Prints to `stdout` with newline.
  62. */
  63. log(message?: any, ...optionalParams: any[]): void;
  64. /**
  65. * This method does not display anything unless used in the inspector.
  66. * Prints to `stdout` the array `array` formatted as a table.
  67. */
  68. table(tabularData: any, properties?: ReadonlyArray<string>): void;
  69. /**
  70. * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
  71. */
  72. time(label?: string): void;
  73. /**
  74. * Stops a timer that was previously started by calling {@link console.time} and prints the result to `stdout`.
  75. */
  76. timeEnd(label?: string): void;
  77. /**
  78. * For a timer that was previously started by calling {@link console.time}, prints the elapsed time and other `data` arguments to `stdout`.
  79. */
  80. timeLog(label?: string, ...data: any[]): void;
  81. /**
  82. * Prints to `stderr` the string 'Trace :', followed by the {@link util.format} formatted message and stack trace to the current position in the code.
  83. */
  84. trace(message?: any, ...optionalParams: any[]): void;
  85. /**
  86. * The {@link console.warn} function is an alias for {@link console.error}.
  87. */
  88. warn(message?: any, ...optionalParams: any[]): void;
  89. // --- Inspector mode only ---
  90. /**
  91. * This method does not display anything unless used in the inspector.
  92. * Starts a JavaScript CPU profile with an optional label.
  93. */
  94. profile(label?: string): void;
  95. /**
  96. * This method does not display anything unless used in the inspector.
  97. * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
  98. */
  99. profileEnd(label?: string): void;
  100. /**
  101. * This method does not display anything unless used in the inspector.
  102. * Adds an event with the label `label` to the Timeline panel of the inspector.
  103. */
  104. timeStamp(label?: string): void;
  105. }
  106. var console: Console;
  107. namespace NodeJS {
  108. interface ConsoleConstructorOptions {
  109. stdout: WritableStream;
  110. stderr?: WritableStream;
  111. ignoreErrors?: boolean;
  112. colorMode?: boolean | 'auto';
  113. inspectOptions?: InspectOptions;
  114. }
  115. interface ConsoleConstructor {
  116. prototype: Console;
  117. new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console;
  118. new(options: ConsoleConstructorOptions): Console;
  119. }
  120. interface Global {
  121. console: typeof console;
  122. }
  123. }
  124. }
  125. export = console;
  126. }