1 | // Type definitions for es6-weak-map 1.2
|
2 | // Project: https://github.com/medikoo/es6-weak-map
|
3 | // Definitions by: Pine Mizune <https://github.com/pine>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 |
|
6 | export = WeakMap;
|
7 | export as namespace WeakMap;
|
8 |
|
9 | interface Iterable<T> {
|
10 | [Symbol.iterator](): Iterator<T>;
|
11 | }
|
12 |
|
13 | declare class WeakMap<K, V> {
|
14 | constructor();
|
15 | constructor(iterable: Iterable<[K, V]>);
|
16 |
|
17 | delete(key: K): boolean;
|
18 | get(key: K): V;
|
19 | has(key: K): boolean;
|
20 | set(key: K, value?: V): WeakMap<K, V>;
|
21 | }
|