paramour (core)
API reference for the core package — codecs, routes, href, serialization helpers, reflection, and errors.
paramour is the framework-agnostic core: the p.* codec builders, the
route-object constructors and their parse methods, href for typed URL
building, the standalone search/path helpers, the reflection API, and the
ParamourError hierarchy. Everything documented in this section is imported
from the package barrel (import { … } from "paramour"), and every code
block is compiled against the real package on each docs build — hover
anything to see what the compiler sees.
Pages
p.*builders — every built-in codec: wire grammars, accept/reject tables, schema slots, and list arities.- Codec & modifiers — the
Codecinterface,.optional()/.default()/.catch(), and the type-state rules that make illegal chains fail to compile. - Routes —
defineAppRoute,definePagesRoute, the parse methods, and the registry types. - href & path building — building typed, serialized URLs from
route objects, plus the path-side helpers:
buildPath,encodeParams,encodeStaticParams, anddecodeParams. - Search helpers — the standalone search encode/decode surface:
decodeSearch,encodeSearch,buildSearchString,rawSearch, andstandardSearchSchema. - describeCodec & describeRoute — the reflection API that
powers
paramour listandparamour doctor. - Errors — the
ParamourErrorhierarchy and theIssueshape shared by every failed decode.
The paramour/internal entry
The package also ships a paramour/internal subpath exposing
foreignMessage and codecShapeLabel. It exists for derived tooling — the
devtools panel, adapters — so reflection-driven consumers can share core's
implementation instead of re-deriving it. It is not for app authors and is
deliberately undocumented beyond this paragraph, but it is covered by semver
like the main entry: within a major version its exports only ever grow.