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
    Bug
    Domain: lib.d.ts
    on Mar 3, 2017
  2. added this to the milestone on Mar 3, 2017
  3. added
    Fixed in TSJS repo
    on Apr 4, 2017
  4. modified the milestones: TypeScript 2.3, on Apr 4, 2017
  5. added
    Fixed
    on Apr 13, 2017
  6. added
    Fixed
    and removed
    Fixed
    Fixed in TSJS repo
    on Aug 24, 2017
  7. 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

BugDomain: lib.d.tsFixed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions