mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Options are required (apparently)
This commit is contained in:
4
types/jpeg-autorotate/index.d.ts
vendored
4
types/jpeg-autorotate/index.d.ts
vendored
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user