Closed jviide closed 7 months ago
Latest commit: c8c95ac7dcbbfe8e97b251a4c3efdec82e72944b
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Name | Link |
---|---|
Latest commit | c8c95ac7dcbbfe8e97b251a4c3efdec82e72944b |
Latest deploy log | https://app.netlify.com/sites/preact-signals-demo/deploys/661aea4b40bfc100087e0cc4 |
Deploy Preview | https://deploy-preview-558--preact-signals-demo.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 site configuration.
This pull request restores the stricter types for effect callbacks and effect cleanup functions introduced in #249. Core tests needed to be modified slightly to accommodate these typing changes.
These stricter types were later changed back to allowing both effect callbacks and effect cleanup functions return
unknown
. It is convenient to allow anything to be returned, especially when writing tests likeeffect(() => s.value++)
. On the other hand stricter types can be useful for catching e.g. attempts to have asynchronous effect handlers, which the core does not support (effect(async () => { ... })
).It's debatable whether this change would warrant a patch or major release. I've tentatively chosen a patch changeset, as the previous related changes were also patch changes.