import { Scope } from '@nestjs/common'; import { Abstract, Controller, DynamicModule, Injectable, NestModule } from '@nestjs/common/interfaces'; import { Type } from '@nestjs/common/interfaces/type.interface'; import { NestContainer } from './container'; import { InstanceWrapper } from './instance-wrapper'; export interface CustomProvider { provide: any; name: string; } export declare type OpaqueToken = string | symbol | Type | Function | Abstract; export declare type CustomClass = CustomProvider & { useClass: Type; scope?: Scope; }; export declare type CustomFactory = CustomProvider & { useFactory: (...args: any[]) => any; inject?: OpaqueToken[]; scope?: Scope; }; export declare type CustomValue = CustomProvider & { useValue: any; }; export declare type ProviderMetatype = Type | CustomFactory | CustomValue | CustomClass; export declare class Module { private readonly _metatype; private readonly _scope; private readonly container; private readonly _id; private readonly _imports; private readonly _providers; private readonly _injectables; private readonly _controllers; private readonly _exports; constructor(_metatype: Type, _scope: Type[], container: NestContainer); readonly id: string; readonly scope: Type[]; readonly providers: Map>; readonly imports: Set; /** * Left for backward-compatibility reasons */ readonly relatedModules: Set; /** * Left for backward-compatibility reasons */ readonly components: Map>; /** * Left for backward-compatibility reasons */ readonly routes: Map>; readonly injectables: Map>; readonly controllers: Map>; readonly exports: Set; readonly instance: NestModule; readonly metatype: Type; addCoreProviders(container: NestContainer): void; addModuleRef(): void; addModuleAsProvider(): void; addInjectable(injectable: Type, host?: Type): string; addProvider(provider: ProviderMetatype): string; isCustomProvider(provider: ProviderMetatype): provider is CustomClass | CustomFactory | CustomValue; addCustomProvider(provider: CustomFactory | CustomValue | CustomClass, collection: Map): string; isCustomClass(provider: any): provider is CustomClass; isCustomValue(provider: any): provider is CustomValue; isCustomFactory(provider: any): provider is CustomFactory; isDynamicModule(exported: any): exported is DynamicModule; addCustomClass(provider: CustomClass, collection: Map): void; addCustomValue(provider: CustomValue, collection: Map): void; addCustomFactory(provider: CustomFactory, collection: Map): void; addExportedProvider(provider: ProviderMetatype | string | symbol | DynamicModule): Set; addCustomExportedProvider(provider: CustomFactory | CustomValue | CustomClass): Set; validateExportedProvider(token: string | symbol): string | symbol; addController(controller: Type): void; addRelatedModule(module: any): void; replace(toReplace: string | symbol | Type, options: any): string; hasProvider(token: string | symbol | Type): boolean; hasInjectable(token: string | symbol | Type): boolean; getProviderStaticToken(provider: string | symbol | Type): string | symbol; getProviderByKey(name: string | symbol): InstanceWrapper; createModuleReferenceType(): any; private getClassScope; }