Skip to content

x-to-zod / Parser

Interface: Parser ​

Defined in: src/Parser/index.ts:4

Properties ​

typeKind ​

ts
readonly typeKind: string;

Defined in: src/Parser/index.ts:11

Type discriminator string. Used by the registry to identify which parser handles a given schema node, and surfaced in error messages.

Examples: 'string', 'object', 'anyOf', 'custom-datetime'

Methods ​

parse() ​

ts
parse(): Builder;

Defined in: src/Parser/index.ts:17

Parse the schema node this parser was constructed with and return a Builder that emits valid Zod code when .text() is called.

Returns ​

Builder

Released under the ISC License.