Skip to content

Commit

Permalink
feat(NODE-4774): deprecate cursor forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Apr 5, 2023
1 parent 4b3e32d commit 5e8394f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cursor/abstract_cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ export abstract class AbstractCursor<
* If the iterator returns `false`, iteration will stop.
*
* @param iterator - The iteration callback.
* @deprecated - Will be removed in a future release. Use for await...of instead.
*/
async forEach(iterator: (doc: TSchema) => boolean | void): Promise<void> {
if (typeof iterator !== 'function') {
Expand Down

0 comments on commit 5e8394f

Please sign in to comment.