import { Trigger } from './trigger.js'; import { type StructuredParameters, type CommandMetadataProcessorSignature, CommandProcessor } from './processor.js'; import { Local } from '../processors/index.js'; import * as Metadata from '../metadata/index.js'; import { Injector, type MiddlewareAsync, MiddlewareCompositeWithPriorityAsync, type MiddlewarePromise, SimpleInjector } from '@akala/core'; export type AsDispatchArgs = T | [StructuredParameters]; export type AsDispatchArg = T[0] | StructuredParameters; export declare const defaultCommands: Local; export declare class Container extends SimpleInjector implements MiddlewareAsync<[origin: Container, cmd: Metadata.Command | string, params: AsDispatchArgs]> { name: string; state: TState; attach(trigger: Trigger, ...server: U): V; attach(trigger: string, ...server: unknown[]): TResult; readonly processor: MiddlewareCompositeWithPriorityAsync>; constructor(name: string, state: TState, processor?: MiddlewareAsync>, parent?: Injector); pipe(container: Container, priority?: number): void; dispatch(command: '$metadata', ...param: AsDispatchArgs): Promise; dispatch(command: string | Metadata.Command, ...param: AsDispatchArgs): Promise; handle(container: Container, command: string | Metadata.Command, ...param: AsDispatchArgs): MiddlewarePromise; resolve(name: string): T; static proxy(name: string, processor: CommandProcessor, priority?: number): Container; register(name: string, value: T, override?: boolean): T; register(cmd: T, override?: boolean): T; register(cmd: Container, override?: boolean): Container; } export declare function lazy(factory: () => T): T;