import "reflect-metadata"; import type { Class } from "./decorators"; import { type InterfaceConnection } from "./internal"; import { type AsyncProxy, type EventProxy, type RegisteringProxy } from "./proxies"; export * from "./errors"; export type { InterfaceConnection } from "./internal"; export { AsyncProxy, EventProxy, GetInterfaceProxyIdentity, GetResponsibleModule, InterfaceFunction, IsInterfaceProxy, RegisteringProxy, RunWithResponsibleModule, } from "./proxies"; /** * Gets metadata for a target object using the specified metadata class. * * Retrieves or creates metadata associated with a target object, with optional inheritance support. * This is used for reflection-based operations throughout the framework. * * @param target The target object to get metadata for * @param meta The metadata class with a symbol key * @param inherit Whether to inherit metadata from the prototype chain * @returns The metadata instance */ export declare function GetMetadata, U extends Record>(target: U, meta: Class & { key: symbol; }, inherit?: boolean): T; type RID = T extends (id: infer P, ...args: any[]) => void ? P : never; type InterfaceImplType = T extends RegisteringProxy ? { register: P; unregister: (id: RID

) => void; } : T extends AsyncProxy ? P : T extends EventProxy ? never : T extends (...args: infer A) => infer R ? (...args: A) => Awaited | R : T extends Record ? InterfaceToImpl : never; type InterfaceToImpl = T extends infer P ? { [K in keyof P]?: InterfaceImplType; } : never; /** * Implements an interface with the provided implementation. * * Links a declared interface with its implementation, setting up the necessary proxies * and event handlers to enable cross-module communication. * * @param declaration The interface declaration to implement * @param implementation The implementation of the interface * @returns An object containing the declaration and implementation */ export declare function ImplementInterface, T2 extends InterfaceToImpl>(declaration: T, implementation: T2): { declaration: T; implementation: T2; }; /** * @deprecated Please use the non-async version of this function. */ export declare function ImplementInterface, T2 extends InterfaceToImpl>(declaration: T | PromiseLike, implementation: T2 | PromiseLike): Promise<{ declaration: Awaited; implementation: T2; }>; /** * Gets all instances of a specific interface across the system. * * Retrieves all connections to implementations of the specified interface. * * @param interfaceID The ID of the interface to get instances for * @returns Array of interface connections */ export declare function GetInterfaceInstances(interfaceID: string): InterfaceConnection[]; /** * Gets a specific instance of an interface by ID. * * Retrieves a specific connection to an implementation of the specified interface. * * @param interfaceID The ID of the interface to get an instance for * @param connectionID The ID of the specific connection to retrieve * @returns The interface connection or undefined if not found */ export declare function GetInterfaceInstance(interfaceID: string, connectionID: string): InterfaceConnection | undefined; export * from "./modules"; export * from "./runtime";