Skip to content

Interface: ConfigurableModuleHost<ModuleOptions, MethodKey, FactoryClassMethodKey, ExtraModuleDefinitionOptions>

Defined in: packages/core/src/module-utils/interfaces/configurable-module-host.interface.ts:9

Configurable module host. See properties for more details

Type Parameters

Type ParameterDefault type
ModuleOptionsRecord<string, unknown>
MethodKey extends stringstring
FactoryClassMethodKey extends stringstring
ExtraModuleDefinitionOptions{ }

Properties

PropertyTypeDescriptionDefined in
ASYNC_OPTIONS_TYPEConfigurableModuleAsyncOptions<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. Example @Module({}) class IntegrationModule extends ConfigurableModuleCls { static module = initializer(IntegrationModule); static registerAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule { return super.registerAsync(options); }packages/core/src/module-utils/interfaces/configurable-module-host.interface.ts:56
ConfigurableModuleClassConfigurableModuleCls<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. Example @Module({}) class IntegrationModule extends ConfigurableModuleCls { // ... }packages/core/src/module-utils/interfaces/configurable-module-host.interface.ts:30
MODULE_OPTIONS_TOKENstring | symbolModule options provider token. Can be used to inject the "options object" to providers registered within the host module.packages/core/src/module-utils/interfaces/configurable-module-host.interface.ts:40
OPTIONS_TYPEModuleOptions & 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. Example @Module({}) class IntegrationModule extends ConfigurableModuleCls { static module = initializer(IntegrationModule); static register(options: typeof OPTIONS_TYPE): DynamicModule { return super.register(options); }packages/core/src/module-utils/interfaces/configurable-module-host.interface.ts:76

Released under the MIT License.