Skip to content

Commit

Permalink
fix(jest-types): compat with @types/node v16
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored and splincode committed Jul 8, 2021
1 parent 7a64ede commit 6e85461
Show file tree
Hide file tree
Showing 16 changed files with 81 additions and 81 deletions.
6 changes: 3 additions & 3 deletions packages/jest-console/src/BufferedConsole.ts
Expand Up @@ -7,7 +7,7 @@

import assert = require('assert');
import {Console} from 'console';
import {format, formatWithOptions, inspect} from 'util';
import {format, formatWithOptions, inspect, InspectOptions} from 'util';
import chalk = require('chalk');
import {ErrorWithStack, formatTime} from 'jest-util';
import type {
Expand All @@ -24,7 +24,7 @@ export default class BufferedConsole extends Console {
private _timers: LogTimers = {};
private _groupDepth = 0;

Console: NodeJS.ConsoleConstructor = Console;
Console: typeof Console = Console;

constructor() {
super({
Expand Down Expand Up @@ -95,7 +95,7 @@ export default class BufferedConsole extends Console {
this._log('debug', format(firstArg, ...rest));
}

dir(firstArg: unknown, options: NodeJS.InspectOptions = {}): void {
dir(firstArg: unknown, options: InspectOptions = {}): void {
const representation = inspect(firstArg, options);
this._log('dir', formatWithOptions(options, representation));
}
Expand Down
6 changes: 3 additions & 3 deletions packages/jest-console/src/CustomConsole.ts
Expand Up @@ -7,7 +7,7 @@

import assert = require('assert');
import {Console} from 'console';
import {format, formatWithOptions, inspect} from 'util';
import {format, formatWithOptions, inspect, InspectOptions} from 'util';
import chalk = require('chalk');
import {clearLine, formatTime} from 'jest-util';
import type {LogCounters, LogMessage, LogTimers, LogType} from './types';
Expand All @@ -22,7 +22,7 @@ export default class CustomConsole extends Console {
private _timers: LogTimers = {};
private _groupDepth = 0;

Console: NodeJS.ConsoleConstructor = Console;
Console: typeof Console = Console;

constructor(
stdout: NodeJS.WriteStream,
Expand Down Expand Up @@ -73,7 +73,7 @@ export default class CustomConsole extends Console {
this._log('debug', format(firstArg, ...args));
}

dir(firstArg: unknown, options: NodeJS.InspectOptions = {}): void {
dir(firstArg: unknown, options: InspectOptions = {}): void {
const representation = inspect(firstArg, options);
this._log('dir', formatWithOptions(options, representation));
}
Expand Down

0 comments on commit 6e85461

Please sign in to comment.