Skip to content

Commit 35e882e

Browse files
committed
feat: add constructors without type arguments.
As the constructed objects have an any type, the resulting containers are assignable to any type: var x: Map<string, number> = new Map(); That is useful to avoid having to specify types twice when declaration and assignment are in different places.
1 parent 58b38c9 commit 35e882e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/angular2/traceur-runtime.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ interface Map<K, V> {
4545
size: number;
4646
}
4747
declare var Map: {
48+
new (): Map<any, any>;
4849
new<K, V>(): Map<K, V>;
4950
// alexeagle: PATCHED
5051
new<K, V>(m: Map<K, V>): Map<K, V>;
@@ -61,6 +62,7 @@ interface Set<T> {
6162
size: number;
6263
}
6364
declare var Set: {
65+
new (): Set<any>;
6466
new<T>(): Set<T>;
6567
// alexeagle PATCHED
6668
new<T>(s: Set<T>): Set<T>;

0 commit comments

Comments
 (0)