-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
microsoft/TypeScript-DOM-lib-generator
#394Labels
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
Milestone
Description
TypeScript Version: 2.8.0-dev.20180314
Code
const onTouchStart = (event: TouchEvent) {}
document.addEventListener("touchstart", onTouchStart);
Expected behavior:
onTouchStart
should be treated as an event listener.
Actual behavior:
Argument of type '(event: TouchEvent) => void' is not assignable to parameter of type 'EventListenerOrEventListenerObject'.
Type '(event: TouchEvent) => void' is not assignable to type 'EventListenerObject'.
Playground Link: link
Though the playground does not really demonstrate the issue, as it's not on the newest typescript version.
timocov, jakearchibald, houfeng0923, szimek, chdh and 1 more
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