diff --git a/types/jpeg-autorotate/index.d.ts b/types/jpeg-autorotate/index.d.ts index 8a476ed25a..b2b5644adb 100644 --- a/types/jpeg-autorotate/index.d.ts +++ b/types/jpeg-autorotate/index.d.ts @@ -30,7 +30,7 @@ export interface RotateDimensions { export function rotate( path_or_buffer: string | Buffer, - options?: RotateOptions, + options: RotateOptions, ): Promise<{ buffer: Buffer; orientation: number; @@ -40,7 +40,7 @@ export function rotate( export function rotate( path_or_buffer: string | Buffer, - options?: RotateOptions, + options: RotateOptions, module_callback?: ( error: CustomError | null, buffer: Buffer, diff --git a/types/jpeg-autorotate/jpeg-autorotate-tests.ts b/types/jpeg-autorotate/jpeg-autorotate-tests.ts index c93bb49104..66cb10f6a9 100644 --- a/types/jpeg-autorotate/jpeg-autorotate-tests.ts +++ b/types/jpeg-autorotate/jpeg-autorotate-tests.ts @@ -1,7 +1,7 @@ import * as jo from "jpeg-autorotate"; -jo.rotate("img.jpg"); -jo.rotate(new Buffer("")); +jo.rotate("img.jpg", {}); +jo.rotate(new Buffer(""), {}); jo.rotate(new Buffer(""), { quality: 50 }); jo.rotate("img.jpg", { quality: 100 }, (error, buffer, orientation, dimensions, quality) => { if (error && error.code === jo.errors.correct_orientation) {