zod 3.22.1 → 3.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/lib/types.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -488,6 +488,7 @@ There are a growing number of tools that are built atop or support Zod natively!
|
|
|
488
488
|
- [`nestjs-graphql-zod`](https://github.com/incetarik/nestjs-graphql-zod): Generates NestJS GraphQL model classes from Zod schemas. Provides GraphQL method decorators working with Zod schemas.
|
|
489
489
|
- [`zod-openapi`](https://github.com/samchungy/zod-openapi): Create full OpenAPI v3.x documentation from Zod schemas.
|
|
490
490
|
- [`fastify-zod-openapi`](https://github.com/samchungy/fastify-zod-openapi): Fastify type provider, validation, serialization and @fastify/swagger support for Zod schemas.
|
|
491
|
+
- [`typeschema`](https://typeschema.com/): Universal adapter for schema validation.
|
|
491
492
|
|
|
492
493
|
#### X to Zod
|
|
493
494
|
|
|
@@ -501,6 +502,7 @@ There are a growing number of tools that are built atop or support Zod natively!
|
|
|
501
502
|
- [`prisma-zod-generator`](https://github.com/omar-dulaimi/prisma-zod-generator): Emit Zod schemas from your Prisma schema.
|
|
502
503
|
- [`prisma-trpc-generator`](https://github.com/omar-dulaimi/prisma-trpc-generator): Emit fully implemented tRPC routers and their validation schemas using Zod.
|
|
503
504
|
- [`zod-prisma-types`](https://github.com/chrishoermann/zod-prisma-types) Create Zod types from your Prisma models.
|
|
505
|
+
- [`quicktype`](https://app.quicktype.io/): Convert JSON objects and JSON schemas into Zod schemas.
|
|
504
506
|
|
|
505
507
|
#### Mocking
|
|
506
508
|
|
package/lib/types.d.ts
CHANGED
|
@@ -67,7 +67,8 @@ export declare abstract class ZodType<Output = any, Def extends ZodTypeDef = Zod
|
|
|
67
67
|
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
68
68
|
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
69
69
|
superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
|
|
70
|
-
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void
|
|
70
|
+
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
|
|
71
|
+
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => Promise<void>): ZodEffects<this, Output, Input>;
|
|
71
72
|
constructor(def: Def);
|
|
72
73
|
optional(): ZodOptional<this>;
|
|
73
74
|
nullable(): ZodNullable<this>;
|