Model - Parse
API reference for src/validate/parse on @huukhanhnguyen/model, reachable from ..
See the Guide for the ModelJSON / evaluate pipeline.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
parseModel
function
parseModel(raw: unknown): ModelJSONRETIRED_ARG_MESSAGES
const
"<method>.<arg>" → the message a RETIRED arg gets instead of the generic "has no arg".
const RETIRED_ARG_MESSAGES: Record<string, string>RETIRED_ROOT_MESSAGES
const
RETIRED root keys → the message each gets instead of the generic "unknown top-level field". The engine speaks only the CURRENT schema: these keys are rejected, and the message says what the field is now (verbatim — tests and authors match on these strings).
const RETIRED_ROOT_MESSAGES: Record<string, string>safeParseModel
function
safeParseModel(raw: unknown): SafeParseModel