Separate WeakMap to its own d.ts file.

Exclude in es6-shim compiles (Angular) to avoid name clashes.
This commit is contained in:
Hristo Deshev
2015-10-07 11:33:49 +03:00
parent 68a78a24d4
commit 14494fc0ba
2 changed files with 13 additions and 12 deletions

12
declarations.d.ts vendored
View File

@@ -98,18 +98,6 @@ interface Console {
dir(obj: any): void;
}
interface WeakMap<K, V> {
clear(): void;
delete(key: K): boolean;
get(key: K): V;
has(key: K): boolean;
set(key: K, value: V): WeakMap<K, V>;
}
declare var WeakMap: {
new <K, V>(): WeakMap<K, V>;
}
declare var console: Console;
declare var global;
declare var require;

13
weakmap.d.ts vendored Normal file
View File

@@ -0,0 +1,13 @@
/* tslint:disable:no-unused-variable */
interface WeakMap<K, V> {
clear(): void;
delete(key: K): boolean;
get(key: K): V;
has(key: K): boolean;
set(key: K, value: V): WeakMap<K, V>;
}
declare var WeakMap: {
new <K, V>(): WeakMap<K, V>;
}