@gby/destroyable 3.6.2 → 3.6.3
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/DestroyableEventEmitter.d.ts +0 -1
- package/dist/DestroyableEventEmitter.d.ts.map +1 -1
- package/package.json +1 -1
- package/doc/api/destroyable.createdestroyablesubclass.md +0 -82
- package/doc/api/destroyable.destroyable._destroyers.md +0 -13
- package/doc/api/destroyable.destroyable._isdestroyed.md +0 -11
- package/doc/api/destroyable.destroyable.canceldispose.md +0 -49
- package/doc/api/destroyable.destroyable.canceldispose_1.md +0 -49
- package/doc/api/destroyable.destroyable.canceldispose_2.md +0 -49
- package/doc/api/destroyable.destroyable.canceldisposefun.md +0 -52
- package/doc/api/destroyable.destroyable.canceldisposeobj.md +0 -52
- package/doc/api/destroyable.destroyable.destroy.md +0 -17
- package/doc/api/destroyable.destroyable.destroyasync.md +0 -21
- package/doc/api/destroyable.destroyable.destroythis.md +0 -21
- package/doc/api/destroyable.destroyable.dispose.md +0 -51
- package/doc/api/destroyable.destroyable.dispose_1.md +0 -65
- package/doc/api/destroyable.destroyable.dispose_2.md +0 -65
- package/doc/api/destroyable.destroyable.disposefun.md +0 -53
- package/doc/api/destroyable.destroyable.disposeobj.md +0 -68
- package/doc/api/destroyable.destroyable.isdestroyed.md +0 -13
- package/doc/api/destroyable.destroyable.md +0 -287
- package/doc/api/destroyable.destroyablesub.md +0 -15
- package/doc/api/destroyable.destroyablesubclass.md +0 -13
- package/doc/api/destroyable.destroydestroyable.md +0 -52
- package/doc/api/destroyable.destroyobject.md +0 -52
- package/doc/api/destroyable.fundestroyer.md +0 -13
- package/doc/api/destroyable.md +0 -225
- package/doc/api/destroyable.nodedestroyable.md +0 -39
- package/doc/api/destroyable.nodedestroyableclass.md +0 -15
- package/doc/api/destroyable.throwondestroyed.md +0 -17
- package/doc/api/destroyable.webdestroyable.md +0 -39
- package/doc/api/destroyable.webdestroyableclass.md +0 -15
- package/doc/api/index.md +0 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DestroyableEventEmitter.d.ts","sourceRoot":"","sources":["../src/DestroyableEventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"DestroyableEventEmitter.d.ts","sourceRoot":"","sources":["../src/DestroyableEventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AAEjD;;GAEG;AACH,qBAAa,uBAAuB,CAAC,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,YAAY,CAAC,EAAE,CAAE,YAAW,YAAY;IAEhH;;;;OAIG;IACH,QAAQ,SAAK;IAEb;;OAEG;IACH,IAAI,WAAW,YAEd;IACD,YAAY,UAAS;IAErB;;OAEG;IACH,IAAI,UAAU,YAEb;IAED;;OAEG;IACH,WAAW,EAAE,YAAY,EAAE,CAAM;IAEjC;;;;OAIG;IACH,UAAU,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IAK7C;;;;OAIG;IACH,gBAAgB,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IAMnD;;;;;OAKG;IACH,UAAU,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,CAAC;IAQ7D;;;;OAIG;IACH,gBAAgB,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IASnD;;;OAGG;IACH,OAAO,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IAC1C,OAAO,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC;IAClE,OAAO,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC;IAStF,aAAa,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IAChD,aAAa,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IAChD,aAAa,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC;IAgBpE;;;;OAIG;IACH,WAAW,IAAI,GAAG;IAKlB;;;;OAIG;IACH,WAAW;IA6BX;;;;;OAKG;IACH,OAAO;CAwBV"}
|
package/package.json
CHANGED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [createDestroyableSubClass](./destroyable.createdestroyablesubclass.md)
|
|
4
|
-
|
|
5
|
-
## createDestroyableSubClass() function
|
|
6
|
-
|
|
7
|
-
创建可销毁的子类
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export declare function createDestroyableSubClass<P extends new (...args: any) => Object>(ParentClass: P): {
|
|
13
|
-
new (...args: any): {
|
|
14
|
-
readonly isDestroyed: boolean;
|
|
15
|
-
_isDestroyed: boolean;
|
|
16
|
-
_destroyers: FunDestroyer[];
|
|
17
|
-
disposeFun<T extends FunDestroyer>(fun: T): T;
|
|
18
|
-
cancelDisposeFun<T extends FunDestroyer>(fun: T): T;
|
|
19
|
-
disposeObj<T extends /*elided*/ any>(obj: T, sync?: boolean): T;
|
|
20
|
-
cancelDisposeObj<T extends /*elided*/ any>(obj: T): T;
|
|
21
|
-
dispose<T extends FunDestroyer>(fun: T): T;
|
|
22
|
-
dispose<T extends /*elided*/ any>(obj: T, asyncDestroy?: boolean): T;
|
|
23
|
-
dispose<T extends /*elided*/ any | FunDestroyer>(objOrFun: T, asyncDestroy?: boolean): T;
|
|
24
|
-
cancelDispose<T extends FunDestroyer>(fun: T): T;
|
|
25
|
-
cancelDispose<T extends /*elided*/ any>(obj: T): T;
|
|
26
|
-
cancelDispose<T extends /*elided*/ any | FunDestroyer>(objOrFun: T): T;
|
|
27
|
-
destroyThis(): void;
|
|
28
|
-
destroy(): true | undefined;
|
|
29
|
-
destroyAsync(): Promise<true | undefined>;
|
|
30
|
-
constructor: Function;
|
|
31
|
-
toString(): string;
|
|
32
|
-
toLocaleString(): string;
|
|
33
|
-
valueOf(): Object;
|
|
34
|
-
hasOwnProperty(v: PropertyKey): boolean;
|
|
35
|
-
isPrototypeOf(v: Object): boolean;
|
|
36
|
-
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
37
|
-
};
|
|
38
|
-
} & P;
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Parameters
|
|
42
|
-
|
|
43
|
-
<table><thead><tr><th>
|
|
44
|
-
|
|
45
|
-
Parameter
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</th><th>
|
|
49
|
-
|
|
50
|
-
Type
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</th><th>
|
|
54
|
-
|
|
55
|
-
Description
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</th></tr></thead>
|
|
59
|
-
<tbody><tr><td>
|
|
60
|
-
|
|
61
|
-
ParentClass
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td><td>
|
|
65
|
-
|
|
66
|
-
P
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</td><td>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</td></tr>
|
|
73
|
-
</tbody></table>
|
|
74
|
-
**Returns:**
|
|
75
|
-
|
|
76
|
-
{ new (...args: any): { readonly isDestroyed: boolean; \_isDestroyed: boolean; \_destroyers: [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->\[\]; disposeFun<T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->>(fun: T): T; cancelDisposeFun<T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->>(fun: T): T; disposeObj<T extends /\*elided\*/ any>(obj: T, sync?: boolean): T; cancelDisposeObj<T extends /\*elided\*/ any>(obj: T): T; dispose<T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->>(fun: T): T; dispose<T extends /\*elided\*/ any>(obj: T, asyncDestroy?: boolean): T; dispose<T extends /\*elided\*/ any \| [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->>(objOrFun: T, asyncDestroy?: boolean): T; cancelDispose<T extends [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->>(fun: T): T; cancelDispose<T extends /\*elided\*/ any>(obj: T): T; cancelDispose<T extends /\*elided\*/ any \| [FunDestroyer](./destroyable.fundestroyer.md)<!-- -->>(objOrFun: T): T; destroyThis(): void; destroy(): true \| undefined; destroyAsync(): Promise<true \| undefined>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: PropertyKey): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: PropertyKey): boolean; }; } & P
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
## Remarks
|
|
80
|
-
|
|
81
|
-
用于根据传入的父类 动态生成可可销毁的子类
|
|
82
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [\_destroyers](./destroyable.destroyable._destroyers.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.\_destroyers property
|
|
6
|
-
|
|
7
|
-
销毁者
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
_destroyers: FunDestroyer[];
|
|
13
|
-
```
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [\_isDestroyed](./destroyable.destroyable._isdestroyed.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.\_isDestroyed property
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
_isDestroyed: boolean;
|
|
11
|
-
```
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [cancelDispose](./destroyable.destroyable.canceldispose.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.cancelDispose() method
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
cancelDispose<T extends FunDestroyer>(fun: T): T;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>
|
|
16
|
-
|
|
17
|
-
Parameter
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</th><th>
|
|
21
|
-
|
|
22
|
-
Type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</th><th>
|
|
26
|
-
|
|
27
|
-
Description
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</th></tr></thead>
|
|
31
|
-
<tbody><tr><td>
|
|
32
|
-
|
|
33
|
-
fun
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
T
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</td></tr>
|
|
45
|
-
</tbody></table>
|
|
46
|
-
**Returns:**
|
|
47
|
-
|
|
48
|
-
T
|
|
49
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [cancelDispose](./destroyable.destroyable.canceldispose_1.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.cancelDispose() method
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
cancelDispose<T extends Destroyable>(obj: T): T;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>
|
|
16
|
-
|
|
17
|
-
Parameter
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</th><th>
|
|
21
|
-
|
|
22
|
-
Type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</th><th>
|
|
26
|
-
|
|
27
|
-
Description
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</th></tr></thead>
|
|
31
|
-
<tbody><tr><td>
|
|
32
|
-
|
|
33
|
-
obj
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
T
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</td></tr>
|
|
45
|
-
</tbody></table>
|
|
46
|
-
**Returns:**
|
|
47
|
-
|
|
48
|
-
T
|
|
49
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [cancelDispose](./destroyable.destroyable.canceldispose_2.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.cancelDispose() method
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
cancelDispose<T extends Destroyable | FunDestroyer>(objOrFun: T): T;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>
|
|
16
|
-
|
|
17
|
-
Parameter
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</th><th>
|
|
21
|
-
|
|
22
|
-
Type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</th><th>
|
|
26
|
-
|
|
27
|
-
Description
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</th></tr></thead>
|
|
31
|
-
<tbody><tr><td>
|
|
32
|
-
|
|
33
|
-
objOrFun
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
T
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</td></tr>
|
|
45
|
-
</tbody></table>
|
|
46
|
-
**Returns:**
|
|
47
|
-
|
|
48
|
-
T
|
|
49
|
-
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [cancelDisposeFun](./destroyable.destroyable.canceldisposefun.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.cancelDisposeFun() method
|
|
6
|
-
|
|
7
|
-
取消销毁者函数
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
cancelDisposeFun<T extends FunDestroyer>(fun: T): T;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
fun
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
T
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</td></tr>
|
|
47
|
-
</tbody></table>
|
|
48
|
-
**Returns:**
|
|
49
|
-
|
|
50
|
-
T
|
|
51
|
-
|
|
52
|
-
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [cancelDisposeObj](./destroyable.destroyable.canceldisposeobj.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.cancelDisposeObj() method
|
|
6
|
-
|
|
7
|
-
取消销毁者函数
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
cancelDisposeObj<T extends Destroyable>(obj: T): T;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
obj
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
T
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</td></tr>
|
|
47
|
-
</tbody></table>
|
|
48
|
-
**Returns:**
|
|
49
|
-
|
|
50
|
-
T
|
|
51
|
-
|
|
52
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [destroy](./destroyable.destroyable.destroy.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.destroy() method
|
|
6
|
-
|
|
7
|
-
销毁
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
destroy(): true | undefined;
|
|
13
|
-
```
|
|
14
|
-
**Returns:**
|
|
15
|
-
|
|
16
|
-
true \| undefined
|
|
17
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [destroyAsync](./destroyable.destroyable.destroyasync.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.destroyAsync() method
|
|
6
|
-
|
|
7
|
-
异步销毁
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
destroyAsync(): Promise<true | undefined>;
|
|
13
|
-
```
|
|
14
|
-
**Returns:**
|
|
15
|
-
|
|
16
|
-
Promise<true \| undefined>
|
|
17
|
-
|
|
18
|
-
## Remarks
|
|
19
|
-
|
|
20
|
-
会依次执行销毁,并且只有上一个销毁完成之后才会执行下一个销毁
|
|
21
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [destroyThis](./destroyable.destroyable.destroythis.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.destroyThis() method
|
|
6
|
-
|
|
7
|
-
自己的销毁方法
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
destroyThis(): void;
|
|
13
|
-
```
|
|
14
|
-
**Returns:**
|
|
15
|
-
|
|
16
|
-
void
|
|
17
|
-
|
|
18
|
-
## Remarks
|
|
19
|
-
|
|
20
|
-
子类根据需要进行重载
|
|
21
|
-
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [dispose](./destroyable.destroyable.dispose.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.dispose() method
|
|
6
|
-
|
|
7
|
-
添加销毁函数或销毁对象
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
dispose<T extends FunDestroyer>(fun: T): T;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
fun
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
T
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</td></tr>
|
|
47
|
-
</tbody></table>
|
|
48
|
-
**Returns:**
|
|
49
|
-
|
|
50
|
-
T
|
|
51
|
-
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [dispose](./destroyable.destroyable.dispose_1.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.dispose() method
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
dispose<T extends Destroyable>(obj: T, asyncDestroy?: boolean): T;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>
|
|
16
|
-
|
|
17
|
-
Parameter
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</th><th>
|
|
21
|
-
|
|
22
|
-
Type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</th><th>
|
|
26
|
-
|
|
27
|
-
Description
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</th></tr></thead>
|
|
31
|
-
<tbody><tr><td>
|
|
32
|
-
|
|
33
|
-
obj
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
T
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</td></tr>
|
|
45
|
-
<tr><td>
|
|
46
|
-
|
|
47
|
-
asyncDestroy
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</td><td>
|
|
51
|
-
|
|
52
|
-
boolean
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</td><td>
|
|
56
|
-
|
|
57
|
-
_(Optional)_
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</td></tr>
|
|
61
|
-
</tbody></table>
|
|
62
|
-
**Returns:**
|
|
63
|
-
|
|
64
|
-
T
|
|
65
|
-
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [dispose](./destroyable.destroyable.dispose_2.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.dispose() method
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
dispose<T extends Destroyable | FunDestroyer>(objOrFun: T, asyncDestroy?: boolean): T;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>
|
|
16
|
-
|
|
17
|
-
Parameter
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</th><th>
|
|
21
|
-
|
|
22
|
-
Type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</th><th>
|
|
26
|
-
|
|
27
|
-
Description
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</th></tr></thead>
|
|
31
|
-
<tbody><tr><td>
|
|
32
|
-
|
|
33
|
-
objOrFun
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
T
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</td></tr>
|
|
45
|
-
<tr><td>
|
|
46
|
-
|
|
47
|
-
asyncDestroy
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</td><td>
|
|
51
|
-
|
|
52
|
-
boolean
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</td><td>
|
|
56
|
-
|
|
57
|
-
_(Optional)_
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</td></tr>
|
|
61
|
-
</tbody></table>
|
|
62
|
-
**Returns:**
|
|
63
|
-
|
|
64
|
-
T
|
|
65
|
-
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@gby/destroyable](./destroyable.md) > [Destroyable](./destroyable.destroyable.md) > [disposeFun](./destroyable.destroyable.disposefun.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.disposeFun() method
|
|
6
|
-
|
|
7
|
-
添加销毁者
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
disposeFun<T extends FunDestroyer>(fun: T): T;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
fun
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
T
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</td></tr>
|
|
47
|
-
</tbody></table>
|
|
48
|
-
**Returns:**
|
|
49
|
-
|
|
50
|
-
T
|
|
51
|
-
|
|
52
|
-
返回销毁者的顺序
|
|
53
|
-
|