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

Method exclude

packages/zod/src/v3/types.ts:4150–4158  ·  view source on GitHub ↗
(
    values: ToExclude,
    newDef: RawCreateParams = this._def
  )

Source from the content-addressed store, hash-verified

4148 }
4149
4150 exclude<ToExclude extends readonly [T[number], ...T[number][]]>(
4151 values: ToExclude,
4152 newDef: RawCreateParams = this._def
4153 ): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>> {
4154 return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)) as FilterEnum<T, ToExclude[number]>, {
4155 ...this._def,
4156 ...newDef,
4157 }) as any;
4158 }
4159
4160 static create = createZodEnum;
4161}

Callers

nothing calls this directly

Calls 2

includesMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected