mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
Remove memory storage cache from derived state. Use observable cache and port messaging (#8939)
This commit is contained in:
@@ -16,9 +16,11 @@ export class ObservableTracker<T> {
|
||||
/**
|
||||
* Awaits the next emission from the observable, or throws if the timeout is exceeded
|
||||
* @param msTimeout The maximum time to wait for another emission before throwing
|
||||
* @returns The next emission from the observable
|
||||
* @throws If the timeout is exceeded
|
||||
*/
|
||||
async expectEmission(msTimeout = 50) {
|
||||
await firstValueFrom(
|
||||
async expectEmission(msTimeout = 50): Promise<T> {
|
||||
return await firstValueFrom(
|
||||
this.observable.pipe(
|
||||
timeout({
|
||||
first: msTimeout,
|
||||
|
||||
Reference in New Issue
Block a user