diff --git a/src/autoinout.ts b/src/autoinout.ts index a326fe5..ef6c794 100644 --- a/src/autoinout.ts +++ b/src/autoinout.ts @@ -33,7 +33,7 @@ const opAffectsInOut = (op: Operation): boolean => export class AutoIncomingOutgoing { private disposables: Disposable[] = []; - private timer: NodeJS.Timer | undefined; + private timer: ReturnType | undefined; constructor(private repository: Repository) { workspace.onDidChangeConfiguration( diff --git a/src/fossilExecutable.ts b/src/fossilExecutable.ts index d800925..137cb40 100644 --- a/src/fossilExecutable.ts +++ b/src/fossilExecutable.ts @@ -224,7 +224,7 @@ export class FossilExecutable { const disposables: IDisposable[] = []; const once = ( - ee: NodeJS.EventEmitter, + ee: typeof child.stdout | typeof child, name: 'close' | 'error' | 'exit', fn: (...args: any[]) => void ) => { @@ -233,14 +233,14 @@ export class FossilExecutable { }; const on = ( - ee: NodeJS.EventEmitter, + ee: typeof child.stdout | typeof child, name: 'data', fn: (...args: any[]) => void ) => { ee.on(name, fn); disposables.push(toDisposable(() => ee.removeListener(name, fn))); }; - let readTimeout: NodeJS.Timeout | undefined; + let readTimeout: ReturnType | undefined; const buffers: Buffer[] = []; async function onReadTimeout(): Promise { @@ -313,7 +313,7 @@ export class FossilExecutable { options: FossilSpawnOptions ) { const startTimeHR = process.hrtime(); - const waitAndLog = (timeout: number): NodeJS.Timeout => { + const waitAndLog = (timeout: number): ReturnType => { return setTimeout(() => { this.logArgs(args, reason, 'still running'); logTimeout = waitAndLog(timeout * 4);