There was an error while loading. Please reload this page.
1 parent 3ba9778 commit 1c2d602Copy full SHA for 1c2d602
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