Skip to content

Incorrect type inference for the match param in MatchRoute component #7128

@SkandarS0

Description

@SkandarS0

Which project does this relate to?

Router

Describe the bug

The match param of the MatchRoute component is being typed incorrectly,

Your Example Website or App

https://github.com/SkandarS0/f-med-sousse/tree/match-route-issue

Steps to Reproduce the Bug or Issue

The steps to reproduce are included in the readme file of the provided example

Expected behavior

As a user I expected the match param be ResolveParams<"/admin/login"> | undefined and ResolveParams<"/student/login"> | undefined but it's ResolveParams<"/login"> | undefined

Image

Screenshots or Videos

No response

Platform

  • Router Version: 1.168.10
  • OS: Windows
  • Browser: Chrome
  • Browser Version: 146
  • Bundler: vite
  • Bundler Version: 8.0.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions