Skip to content

Commit

Permalink
feat(NODE-4774): deprecate cursor forEach (#3622)
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Apr 5, 2023
1 parent 2839e95 commit 8d76a71
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cursor/abstract_cursor.ts
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 8d76a71

Please sign in to comment.