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

Adds passive/once to EventListenerOptions type #357

Merged
merged 5 commits into from Dec 15, 2018
Merged

Conversation

sorvell
Copy link
Member

@sorvell sorvell commented Dec 12, 2018

Fixes #325.

Despite this supposedly being in TypeScirpt (microsoft/TypeScript#9548), it's not, so we augment the type here.

Also adds tests for once and passive options.

Fixes #325.

Despite this supposedly being in TypeScirpt (microsoft/TypeScript#9548), it's not, so we augment the type here.

Also adds tests for `once` and `passive` options.
@sorvell sorvell added this to the 1.0.0 milestone Dec 12, 2018
@CaptainCodeman
Copy link

The options are defined on the AddEventListenerOptions interface, not EventListenerOptions.

See: #326

// not include these options despite
// https://github.com/Microsoft/TypeScript/issues/9548
declare global {
interface EventListenerOptions {

Choose a reason for hiding this comment

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

Aren't these already defined in Typescript here?

https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L33

Copy link
Member Author

Choose a reason for hiding this comment

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

Gah, thanks for pointing that out.

@kevinpschaaf kevinpschaaf merged commit 4372086 into master Dec 15, 2018
@kevinpschaaf kevinpschaaf deleted the fix-eventOptions branch December 15, 2018 02:34
@motss
Copy link

motss commented Dec 20, 2018

Was looking into this. Glad that it's fixed now.

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

5 participants