Skip to content

Commit 683a81c

Browse files
author
Maximilien Mellen
committed
Make type declarations pass strict mode
1 parent 031fe91 commit 683a81c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

index.d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export declare class Response {
149149
getHeader(key: string): string;
150150
hasHeader(key: string): boolean;
151151
removeHeader(key: string): this;
152-
getLink(s3Path: string, expires?: number, callback?: (err, data) => void);
152+
getLink(s3Path: string, expires?: number, callback?: ErrorCallback): Promise<string>;
153153
send(body: any): void;
154154
json(body: any): void;
155155
jsonp(body: any): void;
@@ -159,16 +159,16 @@ export declare class Response {
159159
redirect(status: number, path: string): void;
160160
redirect(path: string): void;
161161
cors(options: CorsOptions): this;
162-
error(message: string, detail?: any);
163-
error(code: number, message: string, detail?: any);
162+
error(message: string, detail?: any): void;
163+
error(code: number, message: string, detail?: any): void;
164164
cookie(name: string, value: string, options?: CookieOptions): this;
165165
clearCookie(name: string, options?: CookieOptions): this;
166166
etag(enable?: boolean): this;
167167
cache(age?: boolean | number | string, private?: boolean): this;
168168
modified(date: boolean | string | Date): this;
169169
attachment(fileName?: string): this;
170-
download(file: string | Buffer, fileName?: string, options?: FileOptions, callback?: ErrorCallback);
171-
sendFile(file: string | Buffer, options?: FileOptions, callback?: ErrorCallback);
170+
download(file: string | Buffer, fileName?: string, options?: FileOptions, callback?: ErrorCallback): void;
171+
sendFile(file: string | Buffer, options?: FileOptions, callback?: ErrorCallback): Promise<void>;
172172
}
173173

174174
export declare class API {
@@ -197,10 +197,10 @@ export declare class API {
197197

198198

199199

200-
use(path: string, ...middleware: Middleware[]);
201-
use(paths: string[], ...middleware: Middleware[]);
202-
use (...middleware: Middleware[]);
203-
use (...errorHandlingMiddleware: ErrorHandlingMiddleware[]);
200+
use(path: string, ...middleware: Middleware[]): void;
201+
use(paths: string[], ...middleware: Middleware[]): void;
202+
use(...middleware: Middleware[]): void;
203+
use(...errorHandlingMiddleware: ErrorHandlingMiddleware[]): void;
204204

205205
finally(callback: FinallyFunction): void;
206206

0 commit comments

Comments
 (0)