Microsoft/TypeScript

Request to change currentTarget in Event interface for lib.d.ts

Open

#299 opened on Jul 29, 2014

View on GitHub
 (39 comments) (89 reactions) (0 assignees)TypeScript (6,726 forks)batch import
Domain: lib.d.tsHelp WantedSuggestion

Repository metrics

Stars
 (48,455 stars)
PR merge metrics
 (Avg merge 6d 17h) (9 merged PRs in 30d)

Description

When using the Event interface from lib.d.ts, and attaching a listener, the callback will get an object of type Event. However, the Event's currentTarget property is of type EventTarget (whereas it's should be of type Element/HTMLElement).

Contributor guide