I am getting this error with v1.6.3 with the following code:
document.querySelector('body>section.container').innerHTML // error: TS2339
To remedy it, I had to explicitly cast it as HTMLElement:
(<HTMLElement>document.querySelector('body>section.container')).innerHTML // it works!
However, innerHTML is supported by Element interface:
https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML.
PRs are appreciated. here is how to send lib.d.ts PRs: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes
I would like to try to fix this bug, is it possible to assigned it to me ?
Thanks !
@lgolven feel free to send a PR for it.
I have added PR here: https://github.com/Microsoft/TSJS-lib-generator/pull/35
@mhegazy Is this a correct way to fix the problem?
Thanks @MartyIX! This will just need to be synced up with the repo.
Well, Element.outerHTML is still missing :(
@duanyao Be the pull request you want to see in the world :wink: