chore(typings): remove StringMap
This was a poorly typed attempt to mimic TypeScript's index signatures, which we can use instead. This eliminates a very strange type that we were exposing to users, but not re-exporting through our public API. Fixes #4483
This commit is contained in:
@ -11,7 +11,7 @@ import {
|
||||
xit,
|
||||
} from 'angular2/test_lib';
|
||||
|
||||
import {ListWrapper, StringMap} from 'angular2/src/core/facade/collection';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
|
||||
|
||||
import {Metric, MultiMetric, bind, Injector} from 'benchpress/common';
|
||||
@ -70,13 +70,13 @@ class MockMetric extends Metric {
|
||||
|
||||
beginMeasure(): Promise<string> { return PromiseWrapper.resolve(`${this._id}_beginMeasure`); }
|
||||
|
||||
endMeasure(restart: boolean): Promise<StringMap<string, any>> {
|
||||
endMeasure(restart: boolean): Promise<{[key: string]: any}> {
|
||||
var result = {};
|
||||
result[this._id] = {'restart': restart};
|
||||
return PromiseWrapper.resolve(result);
|
||||
}
|
||||
|
||||
describe(): StringMap<string, string> {
|
||||
describe(): {[key: string]: string} {
|
||||
var result = {};
|
||||
result[this._id] = 'describe';
|
||||
return result;
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
xit,
|
||||
} from 'angular2/test_lib';
|
||||
|
||||
import {ListWrapper, StringMap} from 'angular2/src/core/facade/collection';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
|
||||
import {DateWrapper} from 'angular2/src/core/facade/lang';
|
||||
|
||||
@ -65,12 +65,12 @@ export function main() {
|
||||
class MockReporter extends Reporter {
|
||||
constructor(private _id: string) { super(); }
|
||||
|
||||
reportMeasureValues(values: MeasureValues): Promise<StringMap<string, any>> {
|
||||
reportMeasureValues(values: MeasureValues): Promise<{[key: string]: any}> {
|
||||
return PromiseWrapper.resolve({'id': this._id, 'values': values});
|
||||
}
|
||||
|
||||
reportSample(completeSample: MeasureValues[],
|
||||
validSample: MeasureValues[]): Promise<StringMap<string, any>> {
|
||||
validSample: MeasureValues[]): Promise<{[key: string]: any}> {
|
||||
return PromiseWrapper.resolve(
|
||||
{'id': this._id, 'completeSample': completeSample, 'validSample': validSample});
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
xit,
|
||||
} from 'angular2/test_lib';
|
||||
|
||||
import {StringMap, ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {isPresent, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {PromiseWrapper} from 'angular2/src/core/facade/async';
|
||||
|
||||
@ -57,7 +57,7 @@ class MockExtension extends WebDriverExtension {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
supports(capabilities: StringMap<string, any>): boolean {
|
||||
supports(capabilities: {[key: string]: any}): boolean {
|
||||
return StringWrapper.equals(capabilities['browser'], this.id);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user