Skip to content

Types for TransitionEvent object #13888

Closed
@devversion

Description

@devversion

TypeScript Version: Master

Code

/* propertyName and elapsedTime are variables above. */
let event = new TransitionEvent('transitionend', {propertyName, elapsedTime});

As per the definition of the TransitionEvent object, there are no parameters supported (See here)

Expected behavior:

As specified in MDN, the TransitionEvent has a different constructor signature and should accept a type and an options object.

Here is the MDN artice: https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/TransitionEvent

Also confirmed that this works the same way in Chrome right now.

Actual behavior:

TypeScript currently only allows us to create a TransitionEvent without any parameters.

Would like to submit a PR if desired and if bug is valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions