import { injectable } from 'inversify' ; import { ICurrentProcess } from './types' ; @ injectable ( ) export class CurrentProcess implements ICurrentProcess { public on = ( event , listener ) : this => { process . on ( event as any , listener as any ) ; return process as any ; } ; public get env ( ) : NodeJS . ProcessEnv { return process . env ; } public get argv ( ) : string [ ] { return process . argv ; } public get stdout ( ) : NodeJS . WriteStream { return process . stdout ; } public get stdin ( ) : NodeJS . ReadStream { return process . stdin ; } }