Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routify 2.x $isActive helper documentation does not match up with types #475

Open
hobbitronics opened this issue Aug 19, 2022 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@hobbitronics
Copy link

hobbitronics commented Aug 19, 2022

bug description
I see the following error when running svelte-check and get a red squiggly in VScode.

Error: Type 'true' has no properties in common with type 'UrlOptions'. (ts)
$: tabs.forEach((tab, tabIndex) => {
  if ($isActive(tab.tabUrl, {}, true)) {
    activeTabIndex = tabIndex

package.json
npx svelte-check

version
@roxi/routify": "^2.18.7", "svelte": "^3.49.0", typescript": "^4.7.4", @rollup/plugin-typescript": "^8.3.3", "tslib": "^2.4.0","@tsconfig/svelte": "^2.0.1", @tsconfig/svelte": "^2.0.1", svelte-check": "^2.8.1", etc...

screenshot
image

@hobbitronics hobbitronics added bug Something isn't working needs triage labels Aug 19, 2022
@hobbitronics hobbitronics changed the title routify 2.x $isActive has types from routify 3.x routify 2.x $isActive helper documentation does not match up with types Apr 13, 2023
@hobbitronics
Copy link
Author

hobbitronics commented Apr 13, 2023

I dug into the code a bit and I think the documentation just needs to be changed to show UrlOptions: {strict: boolean} instead of strict: boolean as a parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant