-
-
Notifications
You must be signed in to change notification settings - Fork 481
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: use generated tsconfig and virtual file augmentations #3112
fix: use generated tsconfig and virtual file augmentations #3112
Conversation
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.
Great work!
This approach makes sense!
I have always found it strange that the src
directory contains a mixture of .ts
implementation files and .d.ts
type definition files, and I have wanted to refactor them at some point.
Virtual modules solve this issue, but it depends on the bundler. Since the nuxt module is a framework module system and Nuxt provides a bundling framework system, I believe the bundler dependency is not an issue.
Let's keep it up!
@userquin
Thank you for supporting!
Seems to be working as expected now π€ It's unfortunate that we now have two identical virtual file augmentations, and will have to look into the added type assertions in a future refactor. But overall this should make the module types more predictable and in line with established (but undocumented π ) conventions among Nuxt modules. |
commit: |
π Linked issue
β Type of change
π Description
This cleans up the virtual file augmentations as well as the tsconfig file to resemble the module started more.
I had to add a bunch of type assertions for both
I18n
and runtime config types, will need to look into these,Thanks to @userquin for giving examples on how to deal with the virtual file types!
π Checklist