|
6 | 6 | */ |
7 | 7 |
|
8 | 8 | import {performance} from 'perf_hooks'; |
| 9 | +import type {WriteStream} from 'tty'; |
9 | 10 | import exit = require('exit'); |
10 | 11 | import {CustomConsole} from '@jest/console'; |
11 | 12 | import type {AggregatedResult, TestContext} from '@jest/test-result'; |
@@ -78,7 +79,7 @@ export const createJest = Jest.createJest; |
78 | 79 | const buildContextsAndHasteMaps = async ( |
79 | 80 | configs: Array<Config.ProjectConfig>, |
80 | 81 | globalConfig: Config.GlobalConfig, |
81 | | - outputStream: NodeJS.WriteStream, |
| 82 | + outputStream: WriteStream, |
82 | 83 | ) => { |
83 | 84 | const hasteMapInstances = Array(configs.length); |
84 | 85 | const contexts = await Promise.all( |
@@ -107,7 +108,7 @@ export const _run = async ( |
107 | 108 | globalConfig: Config.GlobalConfig, |
108 | 109 | configs: Array<Config.ProjectConfig>, |
109 | 110 | hasDeprecationWarnings: boolean, |
110 | | - outputStream: NodeJS.WriteStream, |
| 111 | + outputStream: WriteStream, |
111 | 112 | ): Promise<AggregatedResult> => { |
112 | 113 | // Queries to hg/git can take a while, so we need to start the process |
113 | 114 | // as soon as possible, so by the time we need the result it's already there. |
@@ -193,7 +194,7 @@ const runWatch = async ( |
193 | 194 | _configs: Array<Config.ProjectConfig>, |
194 | 195 | hasDeprecationWarnings: boolean, |
195 | 196 | globalConfig: Config.GlobalConfig, |
196 | | - outputStream: NodeJS.WriteStream, |
| 197 | + outputStream: WriteStream, |
197 | 198 | hasteMapInstances: Array<IHasteMap>, |
198 | 199 | filter?: Filter, |
199 | 200 | ) => { |
@@ -228,7 +229,7 @@ const runWatch = async ( |
228 | 229 | const runWithoutWatch = async ( |
229 | 230 | globalConfig: Config.GlobalConfig, |
230 | 231 | contexts: Array<TestContext>, |
231 | | - outputStream: NodeJS.WriteStream, |
| 232 | + outputStream: WriteStream, |
232 | 233 | onComplete: OnCompleteCallback, |
233 | 234 | changedFilesPromise?: ChangedFilesPromise, |
234 | 235 | filter?: Filter, |
|
0 commit comments