Comparing version 3.23.0-canary.20240418T003146 to 3.23.0-canary.20240418T011308
@@ -47,3 +47,3 @@ import { enumUtil } from "./helpers/enumUtil"; | ||
export declare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>; | ||
export declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> { | ||
export declare abstract class ZodType<Output = unknown, Def extends ZodTypeDef = ZodTypeDef, Input = unknown> { | ||
readonly _type: Output; | ||
@@ -197,3 +197,3 @@ readonly _output: Output; | ||
}): RegExp; | ||
export declare class ZodString extends ZodType<string, ZodStringDef> { | ||
export declare class ZodString extends ZodType<string, ZodStringDef, string> { | ||
_parse(input: ParseInput): ParseReturnType<string>; | ||
@@ -297,3 +297,3 @@ protected _regex(regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage): ZodEffects<this, string, string>; | ||
} | ||
export declare class ZodNumber extends ZodType<number, ZodNumberDef> { | ||
export declare class ZodNumber extends ZodType<number, ZodNumberDef, number> { | ||
_parse(input: ParseInput): ParseReturnType<number>; | ||
@@ -351,3 +351,3 @@ static create: (params?: ({ | ||
} | ||
export declare class ZodBigInt extends ZodType<bigint, ZodBigIntDef> { | ||
export declare class ZodBigInt extends ZodType<bigint, ZodBigIntDef, bigint> { | ||
_parse(input: ParseInput): ParseReturnType<bigint>; | ||
@@ -383,3 +383,3 @@ static create: (params?: ({ | ||
} | ||
export declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef> { | ||
export declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef, boolean> { | ||
_parse(input: ParseInput): ParseReturnType<boolean>; | ||
@@ -410,3 +410,3 @@ static create: (params?: ({ | ||
} | ||
export declare class ZodDate extends ZodType<Date, ZodDateDef> { | ||
export declare class ZodDate extends ZodType<Date, ZodDateDef, Date> { | ||
_parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
@@ -438,3 +438,3 @@ _addCheck(check: ZodDateCheck): ZodDate; | ||
} | ||
export declare class ZodUndefined extends ZodType<undefined, ZodUndefinedDef> { | ||
export declare class ZodUndefined extends ZodType<undefined, ZodUndefinedDef, undefined> { | ||
_parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
@@ -447,3 +447,3 @@ params?: RawCreateParams; | ||
} | ||
export declare class ZodNull extends ZodType<null, ZodNullDef> { | ||
export declare class ZodNull extends ZodType<null, ZodNullDef, null> { | ||
_parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
@@ -455,3 +455,3 @@ static create: (params?: RawCreateParams) => ZodNull; | ||
} | ||
export declare class ZodAny extends ZodType<any, ZodAnyDef> { | ||
export declare class ZodAny extends ZodType<any, ZodAnyDef, any> { | ||
_any: true; | ||
@@ -464,3 +464,3 @@ _parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
} | ||
export declare class ZodUnknown extends ZodType<unknown, ZodUnknownDef> { | ||
export declare class ZodUnknown extends ZodType<unknown, ZodUnknownDef, unknown> { | ||
_unknown: true; | ||
@@ -473,3 +473,3 @@ _parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
} | ||
export declare class ZodNever extends ZodType<never, ZodNeverDef> { | ||
export declare class ZodNever extends ZodType<never, ZodNeverDef, never> { | ||
_parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
@@ -481,3 +481,3 @@ static create: (params?: RawCreateParams) => ZodNever; | ||
} | ||
export declare class ZodVoid extends ZodType<void, ZodVoidDef> { | ||
export declare class ZodVoid extends ZodType<void, ZodVoidDef, void> { | ||
_parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
@@ -662,7 +662,7 @@ static create: (params?: RawCreateParams) => ZodVoid; | ||
export declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{ | ||
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_output"] : never; | ||
[k in keyof T]: T[k] extends ZodType<any, any, any> ? T[k]["_output"] : never; | ||
}>; | ||
export declare type OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest["_output"][]] : OutputTypeOfTuple<T>; | ||
export declare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{ | ||
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_input"] : never; | ||
[k in keyof T]: T[k] extends ZodType<any, any, any> ? T[k]["_input"] : never; | ||
}>; | ||
@@ -745,3 +745,3 @@ export declare type InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest["_input"][]] : InputTypeOfTuple<T>; | ||
args<Items extends Parameters<(typeof ZodTuple)["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>; | ||
returns<NewReturnType extends ZodType<any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>; | ||
returns<NewReturnType extends ZodType<any, any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>; | ||
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>; | ||
@@ -768,3 +768,3 @@ strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>; | ||
} | ||
export declare class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>> { | ||
export declare class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>, T> { | ||
_parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
@@ -791,3 +791,3 @@ get value(): T; | ||
declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>; | ||
export declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>> { | ||
export declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>, T[number]> { | ||
#private; | ||
@@ -811,3 +811,3 @@ _parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
}; | ||
export declare class ZodNativeEnum<T extends EnumLike> extends ZodType<T[keyof T], ZodNativeEnumDef<T>> { | ||
export declare class ZodNativeEnum<T extends EnumLike> extends ZodType<T[keyof T], ZodNativeEnumDef<T>, T[keyof T]> { | ||
#private; | ||
@@ -917,3 +917,3 @@ _parse(input: ParseInput): ParseReturnType<T[keyof T]>; | ||
} | ||
export declare class ZodNaN extends ZodType<number, ZodNaNDef> { | ||
export declare class ZodNaN extends ZodType<number, ZodNaNDef, number> { | ||
_parse(input: ParseInput): ParseReturnType<any>; | ||
@@ -972,3 +972,3 @@ static create: (params?: RawCreateParams) => ZodNaN; | ||
*/ | ||
fatal?: boolean): ZodType<T>; | ||
fatal?: boolean): ZodType<T, ZodTypeDef, unknown>; | ||
export { ZodType as Schema, ZodType as ZodSchema }; | ||
@@ -1020,3 +1020,3 @@ export declare const late: { | ||
} | ||
declare const instanceOfType: <T extends typeof Class>(cls: T, params?: CustomParams) => ZodType<InstanceType<T>, ZodTypeDef, InstanceType<T>>; | ||
declare const instanceOfType: <T extends typeof Class>(cls: T, params?: CustomParams) => ZodType<InstanceType<T>, ZodTypeDef, unknown>; | ||
declare const stringType: (params?: ({ | ||
@@ -1023,0 +1023,0 @@ errorMap?: ZodErrorMap | undefined; |
{ | ||
"name": "zod", | ||
"version": "3.23.0-canary.20240418T003146", | ||
"version": "3.23.0-canary.20240418T011308", | ||
"author": "Colin McDonnell <colin@colinhacks.com>", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
673923
3082