UNPKG

nestjs-etcd

Version:
18 lines (17 loc) 661 B
import { Type } from '@nestjs/common'; import { ModuleMetadata } from '@nestjs/common/interfaces'; import { IOptions } from 'etcd3'; export declare type EtcdModuleOptions = IOptions & { name?: string; namespace?: string; }; export interface EtcdOptionsFactory { createEtcdOptions(connectionName?: string): Promise<EtcdModuleOptions> | EtcdModuleOptions; } export interface EtcdModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> { name?: string; useExisting?: Type<EtcdOptionsFactory>; useClass?: Type<EtcdOptionsFactory>; useFactory?: (...args: any[]) => Promise<EtcdModuleOptions> | EtcdModuleOptions; inject?: any[]; }