From e25b3dd163c3ed9ee8d88086b74f6d934d967430 Mon Sep 17 00:00:00 2001 From: Chuck Jazdzewski Date: Wed, 2 Aug 2017 16:24:00 -0700 Subject: [PATCH] fix(benchpress): compile cleanly with TS 2.4 (#18455) --- packages/benchpress/src/metric/perflog_metric.ts | 2 +- packages/benchpress/src/webdriver/firefox_driver_extension.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/benchpress/src/metric/perflog_metric.ts b/packages/benchpress/src/metric/perflog_metric.ts index 391a97ff90..3ef69f9061 100644 --- a/packages/benchpress/src/metric/perflog_metric.ts +++ b/packages/benchpress/src/metric/perflog_metric.ts @@ -156,7 +156,7 @@ export class PerflogMetric extends Metric { return result; } let resolve: (result: any) => void; - const promise = new Promise(res => { resolve = res; }); + const promise = new Promise<{[key: string]: number}>(res => { resolve = res; }); this._setTimeout(() => resolve(this._readUntilEndMark(markName, loopCount + 1)), 100); return promise; }); diff --git a/packages/benchpress/src/webdriver/firefox_driver_extension.ts b/packages/benchpress/src/webdriver/firefox_driver_extension.ts index 0c3c360632..9c895259cb 100644 --- a/packages/benchpress/src/webdriver/firefox_driver_extension.ts +++ b/packages/benchpress/src/webdriver/firefox_driver_extension.ts @@ -40,7 +40,7 @@ export class FirefoxDriverExtension extends WebDriverExtension { return this._driver.executeScript(script); } - readPerfLog(): Promise { + readPerfLog(): Promise { return this._driver.executeAsyncScript('var cb = arguments[0]; window.getProfile(cb);'); }