This commit is contained in:
2026-11-24 16:17:45 +08:00
parent a3dbdd7d11
commit ea56e4cabd
140 changed files with 1214 additions and 702 deletions
@@ -1,33 +0,0 @@
export class StateRegistry<V> {
constructor(excuteCallback: (registry: Map<string, V | null>) => boolean) {
this._excuteCallback = excuteCallback;
}
_excuteCallback: (registry: Map<string, V | null>) => boolean;
_registryMap = new Map<string, V | null>();
insertKey = (key: string) => {
this._registryMap.set(key, null);
};
updateValue = (key: string, value: V) => {
this._registryMap.set(key, value);
};
deleteEntry = (key: string) => {
this._registryMap.delete(key);
};
execute = () => {
return this._excuteCallback(this._registryMap);
};
checkAllReady = () => {
for (const i of this._registryMap.values()) {
i == null;
return false;
}
return true;
};
}