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

TypeScript: Make currentTarget non-nullable #26

Merged
merged 1 commit into from Sep 12, 2019

Conversation

@josh
Copy link
Collaborator

commented Sep 6, 2019

Ports flow type change made in #7 to TypeScript annotation file.

Makes it okay to write code like

import {on} from 'delegated-events'

on('click', '.foo', function(event) {
  this.classList.toggle('on')
  event.currentTarget.classList.toggle('on')
})

Since currentTarget must always be an Element that implements .matches to have passed the CSS selector check.

To: @dgraham
CC: @koddsson @muan @myobie

@josh

This comment has been minimized.

Copy link
Collaborator Author

commented Sep 12, 2019

I think @dgraham is the only one with merge and release access. 👋 hi david

@dgraham dgraham merged commit 2fc9b95 into dgraham:master Sep 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dgraham

This comment has been minimized.

Copy link
Owner

commented Sep 12, 2019

I added tests in b216843, which required some prerequisites, like learning TypeScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.