-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWeakStrongSet.d.mts
43 lines (43 loc) · 1.61 KB
/
WeakStrongSet.d.mts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
declare class WeakStrongSet<__SK0__ extends object, __SK1__> {
#private;
constructor(iterable?: [__SK0__, __SK1__][]);
/**
* Add a key set to this collection.
*
* @param {object} weakKey The weakly held key.
* @param {*} strongKey The strongly held key.
* @returns {WeakStrongSet} This collection.
* @public
*/
add(weakKey: __SK0__, strongKey: __SK1__): this;
/**
* Delete an element from the collection by the given key sequence.
*
* @param {object} weakKey The weakly held key.
* @param {*} strongKey The strongly held key.
* @returns {boolean} True if we found the value and deleted it.
* @public
*/
delete(weakKey: __SK0__, strongKey: __SK1__): boolean;
/**
* Report if the collection has a value for a key set.
*
* @param {object} weakKey The weakly held key.
* @param {*} strongKey The strongly held key.
* @returns {boolean} True if the key set refers to a value in the collection.
* @public
*/
has(weakKey: __SK0__, strongKey: __SK1__): boolean;
/**
* Determine if a set of keys is valid.
*
* @param {object} weakKey The weakly held key.
* @param {*} strongKey The strongly held key.
* @returns {boolean} True if the validation passes, false if it doesn't.
* @public
*/
isValidKey(weakKey: __SK0__, strongKey: __SK1__): boolean;
[Symbol.toStringTag]: string;
}
export declare type ReadonlyWeakStrongSet<__SK0__ extends object, __SK1__> = Pick<WeakStrongSet<__SK0__, __SK1__>, "has" | "isValidKey">;
export default WeakStrongSet;