Skip to content

Transforms

Validation modes: Validation modes reference

Transform attaches decode/encode functions to schemas without mutating them (stored in a WeakMap). After a transform is registered, instantiate() automatically applies the decoder before validation — decode's output is what gets validated, defaulted, and stripped. See Canonical decode/default ordering.

Methods

MethodDescriptionMode
Transform.create / jt.encodeAttach decode/encode pair; encode domain → wireCompile-time + Runtime
Transform.brandCompile-time nominal brand (no runtime effect)Compile-time
Transform.chainMulti-step decode/encode chainCompile-time + Runtime

All examples use the bookstore domain.

See also

Released under the MIT License.