File: index.d.ts

Recommend this page to a friend!
  Classes of Jonathan Gotti  >  Mongo Filter  >  index.d.ts  >  Download  
File: index.d.ts
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Mongo Filter
Filter collection elements with mongoQuery syntax
Author: By
Last change:
Date: 4 years ago
Size: 408 bytes


Class file image Download
declare module 'mongofilter' {
	export interface Predicate<X> {
		(item: any): boolean;
		filter<T extends X>(collection: T[]): T[];
		filterItem(item: X): boolean;
		or(query: Query): Predicate<X>;
		and(query: Query): Predicate<X>;

	export type Query = any;

	export function mongofilter<X>(query: Query): Predicate<X>;

	const comparators: {};
	const aliases: {};
	export { comparators, aliases };