Skip to content

Commit

Permalink
fix: make isMatching(p) infer the pattern as a const type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
gvergnaud committed Feb 2, 2024
1 parent 2352f00 commit 442a0c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/is-matching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { matchPattern } from './internals/helpers';
* return input.name
* }
*/
export function isMatching<p extends Pattern<unknown>>(
export function isMatching<const p extends Pattern<unknown>>(
pattern: p
): (value: unknown) => value is P.infer<p>;
/**
Expand Down

0 comments on commit 442a0c3

Please sign in to comment.