mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
[express-serve-static-core] Correct overload for Response.download() (#35043)
* [express-serve-static-core] Correct overload for Response.download() * [express-serve-static-core] Unify res.sendFile and res.download overloads
This commit is contained in:
committed by
Wesley Wigham
parent
53230a10b3
commit
4344efdf84
+5
-9
@@ -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()`
|
||||
|
||||
Reference in New Issue
Block a user