feat(change_detection): provide error context for change detection errors
This commit is contained in:
@ -34,7 +34,13 @@ class IterableMap extends IterableBase<List> {
|
||||
|
||||
class MapWrapper {
|
||||
static Map clone(Map m) => new Map.from(m);
|
||||
|
||||
// in opposite to JS, Dart does not create a new map
|
||||
static Map createFromStringMap(Map m) => m;
|
||||
|
||||
// in opposite to JS, Dart does not create a new map
|
||||
static Map toStringMap(Map m) => m;
|
||||
|
||||
static Map createFromPairs(List pairs) => pairs.fold({}, (m, p) {
|
||||
m[p[0]] = p[1];
|
||||
return m;
|
||||
|
@ -62,6 +62,11 @@ export class MapWrapper {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
static toStringMap<T>(m: Map<string, T>): StringMap<string, T> {
|
||||
var r = {};
|
||||
m.forEach((v, k) => r[k] = v);
|
||||
return r;
|
||||
}
|
||||
static createFromPairs(pairs: List<any>): Map<any, any> { return createMapFromPairs(pairs); }
|
||||
static forEach<K, V>(m: Map<K, V>, fn: /*(V, K) => void*/ Function) { m.forEach(<any>fn); }
|
||||
static get<K, V>(map: Map<K, V>, key: K): V { return map.get(key); }
|
||||
|
Reference in New Issue
Block a user