console.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  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. * @flow strict
  8. * @format
  9. */
  10. declare module 'console' {
  11. declare function assert(value: any, ...message: any): void;
  12. declare function dir(
  13. obj: Object,
  14. options: {
  15. showHidden: boolean,
  16. depth: number,
  17. colors: boolean,
  18. ...
  19. },
  20. ): void;
  21. declare function error(...data: any): void;
  22. declare function info(...data: any): void;
  23. declare function log(...data: any): void;
  24. declare function time(label: any): void;
  25. declare function timeEnd(label: any): void;
  26. declare function trace(first: any, ...rest: any): void;
  27. declare function warn(...data: any): void;
  28. declare class Console {
  29. constructor(stdout: stream$Writable, stdin?: stream$Writable): void;
  30. assert(value: any, ...message: any): void;
  31. dir(
  32. obj: Object,
  33. options: {
  34. showHidden: boolean,
  35. depth: number,
  36. colors: boolean,
  37. ...
  38. },
  39. ): void;
  40. error(...data: any): void;
  41. info(...data: any): void;
  42. log(...data: any): void;
  43. time(label: any): void;
  44. timeEnd(label: any): void;
  45. trace(first: any, ...rest: any): void;
  46. warn(...data: any): void;
  47. }
  48. }