1 | import { type Predicates } from './predicates.js';
|
2 | import type { BasePredicate } from './index.js';
|
3 | type Optionalify<P> = P extends BasePredicate<infer X> ? P & BasePredicate<X | undefined> : P;
|
4 | export type Modifiers = {
|
5 | /**
|
6 | Make the following predicate optional so it doesn't fail when the value is `undefined`.
|
7 | */
|
8 | readonly optional: {
|
9 | [K in keyof Predicates]: Optionalify<Predicates[K]>;
|
10 | };
|
11 | };
|
12 | declare const modifiers: <T>(object: T) => T & Modifiers;
|
13 | export default modifiers;
|