Skip to content

Commit 6c233fa

Browse files
committed
Fixed broken compilation of express types
1 parent 3f10d07 commit 6c233fa

File tree

12 files changed

+40
-45
lines changed

12 files changed

+40
-45
lines changed

lib/cache.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cache.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/gridfs.d.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/// <reference types="node" />
22
/// <reference types="node" />
3-
import { EventEmitter } from 'events';
3+
import { EventEmitter } from 'node:events';
44
import { Db, GridFSBucketWriteStream, MongoClient, MongoClientOptions } from 'mongodb';
5-
import { Request } from 'express';
65
import { StorageEngine } from 'multer';
76
import { Cache } from './cache';
87
import { GridFile, ConnectionResult, NodeCallback, UrlStorageOptions, DbStorageOptions } from './types';
@@ -62,14 +61,14 @@ export declare class GridFsStorage extends EventEmitter implements StorageEngine
6261
* @param {File} file - The uploaded file stream
6362
* @param cb - A standard node callback to signal the end of the upload or an error
6463
**/
65-
_handleFile(request: Request, file: any, cb: NodeCallback): void;
64+
_handleFile(request: any, file: any, cb: NodeCallback): void;
6665
/**
6766
* Storage interface method to delete files in case an error turns the request invalid
6867
* @param request - The request that trigger the upload
6968
* @param {File} file - The uploaded file stream
7069
* @param cb - A standard node callback to signal the end of the upload or an error
7170
**/
72-
_removeFile(request: Request, file: any, cb: NodeCallback): void;
71+
_removeFile(request: any, file: any, cb: NodeCallback): void;
7372
/**
7473
* Waits for the MongoDb connection associated to the storage to succeed or fail
7574
*/
@@ -80,15 +79,15 @@ export declare class GridFsStorage extends EventEmitter implements StorageEngine
8079
* @param {File} file - The file stream to pipe
8180
* @return {Promise} Resolves with the uploaded file
8281
*/
83-
fromFile(request: Request, file: any): Promise<GridFile>;
82+
fromFile(request: any, file: any): Promise<GridFile>;
8483
/**
8584
* Pipes the file stream to the MongoDb database. The request and file parameters are optional and used for file generation only
8685
* @param readStream - The http request where the file was uploaded
8786
* @param [request] - The http request where the file was uploaded
8887
* @param {File} [file] - The file stream to pipe
8988
* @return Resolves with the uploaded file
9089
*/
91-
fromStream(readStream: NodeJS.ReadableStream, request: Request, file: any): Promise<GridFile>;
90+
fromStream(readStream: NodeJS.ReadableStream, request: any, file: any): Promise<GridFile>;
9291
protected _openConnection(url: string, options: MongoClientOptions): Promise<ConnectionResult>;
9392
/**
9493
* Create a writable stream with backwards compatibility with GridStore

lib/gridfs.js

Lines changed: 7 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)