import { Controller, DynamicModule, Injectable, NestModule } from '@nestjs/common/interfaces'; import { Type } from '@nestjs/common/interfaces/type.interface'; import { ApplicationReferenceHost } from '../helpers/application-ref-host'; import { ExternalContextCreator } from '../helpers/external-context-creator'; import { Reflector } from '../services/reflector.service'; import { InstanceWrapper, NestContainer } from './container'; import { ModulesContainer } from './modules-container'; export interface CustomComponent { provide: any; name: string; } export declare type OpaqueToken = string | symbol | object | Type; export declare type CustomClass = CustomComponent & { useClass: Type; }; export declare type CustomFactory = CustomComponent & { useFactory: (...args) => any; inject?: OpaqueToken[]; }; export declare type CustomValue = CustomComponent & { useValue: any; }; export declare type ComponentMetatype = Type | CustomFactory | CustomValue | CustomClass; export declare class Module { private readonly _metatype; private readonly _scope; private readonly container; private readonly _id; private readonly _relatedModules; private readonly _components; private readonly _injectables; private readonly _routes; private readonly _exports; constructor(_metatype: Type, _scope: Type[], container: NestContainer); readonly id: string; readonly scope: Type[]; readonly relatedModules: Set; readonly components: Map>; readonly injectables: Map>; readonly routes: Map>; readonly exports: Set; readonly instance: NestModule; readonly metatype: Type; addCoreInjectables(container: NestContainer): void; addModuleRef(): void; addModuleAsComponent(): void; addReflector(reflector: Reflector): void; addApplicationRef(applicationRef: any): void; addExternalContextCreator(externalContextCreator: ExternalContextCreator): void; addModulesContainer(modulesContainer: ModulesContainer): void; addApplicationRefHost(applicationRefHost: ApplicationReferenceHost): void; addInjectable(injectable: Type): string; addComponent(component: ComponentMetatype): string; isCustomProvider(component: ComponentMetatype): component is CustomClass | CustomFactory | CustomValue; addCustomProvider(component: CustomFactory | CustomValue | CustomClass, collection: Map): string; isCustomClass(component: any): component is CustomClass; isCustomValue(component: any): component is CustomValue; isCustomFactory(component: any): component is CustomFactory; isDynamicModule(exported: any): exported is DynamicModule; addCustomClass(component: CustomClass, collection: Map): void; addCustomValue(component: CustomValue, collection: Map): void; addCustomFactory(component: CustomFactory, collection: Map): void; addExportedComponent(exportedComponent: ComponentMetatype | string | DynamicModule): Set; addCustomExportedComponent(exportedComponent: CustomFactory | CustomValue | CustomClass): Set; validateExportedProvider(token: string): string; addRoute(route: Type): void; addRelatedModule(relatedModule: any): void; replace(toReplace: any, options: any): string; createModuleRefMetatype(): any; }