Apply strictNullChecks to src/components/views/spaces/* (#10517)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Weimann 2023-06-28 16:39:19 +02:00 committed by GitHub
parent 209f5bdf33
commit c0db739d81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 161 additions and 20 deletions

View file

@ -46,6 +46,7 @@ import { FontWatcher } from "./watchers/FontWatcher";
import RustCryptoSdkController from "./controllers/RustCryptoSdkController";
import ServerSupportUnstableFeatureController from "./controllers/ServerSupportUnstableFeatureController";
import { WatchManager } from "./WatchManager";
import { CustomTheme } from "../theme";
export const defaultWatchManager = new WatchManager();
@ -111,7 +112,15 @@ export const labGroupNames: Record<LabGroup, string> = {
[LabGroup.Developer]: _td("Developer"),
};
export type SettingValueType = boolean | number | string | number[] | string[] | Record<string, unknown> | null;
export type SettingValueType =
| boolean
| number
| string
| number[]
| string[]
| Record<string, unknown>
| Record<string, unknown>[]
| null;
export interface IBaseSetting<T extends SettingValueType = SettingValueType> {
isFeature?: false | undefined;
@ -653,7 +662,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
},
"custom_themes": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
default: [],
default: [] as CustomTheme[],
},
"use_system_theme": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,