CustomConsole.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. /// <reference types="node" />
  8. import { Console } from 'console';
  9. import { LogMessage, LogType } from './types';
  10. declare type Formatter = (type: LogType, message: LogMessage) => string;
  11. export default class CustomConsole extends Console {
  12. private _stdout;
  13. private _stderr;
  14. private _formatBuffer;
  15. private _counters;
  16. private _timers;
  17. private _groupDepth;
  18. constructor(stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream, formatBuffer?: Formatter);
  19. private _log;
  20. private _logError;
  21. assert(value: any, message?: string | Error): void;
  22. count(label?: string): void;
  23. countReset(label?: string): void;
  24. debug(firstArg: any, ...args: Array<any>): void;
  25. dir(firstArg: any, ...args: Array<any>): void;
  26. dirxml(firstArg: any, ...args: Array<any>): void;
  27. error(firstArg: any, ...args: Array<any>): void;
  28. group(title?: string, ...args: Array<any>): void;
  29. groupCollapsed(title?: string, ...args: Array<any>): void;
  30. groupEnd(): void;
  31. info(firstArg: any, ...args: Array<any>): void;
  32. log(firstArg: any, ...args: Array<any>): void;
  33. time(label?: string): void;
  34. timeEnd(label?: string): void;
  35. warn(firstArg: any, ...args: Array<any>): void;
  36. getBuffer(): undefined;
  37. }
  38. export {};
  39. //# sourceMappingURL=CustomConsole.d.ts.map