- not<input, const pattern>(pattern): Chainable<NotP<input, pattern>>
Type Parameters
- input
- const pattern extends undefined | null | string | number | bigint | boolean | symbol | readonly [] | readonly [unknown, unknown] | readonly [unknown, unknown] | {
[k: string]: unknown;
} | UnknownMatcher | readonly UnknownPattern[] | readonly [UnknownPattern, UnknownPattern] | readonly [UnknownPattern, UnknownPattern] | PatternMatcher<input> | {
readonly [k in string | number | symbol]?: Pattern<Readonly<MergeUnion<Exclude<input, readonly any[] | Primitives | Map<any, any> | Set<any>>>>[k]>
}
Returns Chainable<NotP<input, pattern>>
P.not(pattern)
returns a pattern which matches if the sub pattern doesn't match.Read the documentation for
P.not
on GitHub