/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
export type HandlerFunction = (...args: any[]) => any;
export declare class NamedHandler<H extends Record<keyof H, HandlerFunction>> {
    private handler;
    hasHandler<K extends keyof H>(action: K): boolean;
    addHandler<K extends keyof H>(action: K, handler: H[K]): void;
    executeHandler<K extends keyof H>(action: K, ...args: Parameters<H[K]>): Promise<any>;
    removeHandler<K extends keyof H>(action: K, handler: H[K]): void;
}
type ExtendPublicHandlerMethods<ParentClass extends new (...args: any[]) => any, H extends Record<keyof H, HandlerFunction>> = ParentClass extends new (...args: infer TArgs) => infer T ? new (...args: TArgs) => T & {
    addCommandHandler<K extends keyof H>(action: K, handler: H[K]): void;
    removeCommandHandler<K extends keyof H>(action: K, handler: H[K]): void;
    _executeHandler<K extends keyof H>(action: K, ...args: Parameters<H[K]>): Promise<void>;
} : never;
export declare function extendPublicHandlerMethods<ParentClass extends new (...args: any[]) => any, H extends Record<keyof H, HandlerFunction>>(parentClass: ParentClass): ExtendPublicHandlerMethods<ParentClass, H>;
export {};
//# sourceMappingURL=NamedHandler.d.ts.map