Zod Compare Playground
Presets
Object width
Optional
Union
Enum literal
Record key
Tuple rest
Expected
z.object({ name: z.string() })
Provided
z.object({ name: z.string(), other: z.number() })
Compare
isSameType(expected, provided):
-
isCompatibleType(expected, provided):
-
provided <= expected
isSameType
isCompatibleType