Skip to content

Broken types since the 1.0.8 release #908

@SeanCassiere

Description

@SeanCassiere

Describe the bug

As of the release for 1.0.8, the types are broken on the existing kitchen sink examples.
This bug report is only at the typescript inference level. I have not observed any broken functionality in the router itself.

Whilst this release, seems to have fixed the type instantiation is excessive error on codebases with large route trees, it seems to have introduced the following TS-level errors.

Please see the Stackblitz reproduction and the TS errors being shown.

  • useRouter() => router.preload broken - Lines 338 - 343
  • useNavigate() => navigate broken - Lines 347 - 353
  • search on <Link /> is messing up the inference of possible search params available - Lines 376 - 385
  • loader.navigate expects undefined to be passed to the to property 🤔 - Lines 305-309

Your Example Website or App

https://stackblitz.com/edit/github-gvskyk?file=src%2Fmain.tsx

Steps to Reproduce the Bug or Issue

  1. Open the reproduction link and check the blocks mentioned in the description.

Expected behavior

  1. Fix the expectation of undefined on the to property on the navigation calls from loader.navigate, useRouter().preloadRoute, useNavigate(), and LinkOptions.
  2. search on the navigation of Links and other navigation calls, shouldn't be throwing errors on the previously working syntax.
  3. Preferably do not reintroduce the type instantiation is excessive bug which seems to affect codebases with larger route trees which was observed with 1.0.6 release.

Screenshots or Videos

No response

Platform

  • OS: MacOS
  • Browser: Chrome
  • Version: 1.0.8

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