mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 19:56:45 +02:00
Iterate
This commit is contained in:
parent
0e8315493e
commit
35b33ac893
@ -18,22 +18,28 @@
|
||||
"lint:ts": "tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@matrix-org/react-sdk-module-api": "^2.5.0",
|
||||
"@types/node": "^22.10.7",
|
||||
"@types/semver": "^7.5.8",
|
||||
"matrix-web-i18n": "^3.3.0",
|
||||
"semver": "^7.6.3",
|
||||
"typescript": "^5.7.3",
|
||||
"vite": "^6.0.11",
|
||||
"vite-plugin-dts": "^4.5.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@matrix-org/react-sdk-module-api": "^2.5.0",
|
||||
"@matrix-org/react-sdk-module-api": "*",
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"matrix-web-i18n": "*",
|
||||
"react": "^18"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@matrix-org/react-sdk-module-api": {
|
||||
"optional": true
|
||||
},
|
||||
"matrix-web-i18n": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ const moduleExportSignature: Record<keyof ModuleExport, Type> = {
|
||||
|
||||
type Type = "function" | "string" | "number" | "boolean" | "object";
|
||||
|
||||
export function isInterface<T>(obj: unknown, keys: Record<keyof T, Type>): obj is T {
|
||||
function isInterface<T>(obj: unknown, keys: Record<keyof T, Type>): obj is T {
|
||||
if (obj === null || typeof obj !== "object") return false;
|
||||
for (const key in keys) {
|
||||
if (typeof (obj as Record<keyof T, unknown>)[key] !== keys[key]) return false;
|
||||
|
||||
@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
export { ModuleLoader } from "./loader";
|
||||
export { ModuleLoader, ModuleIncompatibleError } from "./loader";
|
||||
export type { Api, Module, ModuleFactory } from "./api";
|
||||
export type * from "./legacy-modules";
|
||||
export type * from "./legacy-customisations";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user