Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/core / / Directive

Class: Directive<TUpdate, TResume>

Defined in: packages/core/src/channels/directive.ts:15

Workflow control-flow primitive: a single value handed to Workflow.resume(threadId, directive?) (or returned from a node's pause(...) resolution) carrying any combination of:

  • goto — jump to a named node, bypassing the edge graph.
  • resume — value supplied to the pause(value) call that suspended.
  • update — additional channel writes applied before the next step.

The shape is Graphorin's own design (the name Directive is part of the public API).

Stable

Type Parameters

Type ParameterDefault type
TUpdateRecord<string, unknown>
TResumeunknown

Constructors

Constructor

ts
new Directive<TUpdate, TResume>(opts): Directive<TUpdate, TResume>;

Defined in: packages/core/src/channels/directive.ts:20

Parameters

ParameterType
optsDirectiveOptions&lt;TUpdate, TResume&gt;

Returns

Directive&lt;TUpdate, TResume&gt;

Properties

PropertyModifierTypeDefined in
goto?readonlystringpackages/core/src/channels/directive.ts:16
resume?readonlyTResumepackages/core/src/channels/directive.ts:17
update?readonlyTUpdatepackages/core/src/channels/directive.ts:18