mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
[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.
This commit is contained in:
@@ -7,13 +7,13 @@ export abstract class ThemeStateService {
|
||||
/**
|
||||
* The users selected theme.
|
||||
*/
|
||||
selectedTheme$: Observable<ThemeType>;
|
||||
abstract selectedTheme$: Observable<ThemeType>;
|
||||
|
||||
/**
|
||||
* A method for updating the current users configured theme.
|
||||
* @param theme The chosen user theme.
|
||||
*/
|
||||
setSelectedTheme: (theme: ThemeType) => Promise<void>;
|
||||
abstract setSelectedTheme(theme: ThemeType): Promise<void>;
|
||||
}
|
||||
|
||||
const THEME_SELECTION = new KeyDefinition<ThemeType>(THEMING_DISK, "selection", {
|
||||
|
||||
Reference in New Issue
Block a user