Iterate
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user