forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcurrentProcess.ts
More file actions
25 lines (23 loc) · 745 Bytes
/
currentProcess.ts
File metadata and controls
25 lines (23 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// tslint:disable:no-any
import { injectable } from 'inversify';
import { ICurrentProcess } from '../types';
import { EnvironmentVariables } from '../variables/types';
@injectable()
export class CurrentProcess implements ICurrentProcess {
public on = (event: string | symbol, listener: Function): this => {
process.on(event as any, listener as any);
return process as any;
}
public get env(): EnvironmentVariables {
return process.env as any as EnvironmentVariables;
}
public get argv(): string[] {
return process.argv;
}
public get stdout(): NodeJS.WriteStream {
return process.stdout;
}
public get stdin(): NodeJS.ReadStream {
return process.stdin;
}
}