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

Nested route params broken #15

Closed
Rocinante89 opened this issue Aug 8, 2022 · 3 comments · Fixed by #16
Closed

Nested route params broken #15

Rocinante89 opened this issue Aug 8, 2022 · 3 comments · Fixed by #16
Labels

Comments

@Rocinante89
Copy link

Hi,
I'm having an issue with nested routes as below:

├── people
│   └──$personId
│              └── $planId
│                         └── remove-plan.tsx

The generated types are:

export declare function $path(
  route: "/people/:personId/:planId/remove-plan",
  params: { personId: string | number; planId: string | number; remove-plan: string | number },
  query?: Record<string, string | number>
): string;

export declare function $params(
  route: "/people/:personId/:planId/remove-plan",
  params: { readonly [key: string]: string | undefined }
): {
  personId: string,
  planId: string,
  remove-plan: string
};

Not sure why 'remove-plan' is being added as a param here

@yesmeck
Copy link
Owner

yesmeck commented Aug 8, 2022

@Rocinante89 Could you create a reproducible repo?

@Rocinante89
Copy link
Author

@yesmeck I tried to repro here, but it's working as expected.

No idea why it's doing the above in my app

yesmeck added a commit that referenced this issue Aug 17, 2022
yesmeck added a commit that referenced this issue Aug 17, 2022
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 0.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants