@gby/destroyable 3.6.2 → 3.7.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/DestroyableEventEmitter.d.ts +0 -1
- package/dist/DestroyableEventEmitter.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +381 -15
- package/package.json +1 -6
- package/dist/DestroyableEventTarget-CIMBV0bD.js +0 -377
- package/dist/DestroyableEventTarget-uZtYhcb1.cjs +0 -1
- package/dist/index-web.cjs +0 -1
- package/dist/index-web.js +0 -9
- 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,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
|
-
|
|
@@ -1,68 +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) > [disposeObj](./destroyable.destroyable.disposeobj.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.disposeObj() method
|
|
6
|
-
|
|
7
|
-
添加销毁对象
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
disposeObj<T extends Destroyable>(obj: T, sync?: boolean): 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
|
-
<tr><td>
|
|
48
|
-
|
|
49
|
-
sync
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</td><td>
|
|
53
|
-
|
|
54
|
-
boolean
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</td><td>
|
|
58
|
-
|
|
59
|
-
_(Optional)_ 表示是否使用 `obj.destroy()` 方法进行销毁;默认使用 `obj.destroyAsync()` 方法进行销毁
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</td></tr>
|
|
63
|
-
</tbody></table>
|
|
64
|
-
**Returns:**
|
|
65
|
-
|
|
66
|
-
T
|
|
67
|
-
|
|
68
|
-
|
|
@@ -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) > [isDestroyed](./destroyable.destroyable.isdestroyed.md)
|
|
4
|
-
|
|
5
|
-
## Destroyable.isDestroyed property
|
|
6
|
-
|
|
7
|
-
是否已经销毁
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
get isDestroyed(): boolean;
|
|
13
|
-
```
|