@nestia/core
Version:
Super-fast validation decorators of NestJS
30 lines (29 loc) • 931 B
TypeScript
import { ModuleMetadata } from "@nestjs/common/interfaces";
/**
* Dynamic module.
*
* `DynamicModule` is a namespace wrapping a convenient function, which can load
* controller classes dynamically just by specifying their directory path.
*
* @author Jeongho Nam - https://github.com/samchon
*/
export declare namespace DynamicModule {
/**
* Mount dynamic module.
*
* Constructs a module instance with directory path of controller classes.
*
* Every controller classes in the target directory would be dynamically
* mounted.
*
* @param path Path of controllers
* @param metadata Additional metadata except controllers
* @returns Module instance
*/
function mount(path: string | string[] | {
include: string[];
exclude?: string[];
}, metadata?: Omit<ModuleMetadata, "controllers">, isTsNode?: boolean): Promise<{
new (): {};
}>;
}