Logo
Classes

WorkflowContext

Defined in: workflow/src/workflow-context.ts:97

Type Parameters

Start = string

Stop = string

Data = unknown

Implements

Constructors

new WorkflowContext()

new WorkflowContext<Start, Stop, Data>(params): WorkflowContext<Start, Stop, Data>

Defined in: workflow/src/workflow-context.ts:175

Parameters

params

ContextParams<Start, Stop, Data>

Returns

WorkflowContext<Start, Stop, Data>

Properties

[toStringTag]

[toStringTag]: string = "Context"

Defined in: workflow/src/workflow-context.ts:595

Implementation of

Promise.[toStringTag]

Accessors

data

Get Signature

get data(): Data

Defined in: workflow/src/workflow-context.ts:265

Returns

Data

Methods

[asyncIterator]()

[asyncIterator](): AsyncIterableIterator<WorkflowEvent<unknown>, any, any>

Defined in: workflow/src/workflow-context.ts:221

Returns

AsyncIterableIterator<WorkflowEvent<unknown>, any, any>

Implementation of

AsyncIterable.[asyncIterator]


strict()

strict(): WorkflowContext<Start, Stop, Data>

Defined in: workflow/src/workflow-context.ts:260

Returns

WorkflowContext<Start, Stop, Data>


with()

with<Initial>(data): WorkflowContext<Start, Stop, Initial>

Defined in: workflow/src/workflow-context.ts:489

Type Parameters

Initial

Parameters

data

Initial

Returns

WorkflowContext<Start, Stop, Initial>


then()

then<TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>

Defined in: workflow/src/workflow-context.ts:512

Attaches callbacks for the resolution and/or rejection of the Promise.

Type Parameters

TResult1

TResult2 = never

Parameters

onfulfilled?

The callback to execute when the Promise is resolved.

null | (value) => TResult1 | PromiseLike<TResult1>

onrejected?

The callback to execute when the Promise is rejected.

null | (reason) => TResult2 | PromiseLike<TResult2>

Returns

Promise<TResult1 | TResult2>

A Promise for the completion of which ever callback is executed.

Implementation of

Promise.then


catch()

catch<TResult>(onrejected?): Promise<StopEvent<Stop> | TResult>

Defined in: workflow/src/workflow-context.ts:575

Attaches a callback for only the rejection of the Promise.

Type Parameters

TResult = never

Parameters

onrejected?

The callback to execute when the Promise is rejected.

null | (reason) => TResult | PromiseLike<TResult>

Returns

Promise<StopEvent<Stop> | TResult>

A Promise for the completion of the callback.

Implementation of

Promise.catch


finally()

finally(onfinally?): Promise<never>

Defined in: workflow/src/workflow-context.ts:584

Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

Parameters

onfinally?

The callback to execute when the Promise is settled (fulfilled or rejected).

null | () => void

Returns

Promise<never>

A Promise for the completion of the callback.

Implementation of

Promise.finally


snapshot()

snapshot(): ArrayBuffer

Defined in: workflow/src/workflow-context.ts:598

Returns

ArrayBuffer