Skip to content
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

chore(types): use official NonNullable again #548

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Contributor

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2022

⚠️ No Changeset found

Latest commit: 850cb30

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

@codesandbox-ci
Copy link

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 850cb30:

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

@dbismut
Copy link
Collaborator

dbismut commented Oct 26, 2022

Awesome thanks for tracking this @Andarist, I'll merge soon.

@dbismut
Copy link
Collaborator

dbismut commented Oct 27, 2022

@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.

@Andarist
Copy link
Contributor Author

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).

@dbismut
Copy link
Collaborator

dbismut commented Oct 28, 2022

Indeed that's weird! Let's leave this open and I'll merge when Typescript upgrades to a new minor. Thanks!

@dbismut dbismut added the hold label Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants