Skip to content

[BREAKING] 1.131.37 route params are not of promised type #5123

Closed

Description

@Arthurdw

Which project does this relate to?

Router

Describe the bug

Route parameters are now automatically parsed as integers at runtime, but TypeScript still types them as strings, causing type mismatches and potential runtime errors.

Probably related to changes made in: #5120

Your Example Website or App

https://stackblitz.com/edit/github-cr3hcvtf

Steps to Reproduce the Bug or Issue

Have any int params

Expected behavior

The parse should be passed a string

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.131.37
  • OS: Linux
  • Bundler: vite
  • Bundler Version: vite/7.1.5

Additional context

No response

Activity

  1. changed the title [-]1.131.37 route params are not of promised type[/-] [+][BREAKING] 1.131.37 route params are not of promised type[/+] on Sep 11, 2025
  2. schiller-manuel commented on Sep 11, 2025

    @schiller-manuel
    Collaborator

    to be clear, this is about the runtime type of sample being passed into params.parse

    it alternates between string and number

    params: {
        parse: ({ sample }) => {
          console.log(typeof sample);
          return { sample: parseInt(sample) };
        },
      },
  3. added a commit that references this issue on Sep 11, 2025
    b6a9880
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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