UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

24 lines (23 loc) 800 B
import { DataProvider } from './DataProvider'; import { Enum } from '../types/Enum'; import { Constructor } from '../types/Constructor'; export type DatabaseOptions = { user?: string; password?: string; host?: string; port?: number; cluster?: string; connectionString?: string; maxPoolSize?: number; minPoolSize?: number; maxIdleTimeMS?: number; }; export declare class DefaultProvider implements DataProvider { } export declare class Database extends Enum { readonly provider: Constructor<DataProvider> | DataProvider; readonly options?: DatabaseOptions | undefined; static readonly Default: Database; constructor(name: string, provider: Constructor<DataProvider> | DataProvider, options?: DatabaseOptions | undefined); provide: <P>() => P; }