MCPcopy
hub / github.com/sindresorhus/ow / withValidators

Method withValidators

source/predicates/predicate.ts:354–359  ·  view source on GitHub ↗

@hidden Create a new instance with the given validators

(validators: Array<Validator<T>>)

Source from the content-addressed store, hash-verified

352 Create a new instance with the given validators
353 */
354 protected withValidators(validators: Array<Validator<T>>): this {
355 // eslint-disable-next-line @typescript-eslint/naming-convention
356 const Constructor = this.constructor as new (...arguments_: unknown[]) => this;
357 const instance = new Constructor(this.options, validators);
358 return instance;
359 }
360}

Callers 2

messageMethod · 0.95
addValidatorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected