xInjection - v2.1.2
    Preparing search index...

    Interface ProviderModuleOptions

    interface ProviderModuleOptions {
        defaultScope?: InjectionScope;
        exports?: ExportsDefinition;
        id: ModuleIdentifier;
        imports?: ImportsDefinition;
        isGlobal?: boolean;
        onDispose?: () => _RequireAtLeastOne;
        onReady?: (module: IProviderModule) => void | Promise<void>;
        onReset?: () => _RequireAtLeastOne;
        providers?: ProvidersDefinition;
    }

    Hierarchy (View Summary)

    Index

    Properties

    defaultScope?: InjectionScope

    The default InjectionScope to be used when a ProvidersDefinition | Provider does not have a defined scope.

    Defaults to InjectionScope.Singleton.

    The subset of providers, modules or blueprints that are provided by this module and should be available in other modules which import this module.

    id: ModuleIdentifier

    The module ID.

    Note: It doesn't have to be unique, however, the AppModule id is a reserved id and it'll throw an error if used.

    imports?: ImportsDefinition

    Import additional modules or blueprints into this module.

    isGlobal?: boolean

    When a module is set to be global, it'll be automatically imported into the AppModule during its initialization.

    Note: Importing a global module into another module does nothing.

    Defaults to false.

    onDispose?: () => _RequireAtLeastOne

    The provided callbacks will be invoked when the dispose method is invoked.

    Type declaration

      • (): _RequireAtLeastOne
      • Returns _RequireAtLeastOne

        See OnCleanupOptions.

    onReady?: (module: IProviderModule) => void | Promise<void>

    Callback which will be invoked once the module container has been initialized and the providers resolved.

    Type declaration

    onReset?: () => _RequireAtLeastOne

    The provided callbacks will be invoked when the reset method is invoked.

    Type declaration

      • (): _RequireAtLeastOne
      • Returns _RequireAtLeastOne

        See OnCleanupOptions.

    providers?: ProvidersDefinition

    The providers that will be instantiated by the container and that may be shared at least across this module.