Skip to main content
Version: Next

CommandKitEnvironment

CommandKitEnvironment

new CommandKitEnvironment(commandkit)
ParameterTypeOptionalDescription
commandkitCommandKitThe commandkit instance.

Properties

public commandkit: any

The commandkit instance.

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.

ParameterTypeOptionalDescription
idstringThe 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.

ParameterTypeOptionalDescription
markerstringThe marker to set.

public registerDeferredFunction(fn): string

Register a deferred function.

ParameterTypeOptionalDescription
fnGenericFunction<[CommandKitEnvironment]>

public runDeferredFunctions(): Promise<void>

Run all deferred functions sequentially.

public setExecutionError(error): void

Set the execution error.

ParameterTypeOptionalDescription
errorErrorThe error to set.

public setType(type): void

Set the environment type.

ParameterTypeOptionalDescription
typeCommandKitEnvironmentTypeThe environment type to set.