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

Function isAsync

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

Source from the content-addressed store, hash-verified

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 4

_parseSyncFunction · 0.85
safeParseAsyncFunction · 0.85
_parseMethod · 0.85
_parseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected