UNPKG

@nestjs/typeorm

Version:

TypeORM for NestJS: connections and repositories through dependency injection, entities, transactions and multiple databases.

21 lines (20 loc) • 990 B
import { DynamicModule } from '@nestjs/common'; import { DataSourceRef } from './interfaces/data-source-ref.type.js'; import { EntityClassOrSchema } from './interfaces/entity-class-or-schema.type.js'; import { TypeOrmModuleAsyncOptions, TypeOrmModuleOptions } from './interfaces/typeorm-options.interface.js'; /** * @publicApi */ export declare class TypeOrmModule { /** * Registers the TypeORM module with the given options. * * @param options The TypeORM data source options. * @param name Optional data source name. When provided, it overrides * `options.name` (if any) so the data source name can be configured * separately from the connection options – mirroring `forRootAsync`. */ static forRoot(options?: TypeOrmModuleOptions, name?: string): DynamicModule; static forFeature(entities?: EntityClassOrSchema[], dataSource?: DataSourceRef): DynamicModule; static forRootAsync(options: TypeOrmModuleAsyncOptions): DynamicModule; }