Skip to content

Commit a3408e6

Browse files
author
Thomas Reggi
authored
fix: removed geoNear deprecation
NODE-2834
1 parent 800e71e commit a3408e6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/cursor/aggregation_cursor.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { MongoError } from '../error';
22
import { Cursor, CursorOptions } from './cursor';
33
import { CursorState } from './core_cursor';
4-
import { deprecate } from 'util';
54
import type { AggregateOperation, AggregateOptions } from '../operations/aggregate';
65
import type { Document } from '../bson';
76
import type { Sort } from '../operations/find';
@@ -110,8 +109,8 @@ export class AggregationCursor extends Cursor<AggregateOperation, AggregationCur
110109

111110
// deprecated methods
112111
/** @deprecated Add a geoNear stage to the aggregation pipeline */
113-
geoNear = deprecate(($geoNear: Document) => {
112+
geoNear($geoNear: Document): this {
114113
this.operation.addToPipeline({ $geoNear });
115114
return this;
116-
}, 'The `$geoNear` stage is deprecated in MongoDB 4.0, and removed in version 4.2.');
115+
}
117116
}

0 commit comments

Comments
 (0)