Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TypeScript does not properly support the TouchEvent constructor #14435

Copy link
Copy link
@MadaraUchiha

Description

@MadaraUchiha
Issue body actions

TypeScript Version: 2.2.1

Code

const event = new TouchEvent('touchstart', {ctrlKey: true});

Expected behavior:

No error. As per MDN

Actual behavior:
The TouchEvent constructor in lib.d.ts is defined to not accept parameters.


Stack Overflow question about this: How to manually trigger a Touch event in TypeScript?

Note:
I already have a PR ready for the fix, based on the same MDN article.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.