Skip to content
1 min read · 97 words

Function: registerAdkEncodables()

ts
function registerAdkEncodables(): void;

Defined in: src/batteries/encoding/index.ts:167

Register every ADK primitive with the @nhtio/encoder decoder, and auto-register the binding-free reader resolvers (in-memory, fetch).

Returns

void

Remarks

Idempotent — safe to call more than once (re-registering a class is a no-op overwrite). Call it once at application startup, before the first decode(). Encoding never needs this; only decoding does, because the decoder must map a custom:<ClassName> tag back to a constructor.

Durable-store reader resolvers (flydrive, OPFS) are NOT registered here — they need the live Disk / OPFS root only you hold. Register them yourself with registerSpoolReaderResolver.