mingo
Version:
MongoDB query language for in-memory objects
12 lines (11 loc) • 434 B
TypeScript
import { Any, Options } from "../../types";
interface InputExpr {
n: Any;
input: Any;
}
/**
* Returns an aggregation of the last 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, $lastN returns all elements in the group.
*/
export declare const $lastN: (coll: Any[], expr: InputExpr, options: Options) => unknown[];
export {};