Skip to main content
Module

x/abstruct/mod.ts>NotValidator

Abstract structure for JavaScript data validation
Latest
class NotValidator
extends IsValidator<In, Exclude<In, RIn>>
import { NotValidator } from "https://deno.land/x/abstruct@1.0.0/mod.ts";

Validator for inversion.

Examples

Example 1

import { NotValidator } from "https://deno.land/x/abstruct@$VERSION/validators/operators/not.ts";
import { type Validator } from "https://deno.land/x/abstruct@$VERSION/types.ts";
declare const validator: Validator;
const notValidator = new NotValidator(validator);

Constructors

new
NotValidator(validator: Readonly<Validator<In, RIn>>)

Type Parameters

In
optional
RIn extends In = In

Methods

is(input: In): input is Exclude<In, RIn>
toString(): string