import { EnhancerSubtype } from '@nestjs/common/constants'; import { ClassProvider, Controller, DynamicModule, ExistingProvider, FactoryProvider, Injectable, InjectionToken, NestModule, Provider, Type, ValueProvider } from '@nestjs/common/interfaces'; import { NestContainer } from './container'; import { InstanceWrapper } from './instance-wrapper'; import { ModuleRef } from './module-ref'; export declare class Module { private readonly _metatype; private readonly container; private readonly _id; private readonly _imports; private readonly _providers; private readonly _injectables; private readonly _middlewares; private readonly _controllers; private readonly _entryProviderKeys; private readonly _exports; private _distance; private _initOnPreview; private _isGlobal; private _token; constructor(_metatype: Type, container: NestContainer); get id(): string; get token(): string; set token(token: string); get name(): string; get isGlobal(): boolean; set isGlobal(global: boolean); get initOnPreview(): boolean; set initOnPreview(initOnPreview: boolean); get providers(): Map>; get middlewares(): Map>; get imports(): Set; get injectables(): Map>; get controllers(): Map>; get entryProviders(): Array>; get exports(): Set; get instance(): NestModule; get metatype(): Type; get distance(): number; set distance(value: number); addCoreProviders(): void; addModuleRef(): void; addModuleAsProvider(): void; addApplicationConfig(): void; addInjectable(injectable: Provider, enhancerSubtype: EnhancerSubtype, host?: Type): string | symbol | Function | InstanceWrapper; addProvider(provider: Provider): InjectionToken; addProvider(provider: Provider, enhancerSubtype: EnhancerSubtype): InjectionToken; isCustomProvider(provider: Provider): provider is ClassProvider | FactoryProvider | ValueProvider | ExistingProvider; addCustomProvider(provider: ClassProvider | FactoryProvider | ValueProvider | ExistingProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): InjectionToken; isCustomClass(provider: any): provider is ClassProvider; isCustomValue(provider: any): provider is ValueProvider; isCustomFactory(provider: any): provider is FactoryProvider; isCustomUseExisting(provider: any): provider is ExistingProvider; isDynamicModule(exported: any): exported is DynamicModule; addCustomClass(provider: ClassProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): void; addCustomValue(provider: ValueProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): void; addCustomFactory(provider: FactoryProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): void; addCustomUseExisting(provider: ExistingProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): void; addExportedProvider(provider: Provider | string | symbol | DynamicModule): Set; addCustomExportedProvider(provider: FactoryProvider | ValueProvider | ClassProvider | ExistingProvider): Set; validateExportedProvider(token: InjectionToken): InjectionToken; addController(controller: Type): void; assignControllerUniqueId(controller: Type): void; addImport(moduleRef: Module): void; /** * @deprecated */ addRelatedModule(module: Module): void; replace(toReplace: InjectionToken, options: any): void; hasProvider(token: InjectionToken): boolean; hasInjectable(token: InjectionToken): boolean; getProviderByKey(name: InjectionToken): InstanceWrapper; getProviderById(id: string): InstanceWrapper | undefined; getControllerById(id: string): InstanceWrapper | undefined; getInjectableById(id: string): InstanceWrapper | undefined; getMiddlewareById(id: string): InstanceWrapper | undefined; getNonAliasProviders(): Array<[ InjectionToken, InstanceWrapper ]>; createModuleReferenceType(): Type; private isEntryProvider; private generateUuid; }