Comparing version 3.23.0-canary.20240319T231349 to 3.23.0-canary.20240321T195738
@@ -77,3 +77,3 @@ import type { IssueData, ZodErrorMap, ZodIssue } from "../ZodError"; | ||
export declare const isDirty: <T>(x: ParseReturnType<T>) => x is OK<T> | DIRTY<T>; | ||
export declare const isValid: <T>(x: ParseReturnType<T>) => x is OK<T> | DIRTY<T>; | ||
export declare const isValid: <T>(x: ParseReturnType<T>) => x is OK<T>; | ||
export declare const isAsync: <T>(x: ParseReturnType<T>) => x is AsyncParseReturnType<T>; |
@@ -142,2 +142,3 @@ import type { TypeOf, ZodType } from "."; | ||
static create: (issues: ZodIssue[]) => ZodError<any>; | ||
static assert(value: unknown): asserts value is ZodError; | ||
toString(): string; | ||
@@ -144,0 +145,0 @@ get message(): string; |
@@ -101,2 +101,7 @@ "use strict"; | ||
} | ||
static assert(value) { | ||
if (!(value instanceof ZodError)) { | ||
throw new Error(`Not a ZodError: ${value}`); | ||
} | ||
} | ||
toString() { | ||
@@ -103,0 +108,0 @@ return this.message; |
{ | ||
"name": "zod", | ||
"version": "3.23.0-canary.20240319T231349", | ||
"version": "3.23.0-canary.20240321T195738", | ||
"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
637429
14377