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

Typed routes #88

Merged
merged 8 commits into from
Apr 28, 2023
Merged

Typed routes #88

merged 8 commits into from
Apr 28, 2023

Conversation

SimonSimCity
Copy link
Collaborator

@SimonSimCity SimonSimCity commented Apr 23, 2023

This PR also sets how i18n should behave in regards to routing.

@SimonSimCity SimonSimCity mentioned this pull request Apr 26, 2023
@sifferhans
Copy link
Collaborator

@SimonSimCity It seems the typed-router package is updated with the i18n fixes
https://github.com/victorgarciaesgi/nuxt-typed-router/releases/tag/v3.2.0

@SimonSimCity
Copy link
Collaborator Author

SimonSimCity commented Apr 27, 2023

I expect the error we had here to be a side effect of #86, in which we removed the fix on vue-tsc version. By this the type safety was not guaranteed to be checked in the same version. Don't know what this means for the other libs ... See my following comment.

@SimonSimCity
Copy link
Collaborator Author

SimonSimCity commented Apr 27, 2023

@sifferhans I'll update, but this shouldn't affect us ... victorgarciaesgi/nuxt-typed-router#87 (comment)

@SimonSimCity
Copy link
Collaborator Author

The problem about vue-tsc was not anything related to peer-dependencies - it was simply a package which was not installed. When then npx tried to run it, it asked to install it instead of which the version was different on what I used locally. I've added it as a dev-dependency.

Our handling of peer-dependencies is, as pointed out in #86, completely valid in that we let the packaging system figure out a version fitting to all peers. This is reflected in the pnpm-lock.yaml file which keeps track of all this.

@@ -47,14 +49,14 @@ function menuItemClick(event: Event, item: DropdownMenuItem) {
<p
v-else-if="item.clickFunction"
class="flex justify-start items-center gap-1 py-2 px-3"
@click="(event) => menuItemClick(event, item)"
@click="(event: MouseEvent) => menuItemClick(event, item)"
Copy link
Collaborator Author

@SimonSimCity SimonSimCity Apr 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Types don't have to be defined after updating typescript to v5, but then we run into other type-problems in components/PageHeading.vue 😰

@SimonSimCity SimonSimCity merged commit 4eefb2f into main Apr 28, 2023
@SimonSimCity SimonSimCity deleted the typed-routes branch April 28, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants