sample-xmonitor-js 0.0.3 → 0.0.4
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/lib/DefaultMonitor.js +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +5 -0
- package/package.json +1 -1
package/lib/DefaultMonitor.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export default class MonitorFactory {
|
|
|
3
3
|
/**
|
|
4
4
|
* 监控
|
|
5
5
|
*/
|
|
6
|
-
static INSTANCE
|
|
6
|
+
static INSTANCE?: MonitorFactory;
|
|
7
7
|
private readonly monitorMap;
|
|
8
8
|
private readonly pointer;
|
|
9
9
|
private readonly eventPool;
|
|
@@ -33,6 +33,7 @@ export default class MonitorFactory {
|
|
|
33
33
|
*/
|
|
34
34
|
stop(): Promise<void>;
|
|
35
35
|
}
|
|
36
|
+
export declare function reset(): void;
|
|
36
37
|
/**
|
|
37
38
|
* 初始化监控
|
|
38
39
|
*/
|
package/lib/index.js
CHANGED
|
@@ -99,6 +99,11 @@ export default class MonitorFactory {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
export function reset() {
|
|
103
|
+
var _a;
|
|
104
|
+
(_a = MonitorFactory.INSTANCE) === null || _a === void 0 ? void 0 : _a.stop();
|
|
105
|
+
MonitorFactory.INSTANCE = undefined;
|
|
106
|
+
}
|
|
102
107
|
/**
|
|
103
108
|
* 初始化监控
|
|
104
109
|
*/
|