We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1aa88a3 + 1c2d602 commit 5fca922Copy full SHA for 5fca922
types/query.d.ts
@@ -627,6 +627,12 @@ declare module 'mongoose' {
627
QueryOp
628
>;
629
630
+ /** Add pre middleware to this query instance. Doesn't affect other queries. */
631
+ pre(fn: Function): this;
632
+
633
+ /** Add post middleware to this query instance. Doesn't affect other queries. */
634
+ post(fn: Function): this;
635
636
/** Get/set the current projection (AKA fields). Pass `null` to remove the current projection. */
637
projection(fields?: ProjectionFields<DocType> | string): ProjectionFields<DocType>;
638
projection(fields: null): null;
0 commit comments