mingo
Version:
MongoDB query language for in-memory objects
12 lines (11 loc) • 482 B
TypeScript
import { AccumulatorOperator } from "../../types";
/**
* Returns an aggregation of the maxmimum value n elements within a group.
* If the group contains fewer than n elements, $maxN returns all elements in the group.
*
* @param {Array} collection The input array
* @param {AnyObject} expr The right-hand side expression value of the operator
* @param {Options} options The options to use for this operation
* @returns {*}
*/
export declare const $maxN: AccumulatorOperator;