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

Function handleArrayResult

packages/zod/src/v4/core/schemas.ts:1630–1635  ·  view source on GitHub ↗
(result: ParsePayload<any>, final: ParsePayload<any[]>, index: number)

Source from the content-addressed store, hash-verified

1628export interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}
1629
1630function handleArrayResult(result: ParsePayload<any>, final: ParsePayload<any[]>, index: number) {
1631 if (result.issues.length) {
1632 final.issues.push(...util.prefixIssues(index, result.issues));
1633 }
1634 final.value[index] = result.value;
1635}
1636
1637export const $ZodArray: core.$constructor<$ZodArray> = /*@__PURE__*/ core.$constructor("$ZodArray", (inst, def) => {
1638 $ZodType.init(inst, def);

Callers 1

schemas.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected