zod 3.25.64 → 3.25.65
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.
|
@@ -77,6 +77,7 @@ exports.pick = pick;
|
|
|
77
77
|
exports.omit = omit;
|
|
78
78
|
exports.partial = partial;
|
|
79
79
|
exports.required = required;
|
|
80
|
+
exports.catchall = catchall;
|
|
80
81
|
exports.union = union;
|
|
81
82
|
exports.discriminatedUnion = discriminatedUnion;
|
|
82
83
|
exports.intersection = intersection;
|
|
@@ -487,6 +488,9 @@ function partial(schema, mask) {
|
|
|
487
488
|
function required(schema, mask) {
|
|
488
489
|
return core_1.util.required(exports.ZodMiniNonOptional, schema, mask);
|
|
489
490
|
}
|
|
491
|
+
function catchall(inst, catchall) {
|
|
492
|
+
return inst.clone({ ...inst._zod.def, catchall: catchall });
|
|
493
|
+
}
|
|
490
494
|
exports.ZodMiniUnion = core.$constructor("ZodMiniUnion", (inst, def) => {
|
|
491
495
|
core.$ZodUnion.init(inst, def);
|
|
492
496
|
exports.ZodMiniType.init(inst, def);
|
|
@@ -379,6 +379,9 @@ export function partial(schema, mask) {
|
|
|
379
379
|
export function required(schema, mask) {
|
|
380
380
|
return util.required(ZodMiniNonOptional, schema, mask);
|
|
381
381
|
}
|
|
382
|
+
export function catchall(inst, catchall) {
|
|
383
|
+
return inst.clone({ ...inst._zod.def, catchall: catchall });
|
|
384
|
+
}
|
|
382
385
|
export const ZodMiniUnion = /*@__PURE__*/ core.$constructor("ZodMiniUnion", (inst, def) => {
|
|
383
386
|
core.$ZodUnion.init(inst, def);
|
|
384
387
|
ZodMiniType.init(inst, def);
|
|
@@ -205,6 +205,7 @@ export declare function required<T extends ZodMiniObject>(schema: T): ZodMiniObj
|
|
|
205
205
|
export declare function required<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Extend<T["shape"], {
|
|
206
206
|
[k in keyof M & keyof T["shape"]]: ZodMiniNonOptional<T["shape"][k]>;
|
|
207
207
|
}>, T["_zod"]["config"]>;
|
|
208
|
+
export declare function catchall<T extends ZodMiniObject, U extends SomeType>(inst: T, catchall: U): ZodMiniObject<T["shape"], core.$catchall<U>>;
|
|
208
209
|
export interface ZodMiniUnion<T extends readonly SomeType[] = readonly core.$ZodType[]> extends _ZodMiniType<core.$ZodUnionInternals<T>> {
|
|
209
210
|
}
|
|
210
211
|
export declare const ZodMiniUnion: core.$constructor<ZodMiniUnion>;
|
package/package.json
CHANGED