import { EventEmitter } from 'events' declare interface Options { name: String; ttl?: Number; } declare interface CollectionEvents { expired: [Object]; ttl: [Boolean]; ready: []; } declare class Collection extends EventEmitter { constructor(db: BaseDatabase, options: Options); public db: BaseDatabase; public displayName: String; public size: Number; public isOpen: Boolean; public set(data: Object, filter: Object): Promise; public delete(filter: Object, limit: Number): Promise; public findOne(filter: Object): Promise; public find(filter: Object, limit: Number): Promise; public update(filter: Object, property: String[], value: any, object?: Boolean): Promise; public deleteMany(...filters: Object[]): Promise; public on(event: K, listener: (...args: CollectionEvents[K]) => void): this; public on( event: Exclude, listener: (...args: any[]) => void, ): this; public once(event: K, listener: (...args: CollectionEvents[K]) => void): this; public once( event: Exclude, listener: (...args: any[]) => void, ): this; public emit(event: K, ...args: CollectionEvents[K]): boolean; public emit(event: Exclude, ...args: any[]): boolean; public off(event: K, listener: (...args: CollectionEvents[K]) => void): this; public off( event: Exclude, listener: (...args: any[]) => void, ): this; public removeAllListeners(event?: K): this; public removeAllListeners(event?: Exclude): this; } declare class BaseDatabase extends EventEmitter { constructor(name: String); public displayName: String; public isReady: Boolean; public collection(options: Options): Collection; public on(event: 'ready', listener: (...args: []) => void): this; public on( event: Exclude, listener: (...args: any[]) => void ): this; public once(event: 'ready', listener: (...args: any[]) => void): this; public once( event: Exclude, listener: (...args: any[]) => void ): this; public emit(event: 'ready', ...args: any[]): this; public emit(event: Exclude, ...args: any[]): this; public off(event: 'ready', listener: (...args: []) => void): this; public off( event: Exclude, listener: (...args: any[]) => void ): this; public emit(event?: 'ready'): this; public emit(event?: Exclude): this; } declare module 'dbd.db' { function database(name: String): BaseDatabase; export = database export function deprecated(dbName: String, collection: String): Promise; export const version: string; }