1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00
Files
browser/libs/common/src/platform/state/global-state.provider.ts
Nick Krantz a42006763d [PM-9455] FireFox back handling (#10867)
* Refactor `POPUP_VIEW_MEMORY` to use `disk` rather than memory for the browser extension.

- When FireFox opens the popup in an standalone window memory is lost, thus causing the `popup-route-history` to be lost and back navigation ceases to work

* spelling

* revert state definition change

* add `onUpdated` event for firefox

* rework observable handling

* remove unneeded `from`
2024-09-17 08:42:57 -05:00

14 lines
478 B
TypeScript

import { GlobalState } from "./global-state";
import { KeyDefinition } from "./key-definition";
/**
* A provider for getting an implementation of global state scoped to the given key.
*/
export abstract class GlobalStateProvider {
/**
* Gets a {@link GlobalState} scoped to the given {@link KeyDefinition}
* @param keyDefinition - The {@link KeyDefinition} for which you want the state for.
*/
abstract get<T>(keyDefinition: KeyDefinition<T>): GlobalState<T>;
}