mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
20 lines
647 B
TypeScript
20 lines
647 B
TypeScript
import { LogService } from "@bitwarden/logging";
|
|
import { GlobalState, KeyDefinition } from "@bitwarden/state";
|
|
import { AbstractStorageService, ObservableStorageService } from "@bitwarden/storage-core";
|
|
|
|
import { StateBase } from "./state-base";
|
|
import { globalKeyBuilder } from "./util";
|
|
|
|
export class DefaultGlobalState<T>
|
|
extends StateBase<T, KeyDefinition<T>>
|
|
implements GlobalState<T>
|
|
{
|
|
constructor(
|
|
keyDefinition: KeyDefinition<T>,
|
|
chosenLocation: AbstractStorageService & ObservableStorageService,
|
|
logService: LogService,
|
|
) {
|
|
super(globalKeyBuilder(keyDefinition), chosenLocation, keyDefinition, logService);
|
|
}
|
|
}
|