Open

Description
document.body.onclick = function() {
console.log(this.innerHTML.length);
}
The code works in a browser and worked in typescript@3.0
. But in typescript@3.1.0-dev.20180804
it is a compile error:
src/a.ts:3:22 - error TS2339: Property 'innerHTML' does not exist on type 'GlobalEventHandlers'.
3 console.log(this.innerHTML.length);
The value of this
should be HTMLElement
like it was before, not GlobalEventHandlers
.
Detected in fabric
and tingle.js
on DefinitelyTyped.