-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
refactor: add new overload to the type of defineConfig #13958
refactor: add new overload to the type of defineConfig #13958
Conversation
Run & review this pull request in StackBlitz Codeflow. |
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
I've tried this approach before. First, it breaks Qwik's types because of an |
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.
Maybe adding more overloads can solve your original problem already?
I agree that adding this overload should fix my issue:
I'll check that it's indeed the case and hope it won't break something else |
d965544
to
070f065
Compare
@sodatea I've tested with the new overload and it would indeed fix my use case (if the same change would be done in vitest too but that's another issue and I'll try to port it when this is resolved) |
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
Ecosystem CI looks good, same tests are failing in main |
Description
Fixes #13950 (at least partially)
Using a generic type for
defineConfig
avoids having the result being typed with a union type, with both functions or objects.Additional context
I've run the
typecheck
locally and everything passed.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).