Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
2
import
* as z from
"zod/v4"
;
3
4
function
nest<TData extends z.ZodType>(schema: TData) {
5
return
z.object({
6
nested: schema,
7
});
8
}
9
10
test(
"generics"
, () => {
11
const
a = nest(z.object({ a: z.string() }));
Callers
1
generics.test.ts
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected