import { Controller } from '@nestjs-client/common/interfaces/controllers/controller.interface'; import { Injectable } from '@nestjs-client/common/interfaces/injectable.interface'; import { Type } from '@nestjs-client/common/interfaces/type.interface'; import { MiddlewareWrapper } from '../middleware/container'; import { InstanceWrapper } from './container'; import { Module } from './module'; /** * The type of an injectable dependency */ export declare type InjectorDependency = Type | Function | string; /** * The property-based dependency */ export interface PropertyDependency { key: string; name: InjectorDependency; isOptional?: boolean; instance?: any; } /** * Context of a dependency which gets injected by * the injector */ export interface InjectorDependencyContext { /** * The name of the property key (property-based injection) */ key?: string; /** * The name of the function or injection token */ name?: string; /** * The index of the dependency which gets injected * from the dependencies array */ index?: number; /** * The dependency array which gets injected */ dependencies?: InjectorDependency[]; } export declare class Injector { loadInstanceOfMiddleware(wrapper: MiddlewareWrapper, collection: Map, module: Module): Promise; loadInstanceOfRoute(wrapper: InstanceWrapper, module: Module): Promise; loadInstanceOfInjectable(wrapper: InstanceWrapper, module: Module): Promise; loadPrototypeOfInstance({metatype, name}: InstanceWrapper, collection: Map>): any; loadInstanceOfComponent(wrapper: InstanceWrapper, module: Module): Promise; applyDoneHook(wrapper: InstanceWrapper): () => void; loadInstance(wrapper: InstanceWrapper, collection: Map>, module: Module): Promise; resolveConstructorParams(wrapper: InstanceWrapper, module: Module, inject: InjectorDependency[], callback: (args) => void): Promise; reflectConstructorParams(type: Type): any[]; reflectOptionalParams(type: Type): any[]; reflectSelfParams(type: Type): any[]; resolveSingleParam(wrapper: InstanceWrapper, param: Type | string | symbol | any, dependencyContext: InjectorDependencyContext, module: Module): Promise; resolveParamToken(wrapper: InstanceWrapper, param: Type | string | symbol | any): any; resolveComponentInstance(module: Module, name: any, dependencyContext: InjectorDependencyContext, wrapper: InstanceWrapper): Promise; lookupComponent(components: Map, module: Module, dependencyContext: InjectorDependencyContext, wrapper: InstanceWrapper): Promise; lookupComponentInExports(dependencyContext: InjectorDependencyContext, module: Module, wrapper: InstanceWrapper): Promise; lookupComponentInRelatedModules(module: Module, name: any, moduleRegistry?: any[]): any; resolveProperties(wrapper: InstanceWrapper, module: Module, inject?: InjectorDependency[]): Promise; reflectProperties(type: Type): PropertyDependency[]; applyProperties(instance: T, properties: PropertyDependency[]): any; instantiateClass(instances: any[], wrapper: InstanceWrapper, targetMetatype: InstanceWrapper): Promise; }