@@ -21,18 +21,18 @@ Parses URLSearchParams to JavaScript objects according to Zod schemas.
21
21
- No property may ` z.void() ` , ` z.undefined() ` , ` z.any() ` , or ` z.unknown() ` .
22
22
- Any property may be ` z.nullable() ` except ` z.array() ` .
23
23
- A ` z.array() ` must be of a single value-type.
24
- - The value-types must obey all the same basic rules
25
- for primitive object, union, and property types.
26
- - Value-types may not be ` z.nullable() ` or ` z.undefined() ` .
27
- - The value-type cannot contain a nested ` z.array() ` type at any level.
24
+ - The value-types must obey all the same basic rules
25
+ for primitive object, union, and property types.
26
+ - Value-types may not be ` z.nullable() ` or ` z.undefined() ` .
27
+ - The value-type cannot contain a nested ` z.array() ` type at any level.
28
28
- A ` z.record() ` has less-strict schema constraints but weaker parsing guarantees:
29
- - They keys must be ` z.string() ` .
30
- - The value-type may be a single primitive type.
31
- - The value-type may be ` z.nullable() ` .
32
- - The value-type may be a union of primitives.
33
- This union must include ` z.string() `
34
- and all values will be parsed as ` z.string() ` .
35
- - The value-type may not be a ` z.record() ` , ` z.array() ` , or ` z.object() ` .
29
+ - They keys must be ` z.string() ` .
30
+ - The value-type may be a single primitive type.
31
+ - The value-type may be ` z.nullable() ` .
32
+ - The value-type may be a union of primitives.
33
+ This union must include ` z.string() `
34
+ and all values will be parsed as ` z.string() ` .
35
+ - The value-type may not be a ` z.record() ` , ` z.array() ` , or ` z.object() ` .
36
36
- Properties that are ` z.literal() ` allowed and must still obey these rules.
37
37
38
38
## Installation
0 commit comments