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

@@ -0,0 +1,24 @@
import { InternalFeature } from './InternalFeature'
import { InternalFeatureServiceInterface } from './InternalFeatureServiceInterface'
let sharedInstance: InternalFeatureServiceInterface | undefined
export class InternalFeatureService implements InternalFeatureServiceInterface {
static get(): InternalFeatureServiceInterface {
if (!sharedInstance) {
sharedInstance = new InternalFeatureService()
}
return sharedInstance
}
private readonly enabledFeatures: Set<InternalFeature> = new Set()
isFeatureEnabled(feature: InternalFeature): boolean {
return this.enabledFeatures.has(feature)
}
enableFeature(feature: InternalFeature): void {
console.warn(`Enabling internal feature: ${feature}`)
this.enabledFeatures.add(feature)
}
}