From b9e9855e4562030e2e2f7975fdf44a849f190257 Mon Sep 17 00:00:00 2001 From: Brendan Kenny Date: Fri, 31 Aug 2018 16:49:57 -0700 Subject: [PATCH] ignore emit --- lighthouse-core/gather/driver.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lighthouse-core/gather/driver.js b/lighthouse-core/gather/driver.js index 33e68f903173..693d4b1c925b 100644 --- a/lighthouse-core/gather/driver.js +++ b/lighthouse-core/gather/driver.js @@ -73,11 +73,11 @@ class Driver { if (this._networkStatusMonitor) { this._networkStatusMonitor.dispatch(event); } - if (event.params) { - this._eventEmitter.emit(event.method, event.params); - } else { - this._eventEmitter.emit(event.method); - } + + // @ts-ignore TODO(bckenny): tsc can't type event.params correctly yet, + // typing as property of union instead of narrowing from union of + // properties. See https://github.com/Microsoft/TypeScript/pull/22348. + this._eventEmitter.emit(event.method, event.params); }); }