Skip to content
1 min read · 116 words

Function: registerOrchestrationEncodables()

ts
function registerOrchestrationEncodables(): void;

Defined in: src/batteries/orchestration/encoding.ts:153

Register NodeRef and ParamRef with the @nhtio/encoder decoder.

Returns

void

Remarks

MUST run before any decode() — but createOrchestration already calls it, so a consumer who constructs through the battery's entry point never needs to. Call it directly only when you reach the deep subpaths without constructing an Orchestration (decoding a persisted plan in a worker, say).

MUST run before any decode(). registerClass writes to a GLOBAL registry, and decoding an unregistered class throws — the decoder must map a custom:NodeRef/custom:ParamRef wire tag back to a constructor. Idempotent: safe to call more than once (re-registering a class is a no-op overwrite). Encoding never needs this; only decoding does.