MCPcopy
hub / github.com/colinhacks/zod / isValid

Function isValid

packages/zod/src/v3/helpers/parseUtil.ts:174–174  ·  view source on GitHub ↗
(x: ParseReturnType<T>)

Source from the content-addressed store, hash-verified

172export const isAborted = (x: ParseReturnType<any>): x is INVALID => (x as any).status === "aborted";
173export const isDirty = <T>(x: ParseReturnType<T>): x is OK<T> | DIRTY<T> => (x as any).status === "dirty";
174export const isValid = <T>(x: ParseReturnType<T>): x is OK<T> => (x as any).status === "valid";
175export const isAsync = <T>(x: ParseReturnType<T>): x is AsyncParseReturnType<T> =>
176 typeof Promise !== "undefined" && x instanceof Promise;

Callers 5

handleResultFunction · 0.85
"~validate"Function · 0.85
_parseMethod · 0.85
freezeMethod · 0.85
parseUtil.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected