mingo
Version:
MongoDB query language for in-memory objects
12 lines (11 loc) • 459 B
TypeScript
import type { Any, AnyObject, Options } from "../../types";
interface InputExpr {
n: Any;
input: Any;
}
/**
* Returns an aggregation of the first n elements within a group. The elements returned are meaningful only if in a specified sort order.
* If the group contains fewer than n elements, $firstN returns all elements in the group.
*/
export declare const $firstN: (coll: AnyObject[], expr: InputExpr, options: Options) => unknown[];
export {};