1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

[PM-16262] Make getEnvironment observable and use it in SdkService (#12501)

* feat: re-implement getEnvironment as an observable

* feat: deprecate `getEnvironment`

* fix: use correct environment function in SdkService

* fix: test
This commit is contained in:
Andreas Coroiu
2024-12-20 15:20:23 +01:00
committed by GitHub
parent 2041799174
commit 1d335bb164
5 changed files with 35 additions and 20 deletions

View File

@@ -128,5 +128,10 @@ export abstract class EnvironmentService {
/**
* Get the environment from state. Useful if you need to get the environment for another user.
*/
abstract getEnvironment$(userId?: string): Observable<Environment | undefined>;
/**
* @deprecated Use {@link getEnvironment$} instead.
*/
abstract getEnvironment(userId?: string): Promise<Environment | undefined>;
}