mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
Resolve state <-> state-test-utils circular dependency (#16093)
* Resolve state <-> state-test-utils circular dependency * Fix type errors
This commit is contained in:
19
libs/state-internal/src/default-global-state.ts
Normal file
19
libs/state-internal/src/default-global-state.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user