Skip to content

Route.fullpath return wrong TS value #2675

@swbtrifork

Description

@swbtrifork

Which project does this relate to?

Router

Describe the bug

Having a index.tsx route, will return a trailing slash when calling Route.fullpath, but the TS inference is without the trailing slash.

Your Example Website or App

https://stackblitz.com/edit/github-r3ssvd?file=src%2Froutes%2Ftest%2Findex.tsx

Steps to Reproduce the Bug or Issue

Click on test in header.

Expected behavior

as a user, i expected these types to lin up, so i can use them in child components, without relying on tanstack to remove double slashes, and make logic based on paths.

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    typesChanges to the typescript types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions