Skip to content
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

Fix event types of XMLHttpRequest #110

Closed
wants to merge 1 commit into from

Conversation

falsandtru
Copy link
Contributor

@falsandtru falsandtru commented May 19, 2016

@falsandtru
Copy link
Contributor Author

How can I override addEventListener signatures?

@falsandtru
Copy link
Contributor Author

@zhengbli Are you supported signature overriding like this?

@mhegazy
Copy link
Contributor

mhegazy commented Jun 7, 2016

ping @zhengbli

@zhengbli
Copy link
Contributor

zhengbli commented Jun 7, 2016

Overriding the signatures of addEventListener is tricky because of the way string overloads works in TypeScript. The overload signatures may come from the spec, or inherited from base classes. However if it has its own overload signatures, all inherited ones will be wiped. So the normal way of overriding properties may not work properly here. I'll come up with a fix shortly.

@falsandtru
Copy link
Contributor Author

Any updates?

@zhengbli
Copy link
Contributor

Actually I found it is easier to change the emitting F# code. I sent another PR at #144, sorry for the delay.

@falsandtru
Copy link
Contributor Author

LGTM 👍

@falsandtru falsandtru closed this Aug 27, 2016
@falsandtru falsandtru deleted the XMLHttpRequest branch August 27, 2016 05:52
orta added a commit to orta/TSJS-lib-generator that referenced this pull request Jul 1, 2021
…s an extendable interface (microsoft#110)

* Bring back the EventListenerOrEventListenerObject and EventListener as an extendable interface

* Merge main

* Use th existing build infra to add the eventlistener

* Docs

* Eslint fix

* No circular reference

* Remove call signature code

* Final removal

* Remove the hack for EventListenerOrEventListenerObject

* Update src/build.ts

Co-authored-by: Kagami Sascha Rosylight <saschanaz@outlook.com>

* User override types for EventTarget

* Update src/build/emitter.ts

Co-authored-by: Kagami Sascha Rosylight <saschanaz@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants