CommandKitEnvironment
CommandKitEnvironment
new CommandKitEnvironment(commandkit)
| Parameter | Type | Optional | Description |
|---|---|---|---|
| commandkit | CommandKit | ❌ | The commandkit instance. |
Properties
public commandkit: any
The commandkit instance.
public context: any
Get the context. null if not set.
public variables: any
The variables store for this environment.
Methods
public clearAllDeferredFunctions(): void
Clear all deferred functions.
public clearDeferredFunction(id): void
Clear a deferred function by id.
| Parameter | Type | Optional | Description |
|---|---|---|---|
| id | string | ❌ | The deferred function id to clear. |
public getExecutionError(): null | Error
Get the execution error.
public getExecutionTime(): number
Get the execution time in milliseconds.
public getMarker(): string
Get the marker.
public getType(): CommandKitEnvironmentType
Get the environment type.
public markEnd(): void
Mark the end of a command execution.
public markStart(marker): void
Mark the start of a command execution.
| Parameter | Type | Optional | Description |
|---|---|---|---|
| marker | string | ❌ | The marker to set. |
public registerDeferredFunction(fn): string
Register a deferred function.
| Parameter | Type | Optional | Description |
|---|---|---|---|
| fn | GenericFunction<[ | CommandKitEnvironment | ]> |
public runDeferredFunctions(): Promise<void>
Run all deferred functions sequentially.
public setContext(context): void
Set the context.
| Parameter | Type | Optional | Description |
|---|---|---|---|
| context | Context | ❌ | The context to set. |
public setExecutionError(error): void
Set the execution error.
| Parameter | Type | Optional | Description |
|---|---|---|---|
| error | Error | ❌ | The error to set. |
public setType(type): void
Set the environment type.
| Parameter | Type | Optional | Description |
|---|---|---|---|
| type | CommandKitEnvironmentType | ❌ | The environment type to set. |