fix(benchpress): compile cleanly with TS 2.4 (#18455)
This commit is contained in:
parent
6a88659c9a
commit
e25b3dd163
|
@ -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;
|
||||||
});
|
});
|
||||||
|
|
|
@ -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);');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue