internal: incomplete vault systems behind feature flag (#2340)

This commit is contained in:
Mo
2023-06-30 09:01:56 -05:00
committed by GitHub
parent d16e401bb9
commit b032eb9c9b
638 changed files with 20321 additions and 4813 deletions

View File

@@ -8,13 +8,15 @@ import { ApplicationStage } from '../Application/ApplicationStage'
import { InternalEventPublishStrategy } from '../Internal/InternalEventPublishStrategy'
import { DiagnosticInfo } from '../Diagnostics/ServiceDiagnostics'
export abstract class AbstractService<EventName = string, EventData = undefined>
export abstract class AbstractService<EventName = string, EventData = unknown>
implements ServiceInterface<EventName, EventData>
{
private eventObservers: EventObserver<EventName, EventData>[] = []
public loggingEnabled = false
private criticalPromises: Promise<unknown>[] = []
protected eventDisposers: (() => void)[] = []
constructor(protected internalEventBus: InternalEventBusInterface) {}
public addEventObserver(observer: EventObserver<EventName, EventData>): () => void {
@@ -71,6 +73,11 @@ export abstract class AbstractService<EventName = string, EventData = undefined>
this.eventObservers.length = 0
;(this.internalEventBus as unknown) = undefined
;(this.criticalPromises as unknown) = undefined
for (const disposer of this.eventDisposers) {
disposer()
}
this.eventDisposers = []
}
/**