Skip to content

Commit

Permalink
chore: add experimental tag
Browse files Browse the repository at this point in the history
  • Loading branch information
chorobin committed Aug 23, 2024
1 parent cc3e6ba commit 18faefc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-router/src/Matches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ export type IsMatch<TMatch, TPath> = IsMatchParse<
TMatch extends any ? { match: TMatch; value: TMatch } : never
>

/**
* Narrows matches based on a path
* @experimental
*/
export const isMatch = <TMatch, TPath extends string>(
match: TMatch,
path: Constrain<TPath, IsMatch<TMatch, TPath>['path']>,
Expand Down

0 comments on commit 18faefc

Please sign in to comment.