ConfigurableModuleHost

Configurable module host. See properties for more details


interface ConfigurableModuleHost<ModuleOptions = Record<string, unknown>, MethodKey extends string = string, FactoryClassMethodKey extends string = string, ExtraModuleDefinitionOptions = {}> {
  ConfigurableModuleClass: ConfigurableModuleCls<ModuleOptions, MethodKey, FactoryClassMethodKey, ExtraModuleDefinitionOptions>
  MODULE_OPTIONS_TOKEN: string | symbol
  ASYNC_OPTIONS_TYPE: ConfigurableModuleAsyncOptions<ModuleOptions, FactoryClassMethodKey> & Partial<ExtraModuleDefinitionOptions>
  OPTIONS_TYPE: ModuleOptions & Partial<ExtraModuleDefinitionOptions>
}

Properties

Property Description
ConfigurableModuleClass: ConfigurableModuleCls<ModuleOptions, MethodKey, FactoryClassMethodKey, ExtraModuleDefinitionOptions>

Class that represents a blueprint/prototype for a configurable Nest module. This class provides static methods for constructing dynamic modules. Their names can be controlled through the "MethodKey" type argument.

Your module class should inherit from this class to make the static methods available.

MODULE_OPTIONS_TOKEN: string | symbol

Module options provider token. Can be used to inject the "options object" to providers registered within the host module.

ASYNC_OPTIONS_TYPE: ConfigurableModuleAsyncOptions<ModuleOptions, FactoryClassMethodKey> & Partial<ExtraModuleDefinitionOptions>

Can be used to auto-infer the compound "async module options" type. Note: this property is not supposed to be used as a value.

OPTIONS_TYPE: ModuleOptions & Partial<ExtraModuleDefinitionOptions>

Can be used to auto-infer the compound "module options" type (options interface + extra module definition options). Note: this property is not supposed to be used as a value.