BufferedConsole.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  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 type { ConsoleBuffer, LogMessage, LogType } from './types';
  10. export default class BufferedConsole extends Console {
  11. private _buffer;
  12. private _counters;
  13. private _timers;
  14. private _groupDepth;
  15. Console: NodeJS.ConsoleConstructor;
  16. constructor();
  17. static write(buffer: ConsoleBuffer, type: LogType, message: LogMessage, level?: number | null): ConsoleBuffer;
  18. private _log;
  19. assert(value: unknown, message?: string | Error): void;
  20. count(label?: string): void;
  21. countReset(label?: string): void;
  22. debug(firstArg: unknown, ...rest: Array<unknown>): void;
  23. dir(firstArg: unknown, ...rest: Array<unknown>): void;
  24. dirxml(firstArg: unknown, ...rest: Array<unknown>): void;
  25. error(firstArg: unknown, ...rest: Array<unknown>): void;
  26. group(title?: string, ...rest: Array<unknown>): void;
  27. groupCollapsed(title?: string, ...rest: Array<unknown>): void;
  28. groupEnd(): void;
  29. info(firstArg: unknown, ...rest: Array<unknown>): void;
  30. log(firstArg: unknown, ...rest: Array<unknown>): void;
  31. time(label?: string): void;
  32. timeEnd(label?: string): void;
  33. timeLog(label?: string, ...data: Array<unknown>): void;
  34. warn(firstArg: unknown, ...rest: Array<unknown>): void;
  35. getBuffer(): ConsoleBuffer | undefined;
  36. }