Skip to content

fix(types): update autoOrient type to include undefined - #4362

Merged
lovell merged 1 commit into
lovell:mainfrom
styfle:patch-2
Apr 4, 2025
Merged

lovell merged 1 commit into
lovell:mainfrom
styfle:patch-2

Conversation

@styfle

@styfle styfle commented Apr 4, 2025 •

Copy link
Copy Markdown
Contributor

This PR fixes the following error:

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'.

The bug was introduced in:

This PR fixes the following error:

```
node_modules/.pnpm/[email protected]/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'.
```
@styfle

styfle commented Apr 4, 2025 •

Copy link
Copy Markdown
Contributor Author

I discovered this when updating vercel/next.js here:

cc @lovell

@lovell
lovell merged commit 3c7dbb8 into lovell:main Apr 4, 2025
@lovell lovell added this to the v0.34.1 milestone Apr 4, 2025
@lovell

lovell commented Apr 4, 2025

Copy link
Copy Markdown
Owner

Thank you Steven!

@styfle
styfle deleted the patch-2 branch April 4, 2025 21:22
lovell added a commit that referenced this pull request Apr 7, 2025
hanzo-dev pushed a commit to hanzoai/sharp that referenced this pull request Sep 9, 2026
This PR fixes the following error:

```
node_modules/.pnpm/[email protected]/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'.
```
hanzo-dev pushed a commit to hanzoai/sharp that referenced this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants