diff --git a/src/internals/match/Match.ts b/src/internals/match/Match.ts index 057d999..87365b1 100644 --- a/src/internals/match/Match.ts +++ b/src/internals/match/Match.ts @@ -59,7 +59,9 @@ export namespace Match { * ]> * ``` */ - export type With = pattern extends Fn ? Impl.With : Impl.With; + export type With = pattern extends infer MatchFn extends Fn ? + Impl.With : + Impl.With; /** * Match.WithEqual matches exactly a type with a handler. * The handler can be any Fn or value type.