Introduce a Module API to get application settings. (#34278)

* Add a module API to get application settings.

* fix test
This commit is contained in:
Will Hunt
2026-07-15 19:20:21 +00:00
committed by GitHub
parent 8e0ed84eac
commit cc76070639
9 changed files with 132 additions and 0 deletions
@@ -61,6 +61,8 @@ export interface Api extends LegacyModuleApiExtension, LegacyCustomisationsApiEx
readonly i18n: I18nApi;
readonly navigation: NavigationApi;
readonly rootNode: HTMLElement;
// @alpha
readonly settings: SettingsApi;
readonly stores: StoresApi;
// @alpha
readonly widget: WidgetApi;
@@ -478,6 +480,11 @@ export interface RoomViewProps {
// @alpha @deprecated (undocumented)
export type RuntimeModuleConstructor = new (api: ModuleApi) => RuntimeModule;
// @alpha
export interface SettingsApi {
getValue<T = any>(settingName: string, roomId?: string | null, excludeDefault?: boolean): T | undefined;
}
// @alpha
export interface SpacePanelItemProps {
className?: string;