dino-core
Version:
A dependency injection framework for NodeJS applications
23 lines (22 loc) • 904 B
TypeScript
import type { ComponentDescriptor } from '../model/ComponentDescriptor';
import type { ApplicationContext } from './ApplicationContext';
export declare class LazyLoadingResolver implements ProxyHandler<any> {
private readonly applicationContext;
private readonly componentDescriptor;
private targetRegistered;
/**
*
* @param {ApplicationContext} applicationContext
* @param {ComponentDescriptor} componentDescriptor
*/
constructor(applicationContext: ApplicationContext, componentDescriptor: ComponentDescriptor);
get(_target: any, property: string, receiver: any): any;
/**
* Ensure that the component instance is loaded before interacting with it.
* As the component will be loaded from the application context it will therefore ensure that
* its lifecycle is executed.
*
* @private
*/
private loadInstanceIfRequired;
}