- set<input>(): Chainable<SetP<input, unknown>>
Returns Chainable<SetP<input, unknown>>
- set<input, const pattern>(pattern): Chainable<SetP<input, pattern>>
Type Parameters
- input
- const pattern extends readonly [] | readonly [unknown, unknown] | readonly [unknown, unknown] | {
[k: string]: unknown;
} | Primitives | UnknownMatcher | readonly UnknownPattern[] | readonly [UnknownPattern, UnknownPattern] | readonly [UnknownPattern, UnknownPattern] | PatternMatcher<WithDefault<UnwrapSet<input>, unknown>> | {
readonly [k in string | number | symbol]?: Pattern<Readonly<MergeUnion<Exclude<WithDefault<UnwrapSet<input>, unknown>, (readonly any[] | Primitives | Map<any, any> | Set<any>)>>>[k]>
}
Returns Chainable<SetP<input, pattern>>
P.set(subpattern)
takes a sub pattern and returns a pattern that matches sets if all their elements match the sub pattern.Read
P.set
documentation on GitHub