Skip to content

Commit

Permalink
feat(match): allow to pass custom predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
ecyrbe committed Aug 1, 2023
1 parent 1f6ea56 commit 82e8dc1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/internals/match/Match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ interface ExactMatchFn extends Fn {
export namespace Match {
export type With<pattern, handler> = Impl.With<pattern, handler, PatternMatchFn>;
export type WithExact<pattern, handler> = Impl.With<pattern, handler, ExactMatchFn>;
export type WithPredicate<predicate extends Fn, pattern, handler> = Impl.With<pattern, handler, predicate>;
}

0 comments on commit 82e8dc1

Please sign in to comment.