Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Module

Decorator that marks a class as a module. Decorator that marks a class as a module. Decorator that marks a class as a module.

Modules are used by Nest to organize the application structure into scopes. Controllers and Providers are scoped by the module they are declared in. Modules and their classes (Controllers and Providers) form a graph that determines how Nest performs Dependency Injection (DI).

Modules are used by Nest to organize the application structure into scopes. Controllers and Providers are scoped by the module they are declared in. Modules and their classes (Controllers and Providers) form a graph that determines how Nest performs Dependency Injection (DI).

Modules are used by Nest to organize the application structure into scopes. Controllers and Providers are scoped by the module they are declared in. Modules and their classes (Controllers and Providers) form a graph that determines how Nest performs Dependency Injection (DI).

see

Modules

publicapi
see

Modules

publicapi
see

Modules

publicapi

Hierarchy

  • Module

Callable

  • Module(metadata: any): (Anonymous function)
  • Decorator that marks a class as a module.

    Modules are used by Nest to organize the application structure into scopes. Controllers and Providers are scoped by the module they are declared in. Modules and their classes (Controllers and Providers) form a graph that determines how Nest performs Dependency Injection (DI).

    see

    Modules

    publicapi

    Parameters

    • metadata: any

      module configuration metadata

    Returns (Anonymous function)

Index

Constructors

constructor

Properties

Private Readonly _controllers

_controllers: Map<string, InstanceWrapper<object>> = new Map<string,InstanceWrapper<Controller>>()

Private _distance

_distance: number = 0

Private Readonly _exports

_exports: Set<string | symbol> = new Set<string | symbol>()

Private Readonly _id

_id: string

Private Readonly _imports

_imports: Set<Module> = new Set<Module>()

Private Readonly _injectables

_injectables: Map<any, InstanceWrapper<unknown>> = new Map<any, InstanceWrapper<Injectable>>()

Private Readonly _metatype

_metatype: Type<any>

Private Readonly _middlewares

_middlewares: Map<any, InstanceWrapper<unknown>> = new Map<any, InstanceWrapper<Injectable>>()

Private Readonly _providers

_providers: Map<any, InstanceWrapper<unknown>> = new Map<any, InstanceWrapper<Injectable>>()

Private Readonly container

container: NestContainer

Accessors

components

controllers

distance

  • get distance(): number
  • set distance(value: number): void

exports

  • get exports(): Set<string | symbol>

id

  • get id(): string

imports

injectables

instance

  • get instance(): NestModule

metatype

  • get metatype(): Type<any>

middlewares

providers

relatedModules

  • get relatedModules(): Set<Module>

routes

Methods

addApplicationConfig

  • addApplicationConfig(): void

addController

  • addController(controller: Type<Controller>): void

addCoreProviders

  • addCoreProviders(): void

addCustomClass

addCustomExportedProvider

  • addCustomExportedProvider(provider: FactoryProvider | ValueProvider | ClassProvider | ExistingProvider): Set<string | symbol>

addCustomFactory

addCustomProvider

  • addCustomProvider(provider: ClassProvider | FactoryProvider | ValueProvider | ExistingProvider & ProviderName, collection: Map<string, any>): string

addCustomUseExisting

addCustomValue

addExportedProvider

  • addExportedProvider(provider: (Provider & ProviderName) | string | symbol | DynamicModule): Set<string | symbol>

addInjectable

  • addInjectable<T>(injectable: Provider, host?: Type<T>): string

addModuleAsProvider

  • addModuleAsProvider(): void

addModuleRef

  • addModuleRef(): void

addProvider

  • addProvider(provider: Provider): string

addRelatedModule

  • addRelatedModule(module: Module): void

assignControllerUniqueId

  • assignControllerUniqueId(controller: Type<Controller>): void

createModuleReferenceType

  • createModuleReferenceType(): Type<ModuleRef>

getNonAliasProviders

getProviderByKey

getProviderStaticToken

  • getProviderStaticToken(provider: string | symbol | Type<any> | Abstract<any>): string | symbol

hasInjectable

  • hasInjectable(token: string | symbol | Type<any>): boolean

hasProvider

  • hasProvider(token: string | symbol | Type<any>): boolean

isCustomClass

  • isCustomClass(provider: any): provider is ClassProvider

isCustomFactory

  • isCustomFactory(provider: any): provider is FactoryProvider

isCustomProvider

  • isCustomProvider(provider: Provider): provider is ClassProvider | FactoryProvider | ValueProvider | ExistingProvider

isCustomUseExisting

  • isCustomUseExisting(provider: any): provider is ExistingProvider

isCustomValue

  • isCustomValue(provider: any): provider is ValueProvider

isDynamicModule

  • isDynamicModule(exported: any): exported is DynamicModule

replace

  • replace(toReplace: string | symbol | Type<any>, options: any): void

validateExportedProvider

  • validateExportedProvider(token: string | symbol): string | symbol

Generated using TypeDoc