1 | import { Type } from '@nestjs/common';
|
2 | import { ModuleMetadata } from '@nestjs/common/interfaces';
|
3 | import { Connection, ConnectionOptions } from 'typeorm';
|
4 | export declare type TypeOrmModuleOptions = {
|
5 | retryAttempts?: number;
|
6 | retryDelay?: number;
|
7 | toRetry?: (err: any) => boolean;
|
8 | autoLoadEntities?: boolean;
|
9 | keepConnectionAlive?: boolean;
|
10 | verboseRetryLog?: boolean;
|
11 | } & Partial<ConnectionOptions>;
|
12 | export interface TypeOrmOptionsFactory {
|
13 | createTypeOrmOptions(connectionName?: string): Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;
|
14 | }
|
15 | export declare type TypeOrmConnectionFactory = (options?: ConnectionOptions) => Promise<Connection>;
|
16 | export interface TypeOrmModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
17 | name?: string;
|
18 | useExisting?: Type<TypeOrmOptionsFactory>;
|
19 | useClass?: Type<TypeOrmOptionsFactory>;
|
20 | useFactory?: (...args: any[]) => Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;
|
21 | connectionFactory?: TypeOrmConnectionFactory;
|
22 | inject?: any[];
|
23 | }
|