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

Function transform

packages/zod/src/v3/types.ts:468–477  ·  view source on GitHub ↗
(
    transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>
  )

Source from the content-addressed store, hash-verified

466 }
467
468 transform<NewOut>(
469 transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>
470 ): ZodEffects<this, NewOut> {
471 return new ZodEffects({
472 ...processCreateParams(this._def),
473 schema: this,
474 typeName: ZodFirstPartyTypeKind.ZodEffects,
475 effect: { type: "transform", transform },
476 }) as any;
477 }
478
479 default(def: util.noUndefined<Input>): ZodDefault<this>;
480 default(def: () => util.noUndefined<Input>): ZodDefault<this>;

Callers

nothing calls this directly

Calls 1

processCreateParamsFunction · 0.85

Tested by

no test coverage detected