Skip to content

TypeScript does not properly support the TouchEvent constructor #14435

Closed
microsoft/TypeScript-DOM-lib-generator
#226

Description

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.

Activity

  1. added this to the milestone on Mar 3, 2017
  2. modified the milestones: TypeScript 2.3, on Apr 4, 2017
  3. added
    FixedA PR has been merged for this issue
    and removed
    FixedA PR has been merged for this issue
    Fixed in TSJS repoFix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet
    on Aug 24, 2017
  4. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions