nestjs-smart-modules - v1.1.2
    Preparing search index...

    Interface AsyncParams<T>

    Asynchronous configuration for a smart module factory, mirroring the conventional NestJS registerAsync options shape.

    imports are applied to the generated config module itself, so inject resolves from those modules even when they are not global.

    interface AsyncParams<T> {
        imports?: (
            | Type<any>
            | DynamicModule
            | Promise<DynamicModule>
            | ForwardReference<any>
        )[];
        inject?: any[];
        useFactory: (...args: any[]) => T | Promise<T>;
    }

    Type Parameters

    • T
    Index
    imports?: (
        | Type<any>
        | DynamicModule
        | Promise<DynamicModule>
        | ForwardReference<any>
    )[]

    Modules whose exported providers may be injected into useFactory.

    inject?: any[]

    Injection tokens resolved and passed to useFactory as arguments.

    useFactory: (...args: any[]) => T | Promise<T>

    Produces the configuration object (sync or async).