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

[PM-7978] Create ForegroundSyncService For Delegating fullSync Calls (#9192)

* Create ForegroundSyncService For Delegating `fullSync` calls to the background

* Relax `isExternalMessage` to Allow For Typed Payload

* Null Coalesce The `startListening` Method

* Filter To Only External Messages
This commit is contained in:
Justin Baur
2024-05-15 12:11:06 -04:00
committed by GitHub
parent 426bacfd67
commit 25f55e1368
7 changed files with 422 additions and 236 deletions

View File

@@ -12,8 +12,8 @@ export const getCommand = (commandDefinition: CommandDefinition<object> | string
export const EXTERNAL_SOURCE_TAG = Symbol("externalSource");
export const isExternalMessage = (message: Message<object>) => {
return (message as Record<PropertyKey, unknown>)?.[EXTERNAL_SOURCE_TAG] === true;
export const isExternalMessage = (message: Record<PropertyKey, unknown>) => {
return message?.[EXTERNAL_SOURCE_TAG] === true;
};
export const tagAsExternal: MonoTypeOperatorFunction<Message<object>> = map(