interface FlexibleFactoryInterface { register(key: string, factory: (...args: any[]) => T): void; create(key: string, ...args: any[]): Promise; } declare class FlexibleFactory { registry: Map; register(key: string, ctor: (...args: any[]) => T): void; create(key: string, ...args: any[]): T; } export { FlexibleFactory, type FlexibleFactoryInterface };