-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event type for readystatechange is not specific enough #41775
Comments
I've tried to make PR which would fix this #41776
|
Seems it would be required to modify https://github.com/microsoft/TypeScript-DOM-lib-generator/ and I have no idea how. |
That's the right repro for the fix, but we track the issues here sometimes too |
@RyanCavanaugh I suggest closing this here as @orta made a valid case against making the type more specific here (microsoft/TypeScript-DOM-lib-generator#969 (comment)). |
Agreed |
TypeScript Version: 4.1.0 (probably all)
Search Terms: readystatechange, ProgressEvent
Code
Expected behavior:
For
readystatechange
event, when calling fromdocument.addEventListener
there is only single event target allowed and that is Document itself.Spec:
So code above should be executable without typescript errors.
Actual behavior:
Currently there is no information about event.target. It's pointing to generic event interface.
Playground Link
The text was updated successfully, but these errors were encountered: