use-gesture
use-gesture copied to clipboard
chore(types): use official `NonNullable` again
This reverts the change to use a custom NonUndefined
. It was introduced to workaround an issue with TS 4.8 beta:
TS 4.8-beta playground
This is no longer an issue with the stable TS 4.8 though so this workaround is no longer needed: TS 4.8.4 playground
⚠️ No Changeset found
Latest commit: 850cb30a8e1425b8dfc9a6a6f85be30dcbba3de2
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 850cb30a8e1425b8dfc9a6a6f85be30dcbba3de2:
Sandbox | Source |
---|---|
gesture-drag | Configuration |
gesture-drag-target | Configuration |
gesture-nested | Configuration |
gesture-drag-vanilla | Configuration |
gesture-move | Configuration |
gesture-pinch | Configuration |
gesture-multiple-pinch | Configuration |
gesture-three | Configuration |
gesture-card-zoom | Configuration |
gesture-viewpager | Configuration |
Awesome thanks for tracking this @Andarist, I'll merge soon.
@Andarist after checking this locally in the repo, I still got an error. I updated the Typescript sandbox in 4.8.4 to be truer to the Typescript code in the lib, and I do get the error again.
Hah, this is very interesting!
I've created a playground with some additional checks (here) and I'm 100% certain that this is a bug in TypeScript. I've reported it here.
So this prevents you currently from using the official NonNullable
which is very unfortunate - you probably won't be able to use it even once this gets fixed, unless you'd be fine with telling people to upgrade their TS version (for a new patch version).
Indeed that's weird! Let's leave this open and I'll merge when Typescript upgrades to a new minor. Thanks!