@gby/destroyable 1.0.0 → 1.0.1

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.
@@ -18,9 +18,8 @@ import { FunDestroyer as FunDestroyer_2 } from './Destroyable';
18
18
  * @param ParentClass
19
19
  * @returns
20
20
  */
21
- export declare function createDestroyableSubClass<P extends new (...args: any) => any>(ParentClass: P): {
21
+ export declare function createDestroyableSubClass<P extends new (...args: any) => unknown>(ParentClass: P): {
22
22
  new (...args: any): {
23
- [x: string]: any;
24
23
  /**
25
24
  * 是否已经销毁
26
25
  */
@@ -184,7 +183,6 @@ export declare type FunDestroyer = () => void;
184
183
  */
185
184
  export declare const NodeDestroyable: {
186
185
  new (...args: any): {
187
- [x: string]: any;
188
186
  readonly isDestroyed: boolean;
189
187
  _isDestroyed: boolean;
190
188
  _destroyers: FunDestroyer_2[];
@@ -224,7 +222,6 @@ export declare function throwOnDestroyed(): void;
224
222
  */
225
223
  export declare const WebDestroyable: {
226
224
  new (...args: any): {
227
- [x: string]: any;
228
225
  readonly isDestroyed: boolean;
229
226
  _isDestroyed: boolean;
230
227
  _destroyers: FunDestroyer_2[];
@@ -5,7 +5,6 @@ import { EventEmitter } from "node:events";
5
5
  */
6
6
  export declare const WebDestroyable: {
7
7
  new (...args: any): {
8
- [x: string]: any;
9
8
  readonly isDestroyed: boolean;
10
9
  _isDestroyed: boolean;
11
10
  _destroyers: import("./Destroyable").FunDestroyer[];
@@ -37,7 +36,6 @@ export type WebDestroyable = InstanceType<WebDestroyableClass>;
37
36
  */
38
37
  export declare const NodeDestroyable: {
39
38
  new (...args: any): {
40
- [x: string]: any;
41
39
  readonly isDestroyed: boolean;
42
40
  _isDestroyed: boolean;
43
41
  _destroyers: import("./Destroyable").FunDestroyer[];
@@ -1 +1 @@
1
- {"version":3,"file":"DestroyableSub.d.ts","sourceRoot":"","sources":["../src/DestroyableSub.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;mBAAsC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,cAAc,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;uBAA0C,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,eAAe,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"DestroyableSub.d.ts","sourceRoot":"","sources":["../src/DestroyableSub.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;mBAAsC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,cAAc,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;uBAA0C,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,eAAe,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC"}
@@ -6,9 +6,8 @@ import type { FunDestroyer } from "./Destroyable";
6
6
  * @param ParentClass
7
7
  * @returns
8
8
  */
9
- export declare function createDestroyableSubClass<P extends new (...args: any) => any>(ParentClass: P): {
9
+ export declare function createDestroyableSubClass<P extends new (...args: any) => unknown>(ParentClass: P): {
10
10
  new (...args: any): {
11
- [x: string]: any;
12
11
  /**
13
12
  * 是否已经销毁
14
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"createDestroyableSubClass.d.ts","sourceRoot":"","sources":["../src/createDestroyableSubClass.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,EAAE,WAAW,EAAE,CAAC;kBAA3B,GAAG;;QAM7D;;WAEG;;;QAMH;;WAEG;qBACU,YAAY,EAAE;QAE3B;;;;WAIG;mBACQ,CAAC,SAAS,YAAY,OAAO,CAAC,GAAG,CAAC;QAK7C;;;;WAIG;yBACc,CAAC,SAAS,YAAY,OAAO,CAAC,GAAG,CAAC;QAMnD;;;;;WAKG;mBACQ,CAAC,8BAA8B,CAAC,SAAS,OAAO,GAAG,CAAC;QAQ/D;;;;WAIG;yBACc,CAAC,8BAA8B,CAAC,GAAG,CAAC;QASrD;;;WAGG;gBACK,CAAC,SAAS,YAAY,OAAO,CAAC,GAAG,CAAC;gBAClC,CAAC,8BAA8B,CAAC,iBAAiB,OAAO,GAAG,CAAC;gBAC5D,CAAC,SAAS,iBAAiB,YAAY,YAAY,CAAC,iBAAiB,OAAO,GAAG,CAAC;sBAS1E,CAAC,SAAS,YAAY,OAAO,CAAC,GAAG,CAAC;sBAClC,CAAC,8BAA8B,CAAC,GAAG,CAAC;sBACpC,CAAC,SAAS,iBAAiB,YAAY,YAAY,CAAC,GAAG,CAAC;QActE;;;;WAIG;;QAMH;;WAEG;;QAkBH;;;;WAIG;;;MA+CV;AAMD;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,WAAW,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,UAAU,CA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AW,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,UAAU,CAAC,OAAO,yBAAyB,CAAC,WAAW,CAAC,CAAC,CAAC;AAE3I;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,WAAW,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,YAAY,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC"}
@@ -9,9 +9,8 @@
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- export declare function createDestroyableSubClass<P extends new (...args: any) => any>(ParentClass: P): {
12
+ export declare function createDestroyableSubClass<P extends new (...args: any) => unknown>(ParentClass: P): {
13
13
  new (...args: any): {
14
- [x: string]: any;
15
14
  readonly isDestroyed: boolean;
16
15
  _isDestroyed: boolean;
17
16
  _destroyers: FunDestroyer[];
@@ -67,7 +66,7 @@ P
67
66
  </tbody></table>
68
67
  **Returns:**
69
68
 
70
- { new (...args: any): { \[x: string\]: any; readonly isDestroyed: boolean; \_isDestroyed: boolean; \_destroyers: [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->\[\]; disposeFun&lt;T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(fun: T): T; cancelDisposeFun&lt;T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(fun: T): T; disposeObj&lt;T extends /\*elided\*/ any&gt;(obj: T, sync?: boolean): T; cancelDisposeObj&lt;T extends /\*elided\*/ any&gt;(obj: T): T; dispose&lt;T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(fun: T): T; dispose&lt;T extends /\*elided\*/ any&gt;(obj: T, asyncDestroy?: boolean): T; dispose&lt;T extends /\*elided\*/ any \| [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(objOrFun: T, asyncDestroy?: boolean): T; cancelDispose&lt;T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(fun: T): T; cancelDispose&lt;T extends /\*elided\*/ any&gt;(obj: T): T; cancelDispose&lt;T extends /\*elided\*/ any \| [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(objOrFun: T): T; destroyThis(): void; destroy(): true \| undefined; destroyAsync(): Promise&lt;true \| undefined&gt;; }; } &amp; P
69
+ { new (...args: any): { readonly isDestroyed: boolean; \_isDestroyed: boolean; \_destroyers: [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->\[\]; disposeFun&lt;T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(fun: T): T; cancelDisposeFun&lt;T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(fun: T): T; disposeObj&lt;T extends /\*elided\*/ any&gt;(obj: T, sync?: boolean): T; cancelDisposeObj&lt;T extends /\*elided\*/ any&gt;(obj: T): T; dispose&lt;T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(fun: T): T; dispose&lt;T extends /\*elided\*/ any&gt;(obj: T, asyncDestroy?: boolean): T; dispose&lt;T extends /\*elided\*/ any \| [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(objOrFun: T, asyncDestroy?: boolean): T; cancelDispose&lt;T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(fun: T): T; cancelDispose&lt;T extends /\*elided\*/ any&gt;(obj: T): T; cancelDispose&lt;T extends /\*elided\*/ any \| [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->&gt;(objOrFun: T): T; destroyThis(): void; destroy(): true \| undefined; destroyAsync(): Promise&lt;true \| undefined&gt;; }; } &amp; P
71
70
 
72
71
 
73
72
  ## Remarks
@@ -11,7 +11,6 @@ NodeDestroyable 类对象
11
11
  ```typescript
12
12
  NodeDestroyable: {
13
13
  new (...args: any): {
14
- [x: string]: any;
15
14
  readonly isDestroyed: boolean;
16
15
  _isDestroyed: boolean;
17
16
  _destroyers: import("./Destroyable").FunDestroyer[];
@@ -11,7 +11,6 @@ WebDestroyable 类对象
11
11
  ```typescript
12
12
  WebDestroyable: {
13
13
  new (...args: any): {
14
- [x: string]: any;
15
14
  readonly isDestroyed: boolean;
16
15
  _isDestroyed: boolean;
17
16
  _destroyers: import("./Destroyable").FunDestroyer[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gby/destroyable",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "@gby/destroyable 提供了用于构建可销毁对象的类的基类,用于使得地管理可销毁对象的生命周期",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",