-
Notifications
You must be signed in to change notification settings - Fork 39
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
electron.d.ts error using TS2.6.0-rc in strict mode #79
Comments
This happens because the addEventListener/removeEventListener overloads in WebviewTag are incorrect. When you override a method in Typescript, the overloads of the base's method are not copied to the overriding method in the derived class. They're just checked for compatibility. You have to copy them yourself if you want them. Typescript 2.6 catches this because of strict function types, although it missed it before. The fix is to copy the add/RemoveEventListener overloads from HTMLElement to the very bottom of the list of overloads in WebviewTag. I'll do it this afternoon if I can figure out how to build electron.d.ts. |
Thanks for fixing! I am still getting the same error. Was this changed released yet, and if so which version? |
I'm still encountering this issue.
|
Me too! |
There is no such issue with the latest electron@1.8.2-beta.3 version, previous electron@1.8.2-beta.2 was affected. |
Hi guys How to fix it?
|
I think it is due to this new strict change:
https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#strict-function-types
The text was updated successfully, but these errors were encountered: