This is a special module type designed specially for providing bindings and logic to other modules by its input config.

Unlike other modules, this module type is not registered in the container and only be imported only from other modules.

Every module import will create a new instance of this module which will be able to process all logic separately.

For example, you can register http controllers or database orm models in any module.

Type Parameters

  • Cfg = any

Hierarchy (view full)

Constructors

Properties

aliases: Map<TBindKey, TBindKey> = ...
bindManger: BindManager<DynamicModule<Cfg>> = ...
config?: Cfg
container: Container
exports: Set<TBindKey> = ...
factoriesAsync: Map<TBindKey, IAsyncFactory<any, Module<any>>> = ...
factoriesSync: Map<TBindKey, ISyncFactory<any, Module<any>>> = ...
importedDynamicModules: Set<Module<any>> = ...
importer: Module<any> | Container
imports: Set<TClassConstructor<Module<any>>> = ...
initialized: boolean = false
__svt_module_traits: string[] = ...

Accessors

Methods

  • Defines an alias (aka link) to another binding. Alias can be used in export and global export to achieve global "scoped" bindings for dynamic modules. (see @silvertree/logging for usage example)

    Parameters

    Returns void

  • This method invokes user defined bindings, imports, export and internal module related init logic. Any entity initialization logic should be placed in corresponded factory to minimize module initialization time.

    Returns Promise<void>