From 3c7dbb8fba9482b43c5926ad45c0a5543d887920 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 4 Apr 2025 16:53:46 -0400 Subject: [PATCH] fix(types): update `autoOrient` type to include undefined (#4362) This PR fixes the following error: ``` node_modules/.pnpm/sharp@0.34.0/node_modules/sharp/lib/index.d.ts(1590,15): error TS2430: Interface 'OverlayOptions' incorrectly extends interface 'SharpOptions'. Types of property 'autoOrient' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'undefined' is not assignable to type 'boolean'. ``` --- lib/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index a1c5f082..4167efce 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -971,7 +971,7 @@ declare namespace sharp { * * Using this option will remove the EXIF `Orientation` tag, if any. */ - autoOrient?: boolean; + autoOrient?: boolean | undefined; /** * When to abort processing of invalid pixel data, one of (in order of sensitivity): * 'none' (least), 'truncated', 'error' or 'warning' (most), highers level imply lower levels, invalid metadata will always abort. (optional, default 'warning')