diff --git a/types/express-serve-static-core/index.d.ts b/types/express-serve-static-core/index.d.ts index 334d09eac0..2e431d8ad3 100644 --- a/types/express-serve-static-core/index.d.ts +++ b/types/express-serve-static-core/index.d.ts @@ -575,10 +575,8 @@ export interface Response extends http.ServerResponse, Express.Response { * * @api public */ - sendFile(path: string): void; - sendFile(path: string, options: any): void; - sendFile(path: string, fn: Errback): void; - sendFile(path: string, options: any, fn: Errback): void; + sendFile(path: string, fn?: Errback): void; + sendFile(path: string, options: any, fn?: Errback): void; /** * @deprecated Use sendFile instead. @@ -610,11 +608,9 @@ export interface Response extends http.ServerResponse, Express.Response { * * This method uses `res.sendfile()`. */ - download(path: string): void; - download(path: string, filename: string): void; - download(path: string, fn: Errback): void; - download(path: string, filename: string, fn: Errback): void; - download(path: string, filename: string, options: any, fn: Errback): void; + download(path: string, fn?: Errback): void; + download(path: string, filename: string, fn?: Errback): void; + download(path: string, filename: string, options: any, fn?: Errback): void; /** * Set _Content-Type_ response header with `type` through `mime.lookup()`