JS API Reference

Class: Terminate

script/command.Terminate

Hierarchy

  • Command

    Terminate

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Terminate(args?): Terminate

Parameters

NameType
args?Record<string, unknown>

Returns

Terminate

Overrides

Command.constructor

Defined in

src/script/command.ts:106

Properties

args

Protected args: Record<string, unknown>

Inherited from

Command.args

Defined in

src/script/command.ts:16

Methods

toJson

toJson(): Object

Returns

Object

Inherited from

Command.toJson

Defined in

src/script/command.ts:25


toExeScriptRequest

toExeScriptRequest(): ExeScriptRequest

Returns

ExeScriptRequest

Inherited from

Command.toExeScriptRequest

Defined in

src/script/command.ts:31


before

before(): Promise<void>

Setup local environment for executing this command.

Returns

Promise<void>

Inherited from

Command.before

Defined in

src/script/command.ts:38


after

after(result?): Promise<Result<unknown>>

Cleanup local setup that was needed for the command to run.

It is called after the command was sent to the activity, and the command was processed.

When run within scripts or batch commands, after() might be called without any results, as one of the previous commands might have failed. In this case, the command should still cleanup its local setup and return an empty error result.

Parameters

NameType
result?Result<unknown>

Returns

Promise<Result<unknown>>

Inherited from

Command.after

Defined in

src/script/command.ts:53

Was this helpful?