MCPcopy
hub / github.com/colinhacks/zod / nest

Function nest

packages/zod/src/v4/classic/tests/generics.test.ts:4–8  ·  view source on GitHub ↗
(schema: TData)

Source from the content-addressed store, hash-verified

2import * as z from "zod/v4";
3
4function nest<TData extends z.ZodType>(schema: TData) {
5 return z.object({
6 nested: schema,
7 });
8}
9
10test("generics", () => {
11 const a = nest(z.object({ a: z.string() }));

Callers 1

generics.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected