-
Notifications
You must be signed in to change notification settings - Fork 103
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
Fix TypeScript errors in ssr.ts & when using vue-tsc #87
base: main
Are you sure you want to change the base?
Conversation
Create AppPageProps that contain all shared props. This avoids having to import SharedProps whenever PageProps are being used
…add template macro types
Use the correct method overload for the route properties during SSR and add type for page file imports
Fixes various issues that would prevent typescript from compiling when vue-tsc is being used.
@@ -41,7 +41,7 @@ | |||
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ | |||
"types": [ | |||
"vite/client", | |||
"vue/tsx", | |||
"node", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain to me what this is doing here?
Everything else is looking really good. Thanks for the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not find any source for the vue/tsx
types within the installed packages, nor any reference in the official Vue docs recommending setting this as a value See TS docs for Vue. I assume this value was set by mistake or might be a remnant from an outdated Vue version.
The addition of the node
types is simply there to make the compiler aware of the global object in ssr.ts
.
This pull request addresses various issues with the current implementation of the ssr.ts, global d.ts and various template files.
route
,$inertia
,$page
and$headManager
vue-tsc
into their build step