import { DynamicModule, ForwardReference, Provider } from '@nestjs/common'; import { EnhancerSubtype } from '@nestjs/common/constants'; import { ClassProvider, Controller, ExistingProvider, FactoryProvider, Injectable, Type, ValueProvider } from '@nestjs/common/interfaces'; import { ApplicationConfig } from './application-config'; import { NestContainer } from './injector/container'; import { InstanceWrapper } from './injector/instance-wrapper'; import { Module } from './injector/module'; import { GraphInspector } from './inspector/graph-inspector'; import { ModuleDefinition } from './interfaces/module-definition.interface'; import { ModuleOverride } from './interfaces/module-override.interface'; import { MetadataScanner } from './metadata-scanner'; interface ModulesScanParameters { moduleDefinition: ModuleDefinition; scope?: Type[]; ctxRegistry?: (ForwardReference | DynamicModule | Type)[]; overrides?: ModuleOverride[]; lazy?: boolean; } export declare class DependenciesScanner { private readonly container; private readonly metadataScanner; private readonly graphInspector; private readonly applicationConfig; private readonly applicationProvidersApplyMap; constructor(container: NestContainer, metadataScanner: MetadataScanner, graphInspector: GraphInspector, applicationConfig?: ApplicationConfig); scan(module: Type, options?: { overrides?: ModuleOverride[]; }): Promise; scanForModules({ moduleDefinition, lazy, scope, ctxRegistry, overrides, }: ModulesScanParameters): Promise; insertModule(moduleDefinition: any, scope: Type[]): Promise<{ moduleRef: Module; inserted: boolean; } | undefined>; scanModulesForDependencies(modules?: Map): Promise; reflectImports(module: Type, token: string, context: string): Promise; reflectProviders(module: Type, token: string): void; reflectControllers(module: Type, token: string): void; reflectDynamicMetadata(cls: Type, token: string): void; reflectExports(module: Type, token: string): void; reflectInjectables(component: Type, token: string, metadataKey: string): void; reflectParamInjectables(component: Type, token: string, metadataKey: string): void; reflectKeyMetadata(component: Type, key: string, methodKey: string): { methodKey: string; metadata: any; } | undefined; calculateModulesDistance(): void; insertImport(related: any, token: string, context: string): Promise; isCustomProvider(provider: Provider): provider is ClassProvider | ValueProvider | FactoryProvider | ExistingProvider; insertProvider(provider: Provider, token: string): string | symbol | Function | InstanceWrapper; insertInjectable(injectable: Type | object, token: string, host: Type, subtype: EnhancerSubtype, methodKey?: string): InstanceWrapper; insertExportedProvider(exportedProvider: Type, token: string): void; insertController(controller: Type, token: string): void; private insertOrOverrideModule; private getOverrideModuleByModule; private overrideModule; reflectMetadata(metadataKey: string, metatype: Type): T[]; registerCoreModule(overrides?: ModuleOverride[]): Promise; /** * Add either request or transient globally scoped enhancers * to all controllers metadata storage */ addScopedEnhancersMetadata(): void; applyApplicationProviders(): void; getApplyProvidersMap(): { [type: string]: Function; }; getApplyRequestProvidersMap(): { [type: string]: Function; }; isDynamicModule(module: Type | DynamicModule): module is DynamicModule; /** * @param metatype * @returns `true` if `metatype` is annotated with the `@Injectable()` decorator. */ private isInjectable; /** * @param metatype * @returns `true` if `metatype` is annotated with the `@Controller()` decorator. */ private isController; /** * @param metatype * @returns `true` if `metatype` is annotated with the `@Catch()` decorator. */ private isExceptionFilter; private isForwardReference; private isRequestOrTransient; } export {};