fix(benchpress): compile cleanly with TS 2.4 (#18455)

This commit is contained in:
Chuck Jazdzewski 2017-08-02 16:24:00 -07:00 committed by Victor Berchet
parent 6a88659c9a
commit e25b3dd163
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ export class PerflogMetric extends Metric {
return result; return result;
} }
let resolve: (result: any) => void; 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); this._setTimeout(() => resolve(this._readUntilEndMark(markName, loopCount + 1)), 100);
return promise; return promise;
}); });

View File

@ -40,7 +40,7 @@ export class FirefoxDriverExtension extends WebDriverExtension {
return this._driver.executeScript(script); return this._driver.executeScript(script);
} }
readPerfLog(): Promise<PerfLogEvent> { readPerfLog(): Promise<PerfLogEvent[]> {
return this._driver.executeAsyncScript('var cb = arguments[0]; window.getProfile(cb);'); return this._driver.executeAsyncScript('var cb = arguments[0]; window.getProfile(cb);');
} }