Open
Description
Discovered while looking at the puppeteer user test:
class EmulationManager {
constructor() {
this._emulatingMobile = false;
}
/**
* @param {boolean} viewport
*/
emulateViewport(viewport) {
if (this._emulatingMobile !== viewport)
return true;
this._emulatingMobile = viewport;
}
}
Expected behavior:
No error with noImplicitAny, and this._emulatingMobile: boolean
.
Actual behavior:
Error on this._emulatingMobile = false
, "implicitly has type 'any' because it is referenced directly or indirectly in its own initialiser, and this.emulatingMobile: any
.