import { Cursor } from './cursor'; import { Options } from './core'; import { Source } from './lazy'; /** * An object used to filter input documents * * @param {Object} criteria The criteria for constructing predicates * @param {Options} options Options for use by operators * @constructor */ export declare class Query { private __criteria; private __compiled; private __options; constructor(criteria: object, options?: Options); _compile(): void; _processOperator(field: string, operator: string, value: any): void; /** * Checks if the object passes the query criteria. Returns true if so, false otherwise. * * @param obj The object to test * @returns {boolean} True or false */ test(obj: any): boolean; /** * Returns a cursor to select matching documents from the input source. * * @param source A source providing a sequence of documents * @param projection An optional projection criteria * @returns {Cursor} A Cursor for iterating over the results */ find(collection: Source, projection?: object): Cursor; /** * Remove matched documents from the collection returning the remainder * * @param collection An array of documents * @returns {Array} A new array with matching elements removed */ remove(collection: object[]): object[]; }