CommandInfo
- close
- command
- cwd
- env
- error
- exited
- index
- killProcess
- killed
- name
- pid
- prefixColor
- process
- spawn
- spawnOpts
- stderr
- stdin
- stdout
- timer
• new Command(«destructured»
, spawnOpts
, spawn
, killProcess
)
Name | Type |
---|---|
«destructured» |
CommandInfo & { index : number } |
spawnOpts |
SpawnOptions |
spawn |
SpawnCommand |
killProcess |
KillProcess |
• Readonly
close: Subject
<CloseEvent
>
• Readonly
command: string
Inherit Doc
CommandInfo.command
• Optional
Readonly
cwd: string
Inherit Doc
CommandInfo.cwd
• Readonly
env: Record
<string
, unknown
>
Inherit Doc
CommandInfo.env
• Readonly
error: Subject
<unknown
>
• exited: boolean
= false
• Readonly
index: number
• Private
Readonly
killProcess: KillProcess
• killed: boolean
= false
• Readonly
name: string
Inherit Doc
CommandInfo.name
• Optional
pid: number
• Optional
Readonly
prefixColor: string
Inherit Doc
CommandInfo.prefixColor
• Optional
process: ChildProcess
• Private
Readonly
spawn: SpawnCommand
• Private
Readonly
spawnOpts: SpawnOptions
• Readonly
stderr: Subject
<Buffer
>
• Optional
stdin: Writable
• Readonly
stdout: Subject
<Buffer
>
• Readonly
timer: Subject
<TimerEvent
>
• get
killable(): boolean
boolean
Deprecated
▸ kill(code?
): void
Kills this command, optionally specifying a signal to send to it.
Name | Type |
---|---|
code? |
string |
void
▸ start(): void
Starts this command, piping output, error and close events onto the corresponding observables.
void
▸ Static
canKill(command
): command is Command & Object
Detects whether a command can be killed.
Also works as a type guard on the input command
.
Name | Type |
---|---|
command |
Command |
command is Command & Object