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

fix: improve types in touch code #6099

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

rachel-fenichel
Copy link
Collaborator

@rachel-fenichel rachel-fenichel commented Apr 21, 2022

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Proposed Changes

Add specificity to types in touch code.

I added more specific types where possible (e.g. with instanceof) but left fallbacks to the old code with casts to ?, to avoid accidentally changing behaviour in the edge cases.

Reason for Changes

Part of #5857

Fix or mask type errors.

Test Coverage

Tested on desktop chrome and through device emulation in chrome dev tools, acting as a pixel 5.

Additional Information

#6097 tracks future cleanup.

caniuse.com says pointer events are supported in all browsers we support, so we can refactor and simplify this code--but we'll need to do a lot of testing to verify it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants