diff --git a/deno/lib/README.md b/deno/lib/README.md index a62aaba6ac..1709b734d1 100644 --- a/deno/lib/README.md +++ b/deno/lib/README.md @@ -57,8 +57,8 @@ - [Coercion for primitives](#coercion-for-primitives) - [Literals](#literals) - [Strings](#strings) - - [Datetime](#datetime-validation) - - [IP](#ip-address-validation) + - [Datetime](#iso-datetimes) + - [IP](#ip-addresses) - [Numbers](#numbers) - [BigInts](#bigints) - [NaNs](#nans) @@ -431,6 +431,7 @@ There are a growing number of tools that are built atop or support Zod natively! - [`@modular-forms/solid`](/~https://github.com/fabian-hiller/modular-forms): Modular form library for SolidJS that supports Zod for validation. - [`houseform`](/~https://github.com/crutchcorn/houseform/): A React form library that uses Zod for validation. - [`sveltekit-superforms`](/~https://github.com/ciscoheat/sveltekit-superforms): Supercharged form library for SvelteKit with Zod validation. +- [`mobx-zod-form`](/~https://github.com/MonoidDev/mobx-zod-form): Data-first form builder based on MobX & Zod #### Zod to X @@ -623,7 +624,7 @@ z.coerce.boolean().parse(null); // => false ## Literals -Literal schemas represent a [literal type](https://www.typescriptlang.org/docs/handbook/literal-types.html), like `"hello world"` or `5`. +Literal schemas represent a [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types), like `"hello world"` or `5`. ```ts const tuna = z.literal("tuna"); diff --git a/deno/lib/types.ts b/deno/lib/types.ts index caacc6cd24..3226788ece 100644 --- a/deno/lib/types.ts +++ b/deno/lib/types.ts @@ -3431,6 +3431,12 @@ export class ZodMap< ZodMapDef, Map > { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } _parse(input: ParseInput): ParseReturnType { const { status, ctx } = this._processInputParams(input); if (ctx.parsedType !== ZodParsedType.map) { diff --git a/src/types.ts b/src/types.ts index 0aadaaf86f..5cfbedf669 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3431,6 +3431,12 @@ export class ZodMap< ZodMapDef, Map > { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } _parse(input: ParseInput): ParseReturnType { const { status, ctx } = this._processInputParams(input); if (ctx.parsedType !== ZodParsedType.map) {