From a0466280f37ee00cf532610f94a13d1220b25fd5 Mon Sep 17 00:00:00 2001 From: Sefa Ilkimen Date: Tue, 14 Aug 2018 17:47:29 +0200 Subject: [PATCH 1/2] [express-fileupload]: add promised `.mv()` signature `.mv()` returns a Promise when callback argument is not provided --- types/express-fileupload/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/express-fileupload/index.d.ts b/types/express-fileupload/index.d.ts index 89331c066a..752581d612 100644 --- a/types/express-fileupload/index.d.ts +++ b/types/express-fileupload/index.d.ts @@ -29,6 +29,7 @@ declare namespace fileUpload { mimetype: string; data: Buffer; mv(path: string, callback: (err: any) => void): void; + mv(path: string): Promise; } interface Options { From 67c528c7e37440e77a71a984c7e36f05b9888c50 Mon Sep 17 00:00:00 2001 From: Sefa Ilkimen Date: Tue, 14 Aug 2018 18:10:55 +0200 Subject: [PATCH 2/2] [express-fileupload]: add missing options and properties add missing `abortOnLimit` option and `truncated` property --- types/express-fileupload/index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/express-fileupload/index.d.ts b/types/express-fileupload/index.d.ts index 752581d612..060476b109 100644 --- a/types/express-fileupload/index.d.ts +++ b/types/express-fileupload/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for express-fileupload 0.1 +// Type definitions for express-fileupload 0.4 // Project: https://github.com/richardgirges/express-fileupload#readme // Definitions by: Gintautas Miselis +// Sefa Ilkimen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -28,6 +29,7 @@ declare namespace fileUpload { encoding: string; mimetype: string; data: Buffer; + truncated: boolean; mv(path: string, callback: (err: any) => void): void; mv(path: string): Promise; } @@ -36,6 +38,7 @@ declare namespace fileUpload { debug?: boolean; safeFileNames?: boolean; preserveExtension?: boolean | string | number; + abortOnLimit?: boolean; [property: string]: any; } }