@lwc/engine-core 9.0.2 → 9.0.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/framework/weak-multimap.d.ts +4 -16
- package/dist/index.cjs +8823 -0
- package/dist/index.js +24 -42
- package/package.json +5 -4
|
@@ -3,21 +3,11 @@
|
|
|
3
3
|
* The goal is to avoid leaking the values, which is what would happen with a WeakMap<K, Set<V>>.
|
|
4
4
|
*
|
|
5
5
|
* Note that this is currently only intended to be used in dev/PRODDEBUG environments.
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* This implementation relies on WeakRefs and FinalizationRegistry.
|
|
8
|
+
* For some background, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef
|
|
7
9
|
*/
|
|
8
|
-
export
|
|
9
|
-
get(key: T): ReadonlySet<V>;
|
|
10
|
-
add(key: T, vm: V): void;
|
|
11
|
-
delete(key: T): void;
|
|
12
|
-
}
|
|
13
|
-
declare class LegacyWeakMultiMap<K extends object, V extends object> implements WeakMultiMap<K, V> {
|
|
14
|
-
private _map;
|
|
15
|
-
private _getValues;
|
|
16
|
-
get(key: K): ReadonlySet<V>;
|
|
17
|
-
add(key: K, vm: V): void;
|
|
18
|
-
delete(key: K): void;
|
|
19
|
-
}
|
|
20
|
-
declare class ModernWeakMultiMap<K extends object, V extends object> implements WeakMultiMap<K, V> {
|
|
10
|
+
export declare class WeakMultiMap<K extends object, V extends object> {
|
|
21
11
|
private _map;
|
|
22
12
|
private _registry;
|
|
23
13
|
private _getWeakRefs;
|
|
@@ -25,6 +15,4 @@ declare class ModernWeakMultiMap<K extends object, V extends object> implements
|
|
|
25
15
|
add(key: K, value: V): void;
|
|
26
16
|
delete(key: K): void;
|
|
27
17
|
}
|
|
28
|
-
export declare const WeakMultiMap: typeof LegacyWeakMultiMap | typeof ModernWeakMultiMap;
|
|
29
|
-
export {};
|
|
30
18
|
//# sourceMappingURL=weak-multimap.d.ts.map
|