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
+1 -1
View File
@@ -1,4 +1,4 @@
import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {StringMapWrapper} from 'angular2/src/core/facade/collection';
/**
* Supported http methods.
+2 -3
View File
@@ -5,7 +5,6 @@ import {
Map,
MapWrapper,
ListWrapper,
StringMap
} from 'angular2/src/core/facade/collection';
/**
@@ -36,7 +35,7 @@ import {
*/
export class Headers {
_headersMap: Map<string, string[]>;
constructor(headers?: Headers | StringMap<string, any>) {
constructor(headers?: Headers | {[key: string]: any}) {
if (isBlank(headers)) {
this._headersMap = new Map<string, string[]>();
return;
@@ -44,7 +43,7 @@ export class Headers {
if (headers instanceof Headers) {
this._headersMap = (<Headers>headers)._headersMap;
} else if (headers instanceof StringMap) {
} else /*if (headers instanceof StringMap)*/ {
this._headersMap = MapWrapper.createFromStringMap<string[]>(headers);
MapWrapper.forEach(this._headersMap, (v, k) => {
if (!isListLikeIterable(v)) {