-
-
Notifications
You must be signed in to change notification settings - Fork 457
fix: Add another defineItem signature when init function is passed
#1909
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
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
just about to create a PR for this :) haha thank you! |
|
LOL I didn't see this, I created a similar one |
|
@aklinker1 Is there anything I can do to help get this reviewed and merged? |
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.
Nice, hopefully I have enough type-tests that they verify this doesn't break anything lol
Is there anything I can do to help get this reviewed and merged?
Nope, I just had to find time to get to reviewing it. Been very busy these last five months, but I put in a full 8 hours of WXT work today... Might have completely blown off work lol
|
@toofishes could you merge this with the latest |
wxt-dev#1601 adjusted the typing of `defineItem` to examine whether `defaultValue` or `fallback` were passed, and only then, remove the `null` from the possible returned value. However, it did not accommodate the case where an `init` function is passed to prevent a `null` return, which was previously allowed. Add a new type signature for this case, and add some tests for type expectations to catch the issue.
f44bdb8 to
7cb0da8
Compare
|
Rebased on latest |
|
Thanks, I just had to click the "approve and run" button, but it wasn't showing up. They're all running now, hopefully everything passes... |
@wxt-dev/analytics
@wxt-dev/auto-icons
@wxt-dev/browser
@wxt-dev/i18n
@wxt-dev/module-react
@wxt-dev/module-solid
@wxt-dev/module-svelte
@wxt-dev/module-vue
@wxt-dev/runner
@wxt-dev/storage
@wxt-dev/unocss
@wxt-dev/webextension-polyfill
wxt
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1909 +/- ##
==========================================
+ Coverage 75.98% 76.08% +0.09%
==========================================
Files 113 113
Lines 3040 3040
Branches 685 685
==========================================
+ Hits 2310 2313 +3
+ Misses 646 643 -3
Partials 84 84 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for helping make WXT better! |
Overview
#1601 adjusted the typing of
defineItemto examine whetherdefaultValueorfallbackwere passed, and only then, remove thenullfrom the possible returned value. However, it did not accommodate the case where aninitfunction is passed to prevent anullreturn, which was previously allowed.Add a new type signature for this case, and add some tests for type expectations to catch the issue.
Manual Testing
Added type tests that fail before this change, and succeed after.
Related Issue
defineItemfallback #1601