Comparing version 3.22.0-canary.20230731T015307 to 3.22.0-canary.20230814T192256
@@ -90,2 +90,3 @@ import { enumUtil } from "./helpers/enumUtil"; | ||
pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>; | ||
readonly(): ZodReadonly<this>; | ||
isOptional(): boolean; | ||
@@ -850,2 +851,14 @@ isNullable(): boolean; | ||
} | ||
declare type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | { | ||
readonly [Symbol.toStringTag]: string; | ||
} | Date | Error | Generator | Promise<unknown> | RegExp; | ||
declare type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>; | ||
export interface ZodReadonlyDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef { | ||
innerType: T; | ||
typeName: ZodFirstPartyTypeKind.ZodReadonly; | ||
} | ||
export declare class ZodReadonly<T extends ZodTypeAny> extends ZodType<MakeReadonly<T["_output"]>, ZodReadonlyDef<T>, T["_input"]> { | ||
_parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodReadonly<T_1>; | ||
} | ||
declare type CustomParams = CustomErrorParams & { | ||
@@ -894,3 +907,4 @@ fatal?: boolean; | ||
ZodBranded = "ZodBranded", | ||
ZodPipeline = "ZodPipeline" | ||
ZodPipeline = "ZodPipeline", | ||
ZodReadonly = "ZodReadonly" | ||
} | ||
@@ -897,0 +911,0 @@ export declare type ZodFirstPartySchemaTypes = ZodString | ZodNumber | ZodNaN | ZodBigInt | ZodBoolean | ZodDate | ZodUndefined | ZodNull | ZodAny | ZodUnknown | ZodNever | ZodVoid | ZodArray<any, any> | ZodObject<any, any, any> | ZodUnion<any> | ZodDiscriminatedUnion<any, any> | ZodIntersection<any, any> | ZodTuple<any, any> | ZodRecord<any, any> | ZodMap<any> | ZodSet<any> | ZodFunction<any, any> | ZodLazy<any> | ZodLiteral<any> | ZodEnum<any> | ZodEffects<any, any, any> | ZodNativeEnum<any> | ZodOptional<any> | ZodNullable<any> | ZodDefault<any> | ZodCatch<any> | ZodPromise<any> | ZodBranded<any, any> | ZodPipeline<any, any>; |
{ | ||
"name": "zod", | ||
"version": "3.22.0-canary.20230731T015307", | ||
"version": "3.22.0-canary.20230814T192256", | ||
"author": "Colin McDonnell <colin@colinhacks.com>", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
614588
14018
2846