diff --git a/ng-file-upload/index.d.ts b/ng-file-upload/index.d.ts index d9aadbd2d5..cc5a59b2bf 100644 --- a/ng-file-upload/index.d.ts +++ b/ng-file-upload/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Angular File Upload 11.1.1 +// Type definitions for Angular File Upload 12.2 // Project: https://github.com/danialfarid/ng-file-upload -// Definitions by: John Reilly +// Definitions by: John Reilly , +// Eduardo Garcia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -103,10 +104,12 @@ declare module 'angular' { interface FileResizeOptions { centerCrop?: boolean; height?: number; - ratio?: number; + pattern?: string; + ratio?: number | string; resizeIf?: ResizeIfFunction; restoreExif?: boolean; quality?: number; + type?: string; width?: number; } diff --git a/ng-file-upload/ng-file-upload-tests.ts b/ng-file-upload/ng-file-upload-tests.ts index 08fbafdb6b..cc7f98d5bf 100644 --- a/ng-file-upload/ng-file-upload-tests.ts +++ b/ng-file-upload/ng-file-upload-tests.ts @@ -85,9 +85,11 @@ class UploadController { ratio: 0.9, centerCrop: true, restoreExif: true, - resizeIf: (width: number, height: number) => { + resizeIf: (width: number, height: number) => { return true; - } + }, + pattern: '.jpg', + type: 'image/jpeg' }) .then((resizedFile) => { console.log(resizedFile);