( ...args: [...patterns: P, f: Fn] )
| 268 | |
| 269 | /** @internal */ |
| 270 | export const whenOr = < |
| 271 | R, |
| 272 | const P extends ReadonlyArray< |
| 273 | Types.PatternPrimitive<R> | Types.PatternBase<R> |
| 274 | >, |
| 275 | Ret, |
| 276 | Fn extends (_: Types.WhenMatch<R, P[number]>) => Ret |
| 277 | >( |
| 278 | ...args: [...patterns: P, f: Fn] |
| 279 | ) => |
| 280 | <I, F, A, Pr>( |
| 281 | self: Matcher<I, F, R, A, Pr, Ret> |
| 282 | ): Matcher< |
| 283 | I, |
| 284 | Types.AddWithout<F, Types.PForExclude<P[number]>>, |
| 285 | Types.ApplyFilters<I, Types.AddWithout<F, Types.PForExclude<P[number]>>>, |
| 286 | A | ReturnType<Fn>, |
| 287 | Pr, |
| 288 | Ret |
| 289 | > => { |
| 290 | const onMatch = args[args.length - 1] as any |
| 291 | const patterns = args.slice(0, -1) as unknown as P |
| 292 | return (self as any).add(makeWhen(makeOrPredicate(patterns), onMatch)) |
| 293 | } |
| 294 | |
| 295 | /** @internal */ |
| 296 | export const whenAnd = < |
nothing calls this directly
no test coverage detected