@vope/utils 1.4.16 → 1.4.17
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/cjs/index.js +4 -1
- package/lib/memory/basic.js +4 -1
- package/package.json +1 -1
- package/types/index.d.ts +1 -1
- package/types/subscriber.d.ts +2 -1
package/cjs/index.js
CHANGED
|
@@ -423,7 +423,10 @@ var MemoryBasic = class {
|
|
|
423
423
|
return this;
|
|
424
424
|
const local = hash8strings(this.#reflex(memorys.get(type)));
|
|
425
425
|
const Memory = this.constructor;
|
|
426
|
-
const imitator = new Memory(this.key
|
|
426
|
+
const imitator = new Memory(this.key, {
|
|
427
|
+
mount: this.#mount,
|
|
428
|
+
reflex: this.#reflex
|
|
429
|
+
});
|
|
427
430
|
list.forEach((data, index) => {
|
|
428
431
|
index in local || imitator.push(data);
|
|
429
432
|
});
|
package/lib/memory/basic.js
CHANGED
|
@@ -117,7 +117,10 @@ class MemoryBasic {
|
|
|
117
117
|
return this;
|
|
118
118
|
const local = hash8strings(this.#reflex(memorys.get(type)));
|
|
119
119
|
const Memory2 = this.constructor;
|
|
120
|
-
const imitator = new Memory2(this.key
|
|
120
|
+
const imitator = new Memory2(this.key, {
|
|
121
|
+
mount: this.#mount,
|
|
122
|
+
reflex: this.#reflex
|
|
123
|
+
});
|
|
121
124
|
list.forEach((data, index) => {
|
|
122
125
|
index in local || imitator.push(data);
|
|
123
126
|
});
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { deconPowersSum } from './power/decon';
|
|
|
22
22
|
export { rotateAngle } from './rotate/angle';
|
|
23
23
|
export { rotateRad } from './rotate/rad';
|
|
24
24
|
export { type CSSProperties, type StyleValue, css } from './style/css';
|
|
25
|
-
export { default as Subscriber } from './subscriber';
|
|
25
|
+
export { type SModel, default as Subscriber } from './subscriber';
|
|
26
26
|
export { FlexTable } from './table/flex';
|
|
27
27
|
export { Union } from './union';
|
|
28
28
|
export { joinPaths } from './url/join';
|
package/types/subscriber.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export type SModel = Record<keyof any, (...args: any[]) => void>;
|
|
1
2
|
/**
|
|
2
3
|
* 订阅
|
|
3
4
|
*/
|
|
4
|
-
export default class Subscriber<T extends
|
|
5
|
+
export default class Subscriber<T extends SModel> {
|
|
5
6
|
#private;
|
|
6
7
|
$on<K extends keyof T>(name: K, listener: T[K]): this;
|
|
7
8
|
$once<K extends keyof T>(name: K, listener: T[K]): this;
|