Start consolidating shared types in the monorepo (#34062)
* Start consolidating shared types in the monorepo * Iterate * Simplify api-extractor * Iterate * Fix lockfile
This commit is contained in:
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { type Config as BaseConfig } from "@element-hq/element-web-module-api";
|
||||
import { type Config } from "@element-hq/element-web-module-api";
|
||||
|
||||
import { test as base } from "./fixtures/index.js";
|
||||
import { routeConfigJson } from "./utils/config_json.js";
|
||||
@@ -22,27 +22,11 @@ export { populateLocalStorageWithCredentials } from "./fixtures/user.js";
|
||||
// See https://playwright.dev/docs/service-workers-experimental#how-to-enable
|
||||
process.env["PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS"] = "1";
|
||||
|
||||
// We extend the Module API Config interface so that all modules
|
||||
// which use declaration merging will have their config types correctly applied.
|
||||
export interface Config extends BaseConfig {
|
||||
default_server_config: {
|
||||
"m.homeserver"?: {
|
||||
base_url: string;
|
||||
server_name?: string;
|
||||
};
|
||||
"m.identity_server"?: {
|
||||
base_url: string;
|
||||
server_name?: string;
|
||||
};
|
||||
};
|
||||
enable_presence_by_hs_url?: Record<string, boolean>;
|
||||
setting_defaults: Record<string, unknown>;
|
||||
map_style_url?: string;
|
||||
features: Record<string, boolean>;
|
||||
modules?: string[];
|
||||
}
|
||||
export type { Config };
|
||||
|
||||
// This is deliberately quite a minimal config.json, so that we can test that the default settings actually work.
|
||||
// We use the Module API Config interface so that all modules
|
||||
// which use declaration merging will have their config types correctly applied.
|
||||
export const CONFIG_JSON: Partial<Config> = {
|
||||
default_server_config: {},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user