JsonTypeDefinition
Declares a 'json' value whose contents are checked by a parser.
Extends
Section titled “Extends”BaseTypeDefinition
Type Parameters
Section titled “Type Parameters”TResult
Section titled “TResult”TResult = unknown
The type the parser produces on success.
Properties
Section titled “Properties”
readonlykey:string
Key of the Property or value the declaration belongs to.
Inherited from
Section titled “Inherited from”BaseTypeDefinition.key
readonlyparse: (value) => {data:TResult;success:true; } | {error:unknown;success:false; }
Parser derived from the zod schema given to addProperty. The Runtime applies it after confirming
the value is JSON-serializable; a failed parse is treated as an invalid value.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”{ data: TResult; success: true; } | { error: unknown; success: false; }
readonlytype:"json"
Discriminator naming this data type.
Overrides
Section titled “Overrides”BaseTypeDefinition.type

