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

Function getIssueProperties

packages/zod/src/v3/types.ts:335–343  ·  view source on GitHub ↗
(val: Output)

Source from the content-addressed store, hash-verified

333 message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)
334 ): ZodEffects<this, Output, Input> {
335 const getIssueProperties = (val: Output) => {
336 if (typeof message === "string" || typeof message === "undefined") {
337 return { message };
338 } else if (typeof message === "function") {
339 return message(val);
340 } else {
341 return message;
342 }
343 };
344 return this._refinement((val, ctx) => {
345 const result = check(val);
346 const setError = () =>

Callers 1

setErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected