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.