1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00
Files
browser/libs/common/src/platform/abstractions/broadcaster.service.ts
Oscar Hinton 2edc156dd6 [STRICT TS] Migrate platform abstract services functions (#8527)
We currently use a callback syntax for abstract services. This syntax isn't completely strict compliant and will fail the strictPropertyInitialization check. We also currently don't get any compile time errors if we forget to implement a function.

To that end this PR updates all platform owned services to use the appropriate abstract keyword for non implemented functions. I also updated the fields to be actual functions and not properties.
2024-03-28 12:01:09 +01:00

22 lines
625 B
TypeScript

export interface MessageBase {
command: string;
}
/**
* @deprecated Use the observable from the appropriate service instead.
*/
export abstract class BroadcasterService {
/**
* @deprecated Use the observable from the appropriate service instead.
*/
abstract send(message: MessageBase, id?: string): void;
/**
* @deprecated Use the observable from the appropriate service instead.
*/
abstract subscribe(id: string, messageCallback: (message: MessageBase) => void): void;
/**
* @deprecated Use the observable from the appropriate service instead.
*/
abstract unsubscribe(id: string): void;
}