type AnyAsyncFunction = (...args: any[]) => Promise; export type AsyncMethodProvider = { [K in keyof T]: T[K] extends (...args: infer Args) => infer Result ? (...args: Args) => Promise> : never; }; /** * Build a memoized proxy for a provider/service value that is expensive to * import eagerly. Method calls and direct function calls resolve the target on * first use, cache it for the isolate/process, and retry after a failed load. * * This helper is only for async provider seams. Object providers must expose * async methods only; plain properties and sync-returning methods are outside * the contract because a proxy cannot distinguish `service.flag` from * `service.method` until call time. */ export declare function lazyProvider(load: () => Promise): T; export declare function lazyProvider(load: () => Promise>): AsyncMethodProvider; export {};