fix(types): Add StringMap type

This commit is contained in:
Tobias Bosch
2015-02-18 09:04:02 -08:00
parent 56f4e84d45
commit cd90038950
13 changed files with 31 additions and 27 deletions
@@ -57,7 +57,6 @@ class MapWrapper {
static Iterable values(Map m) => m.values;
}
// TODO: how to export StringMap=Map as a type?
class StringMapWrapper {
static HashMap create() => new HashMap();
static bool contains(Map map, key) => map.containsKey(key);
+1 -1
View File
@@ -3,6 +3,7 @@ import {int, isJsObject, global} from 'angular2/src/facade/lang';
export var List = global.Array;
export var Map = global.Map;
export var Set = global.Set;
export var StringMap = global.Object;
export class MapWrapper {
static create():Map { return new Map(); }
@@ -29,7 +30,6 @@ export class MapWrapper {
static values(m) { return m.values(); }
}
// TODO: cannot export StringMap as a type as Dart does not support renaming types...
/**
* Wraps Javascript Objects
*/