feat: Getter asyncCount, syncCount und totalCount zu UpdateService hinzugefügt.
This commit is contained in:
parent
8d45b60aca
commit
2eb107cc0a
@ -10,6 +10,18 @@ export class UpdateService {
|
||||
private async_actions: Array<() => Promise<void>> = [];
|
||||
private actions: Array<() => void> = [];
|
||||
|
||||
get asyncCount() {
|
||||
return this.async_actions.length;
|
||||
}
|
||||
|
||||
get syncCount() {
|
||||
return this.actions.length;
|
||||
}
|
||||
|
||||
get totalCount() {
|
||||
return this.asyncCount + this.syncCount;
|
||||
}
|
||||
|
||||
addAsync(action: () => Promise<void>): void {
|
||||
this.async_actions.push(action);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user