/// import 'reflect-metadata'; import { AsyncLocalStorage } from 'node:async_hooks'; import { DependencyContainer, inject, injectable, injectAll, InjectionToken } from 'tsyringe'; export declare const provider: typeof injectable; export declare const provide: typeof inject; export declare const provideAll: typeof injectAll; export type Dependency = { provide: InjectionToken; useClass?: any; useValue?: any; }; export declare function setAsyncLocalStorage(als: AsyncLocalStorage): void; /** * Hook to get access to current execution module dependencies. */ export declare const useContext: (token: InjectionToken) => T; /** * Hook to get access to current execution module dependencies. */ export declare const throwWithContext: () => void; /** * A module is a collection of services, values, and factories that can be * registered with a dependency container. */ export declare class Module { private readonly dependencies; private container?; constructor(dependencies: Dependency[]); /** * Builds and initializes dependencies. */ awake(): Promise<{ act: (func: () => T) => T; }>; /** * Disposes all dependencies instantiated by this module. * @returns */ dispose(): void; /** * Builds a new instance of dependency container based on module definition. * @returns */ protected buildContainer(): DependencyContainer; /** * Resolves a dependency from the module. * @param token represents the identifier for the dependency that you want to * resolve from the container. * @returns instance of the dependency. */ get(token: InjectionToken): T; /** * Resolves a collection of dependencies from the module. * @param token * @returns */ getAll(token: InjectionToken): T[]; } //# sourceMappingURL=module.d.ts.map