Event type for readystatechange is not specific enough#969
Event type for readystatechange is not specific enough#969jonhue wants to merge 1 commit intomicrosoft:mainfrom jonhue:fix-41775
Conversation
|
This is a bit of a cherrypicking of all the unspecific typed events (even if you only look at ref #899 and microsoft/TypeScript#299 |
|
@HolgerJeromin Thank you for these pointers! I actually would be in favor of turning the But this would be a larger change, so without someone from the TypeScript team chiming in and telling us they are looking for something like that, I'm somewhat hesitant to implement it. At least as part of this pr. |
|
Looking at all the past issues with trying to make these types more explicit, we're very wary of changes here which adds generics to types which are re-used all of the place. I know it's not a perfect representation of the underlaying DOM as it is, but we're making perf vs memory vs accuracy trade-offs and I think we'll probably not take this. |
|
@orta makes sense :) should we then close the original issue, so that we don't spend more time on this in the future? |
Fixes microsoft/TypeScript#41775
I was a little bit unsure whether its best to use
ProgressEvent<Document>vs makingEventgeneric (Event<T extends EventTarget = EventTarget>) and then usingEvent<Document>.