Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Module

Hierarchy

  • Module

Callable

  • Defines the module

    • imports - the set of the 'imported' modules
    • controllers - the list of controllers (e.g. HTTP controllers)
    • providers - the list of providers that belong to this module. They can be injected between themselves.
    • exports - the set of components, which should be available for modules, which imports this module

    Parameters

    Returns ClassDecorator

Index

Constructors

constructor

Properties

Private _controllers

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

Private _exports

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

Private _id

_id: string

Private _imports

_imports: any = new Set<Module>()

Private _injectables

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

Private _metatype

_metatype: Type<any>

Private _providers

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

Private _scope

_scope: Type<any>[]

Private container

container: NestContainer

Accessors

components

controllers

exports

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

id

  • get id(): string

imports

  • get imports(): Set<Module>

injectables

instance

metatype

  • get metatype(): Type<any>

providers

relatedModules

  • get relatedModules(): Set<Module>

routes

scope

  • get scope(): Type<any>[]

Methods

addController

addCoreProviders

addCustomClass

addCustomExportedProvider

addCustomFactory

addCustomProvider

addCustomValue

addExportedProvider

addInjectable

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

addModuleAsProvider

  • addModuleAsProvider(): void

addModuleRef

  • addModuleRef(): void

addProvider

addRelatedModule

  • addRelatedModule(module: any): void

createModuleReferenceType

  • createModuleReferenceType(): any

Private getClassScope

getProviderByKey

getProviderStaticToken

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

hasInjectable

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

hasProvider

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

isCustomClass

  • isCustomClass(provider: any): boolean

isCustomFactory

  • isCustomFactory(provider: any): boolean

isCustomProvider

isCustomValue

  • isCustomValue(provider: any): boolean

isDynamicModule

  • isDynamicModule(exported: any): boolean

replace

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

validateExportedProvider

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

Generated using TypeDoc