wxt
wxt copied to clipboard
fix: Add another `defineItem` signature when `init` function is passed
Overview
https://github.com/wxt-dev/wxt/pull/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.
Manual Testing
Added type tests that fail before this change, and succeed after.
Related Issue
- #1601
Deploy Preview for creative-fairy-df92c4 ready!
| Name | Link |
|---|---|
| Latest commit | f44bdb8caa5a2e7785989377ec61d0a68de2696d |
| Latest deploy log | https://app.netlify.com/projects/creative-fairy-df92c4/deploys/68d3f850ba020800081e4cb4 |
| Deploy Preview | https://deploy-preview-1909--creative-fairy-df92c4.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
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?