import { Connection, ConnectOptions } from "mongoose"; export declare type MongoDBContextParams = { /** * MongoDB connection URL */ connectionUrl: string; /** * MongoDB connection options */ options?: ConnectOptions; /** * Method to be executed when the connection to MongoDB has been etablished */ onConnect?: (connection: Connection) => Promise | void; /** * Method to be executed when an error occur during MongoDB connection */ onError?: (connection: Connection, error?: any) => Promise | void; }; declare class MongoDBContext { static syncIndexes: Map; callback?: (err: any) => void; }>; constructor(); /** * Initialize mongodb connection * * @param params Mongodb context params */ static init(params: MongoDBContextParams): Promise; } export default MongoDBContext;