solidjs/solid-router

In the new version, Route is imported as a type rather than a method.

cppsh1t opened this issue · 3 comments

Describe the bug

I've set up a new Solid project and then installed the latest version of the router(0.13.4). Although the router is functioning properly, within vscode, Route is being imported as a type instead of a method.
Then, I downgraded the router's version to 0.13.3, restarted vscode, and everything worked as expected.

Your Example Website or App

sry, i don't have

Steps to Reproduce the Bug or Issue

  1. pnpm create solid
  2. pnpm add @solidjs/router
  3. pnpm install
  4. use Router and Route

Expected behavior

no error in vscode

Screenshots or Videos

error1 error2

Platform

  • OS: Windows
  • Browser: Edge

Additional context

No response

I think this is due to my change #432

It is possible to export both with the same name, but it is confusing when they refer to different things. Since the Route type was not part of the public API before it can be safely renamed.

Created an reproduction repo before I saw this issue. Here it is in case it helps: https://github.com/jsimonrichard/solid-router-0.13.4-route-type-error-mre

Same question