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

bug(types): SwipeableHandlers.ref accepts null. #142

Merged

Conversation

mastermatt
Copy link
Contributor

Fixes #140.

Adds test to explicitly cover this case because it seems dtslint
doesn't catch the issue when a handlers instance is spread during an
Element instantiation. The React types do declare the arg correctly.

@hartzis hartzis self-assigned this May 14, 2019
types/index.d.ts Outdated Show resolved Hide resolved
})

handlers.ref(<div />)
handlers.ref(null)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome tests! thank you!

Fixes FormidableLabs#140.

Adds test to explicitly cover this case because it seems `dtslint`
doesn't catch the issue when a handlers instance is spread during an
`Element` instantiation. The React types do [declare the arg correctly](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L85).
@hartzis hartzis merged commit a69b6c5 into FormidableLabs:master May 15, 2019
@github-actions github-actions bot mentioned this pull request May 18, 2023
@paulmarsicloud paulmarsicloud mentioned this pull request Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript error when using useSwipable hook and applying handlers.
2 participants