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:
Alex Eagle
2015-10-02 16:47:54 -07:00
committed by Alex Eagle
parent 2ebc74ddcc
commit 7c4199cd1c
76 changed files with 231 additions and 291 deletions

View File

@ -27,7 +27,7 @@ export abstract class DomAdapter {
* Maps attribute names to their corresponding property names for cases
* where attribute name doesn't match property name.
*/
attrToPropMap: StringMap<string, string>;
attrToPropMap: {[key: string]: string};
abstract parse(templateHtml: string);
abstract query(selector: string): any;

View File

@ -115,9 +115,9 @@ export class Parse5DomAdapter extends DomAdapter {
return result;
}
on(el, evt, listener) {
var listenersMap: StringMap<any, any> = el._eventListenersMap;
var listenersMap: {[k: /*any*/ string]: any} = el._eventListenersMap;
if (isBlank(listenersMap)) {
var listenersMap: StringMap<any, any> = StringMapWrapper.create();
var listenersMap: {[k: /*any*/ string]: any} = StringMapWrapper.create();
el._eventListenersMap = listenersMap;
}
var listeners = StringMapWrapper.get(listenersMap, evt);
@ -492,7 +492,7 @@ export class Parse5DomAdapter extends DomAdapter {
var rules = [];
for (var i = 0; i < parsedRules.length; i++) {
var parsedRule = parsedRules[i];
var rule: StringMap<string, any> = StringMapWrapper.create();
var rule: {[key: string]: any} = StringMapWrapper.create();
StringMapWrapper.set(rule, "cssText", css);
StringMapWrapper.set(rule, "style", {content: "", cssText: ""});
if (parsedRule.type == "rule") {