/** * The descriptor tables — the SINGLE SHARED source both codec walkers read. Every struct in the model * is a compact data table (`Desc`); the encode walker (`encode-walker.ts`) interprets it to write and * the decode walker (`decode-walker.ts`) interprets it to read. Co-locating the *tables* here (not the * walkers) is what makes encode/decode drift impossible: there is exactly one definition of each * struct's field order/types, so the two sides cannot disagree even though they now live in separate * files. This is also why the on-page encode bundle stays small — a field name appears once in a table * rather than ~3× in explicit bitmap+guard+write code. * * A `Desc` is `[requiredCount, key, type, key, type, ...]`. The first `requiredCount` fields are written * unconditionally; the rest are optional and gated by a presence bitmap (an absent field costs one * bit). A field's `type` is one of: * - a primitive code (number): S str · R relMs · D durMs · U varuint · F f64 · B bool · J json · SA str[] * - a special-handler tag (string): the few shapes a flat table can't express (see the walkers) * - a nested `Desc` (its `[0]` is a number) → a sub-struct * - a one-element `[Desc]` (its `[0]` is an array) → an array of that sub-struct */ import { type StreamId } from '../registry.js'; export declare const STREAM_INDEX: Record; export declare const S = 0; export declare const R = 1; export declare const D = 2; export declare const U = 3; export declare const F = 4; export declare const B = 5; export declare const J = 6; export declare const SA = 7; export declare const NRR = "n"; export declare const SMAP = "m"; export declare const OMAP = "o"; export declare const PSLICES = "q"; export declare const NAV = "v"; export declare const RECTT = "r"; export type Desc = readonly unknown[]; /** NotRestoredReasons tree node — recursive, so it can't be a (TDZ-safe) self-referential descriptor; * the walkers dispatch it to the NRR special handler. Its shape lives here so both halves share it. */ export interface NrrNode { url?: string; src?: string; id?: string; name?: string; reasons?: Array<{ reason: string; }>; children?: NrrNode[]; } /** An unknown type code/tag means a descriptor bug or a future tag this build can't handle — fail loud * rather than fall through to a plausible-but-wrong (en/de)coder (the silent-corruption trap). */ export declare function bad(t: unknown): never; declare const STREAM_MANIFEST_REST: Desc; export declare const STREAM_CONFIG: Desc; export declare const OVERHEAD_ENTRY: Desc; declare const RESOURCE: Desc; declare const NAV_EXTRA: Desc; export { RESOURCE, NAV_EXTRA }; export declare const CLOCK: Desc; export declare const CONFIG: Desc; export declare const OVERHEAD: Desc; export { STREAM_MANIFEST_REST }; export declare const STREAM_T: Record; //# sourceMappingURL=descriptors.d.ts.map