mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
22 lines
546 B
TypeScript
22 lines
546 B
TypeScript
// Type definitions for es6-weak-map 1.2
|
|
// Project: https://github.com/medikoo/es6-weak-map
|
|
// Definitions by: Pine Mizune <https://github.com/pine>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export = WeakMap;
|
|
export as namespace WeakMap;
|
|
|
|
interface Iterable<T> {
|
|
[Symbol.iterator](): Iterator<T>;
|
|
}
|
|
|
|
declare class WeakMap<K, V> {
|
|
constructor();
|
|
constructor(iterable: Iterable<[K, V]>);
|
|
|
|
delete(key: K): boolean;
|
|
get(key: K): V;
|
|
has(key: K): boolean;
|
|
set(key: K, value?: V): WeakMap<K, V>;
|
|
}
|