This commit is contained in:
Michael Telatynski 2025-01-28 11:52:33 +00:00
parent 0e8315493e
commit 35b33ac893
3 changed files with 9 additions and 3 deletions

View File

@ -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
}
}
}

View File

@ -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;

View File

@ -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";