Skip to content

Commit

Permalink
fix: parameter order of RouterMatcher.match
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS committed Mar 1, 2024
1 parent b80791d commit 9c9cfc8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-timers-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typed/router": patch
---

Fix parameter order of RouteMatcher.match
4 changes: 2 additions & 2 deletions packages/router/src/Matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export interface RouteMatcher<A, E, R> {
<const P extends string, B, E2, R2>(
route: Route.Route<P> | P,
f: (ref: RefSubject.RefSubject<Path.ParamsOf<P>>) => Fx.Fx<B, E2, R2>
): RouteMatcher<R | Exclude<R2, Scope.Scope>, E | E2, A | B>
): RouteMatcher<A | B, E | E2, R | Exclude<R2, Scope.Scope>>

<const P extends string, B, E2, R2, C, E3, R3>(
route: Route.Route<P> | P,
guard: Guard.Guard<Path.ParamsOf<P>, B, E2, R2>,
f: (ref: RefSubject.RefSubject<B>) => Fx.Fx<C, E3, R3>
): RouteMatcher<R | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>, E | E2 | E3, A | C>
): RouteMatcher<A | C, E | E2 | E3, R | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>
}

readonly to: {
Expand Down

0 comments on commit 9c9cfc8

Please sign in to comment.