Skip to content
1 min read · 92 words

Type Alias: LocatorValue

ts
type LocatorValue =
  | string
  | number
  | boolean
  | null
  | LocatorValue[]
  | {
      [key: string]: LocatorValue;
    };

Defined in: src/lib/contracts/reader_descriptor.ts:18

A JSON-shaped value a reader descriptor's locator may carry.

Remarks

Deliberately decoupled from @nhtio/encoder's Encodable: the reader contracts live in the core and must not depend on the optional encoder peer. A locator is a plain pointer (a storage key, a URL plus fetch init, a base64 buffer for in-memory readers) — always JSON-expressible — so this narrower type is sufficient and keeps the contract dependency-free. The @nhtio/encoder Encodable type is a superset, so any LocatorValue is trivially encodable when the descriptor is serialised.