You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param callback - called when the cursor is successfully closed or an error occurred.
187
187
*/
188
-
abort(callback?: Callback<void>): void{
189
-
this.push(null);
190
-
this.destroyed=true;
191
-
if(this.s.cursor){
192
-
this.s.cursor.close(error=>{
193
-
this.emit(GridFSBucketReadStream.CLOSE);
194
-
callback&&callback(error);
195
-
});
196
-
}else{
197
-
if(!this.s.init){
198
-
// If not initialized, fire close event because we will never
199
-
// get a cursor
200
-
this.emit(GridFSBucketReadStream.CLOSE);
188
+
abort(): Promise<void>;
189
+
/** @deprecated Callbacks are deprecated and will be removed in the next major version. See [mongodb-legacy](https://github.com/mongodb-js/nodejs-mongodb-legacy) for migration assistance */
0 commit comments