TypeScript: withMetadata accepts boolean (#3823)

This commit is contained in:
Thomas
2023-10-11 20:38:13 +01:00
committed by GitHub
parent 47e76c9981
commit e6942805b4
2 changed files with 8 additions and 5 deletions

View File

@@ -659,3 +659,6 @@ sharp('input.tiff').webp({ preset: 'drawing' }).toFile('out.webp');
sharp('input.tiff').webp({ preset: 'text' }).toFile('out.webp');
sharp('input.tiff').webp({ preset: 'default' }).toFile('out.webp');
// Allow a boolean or an object for metadata options.
// https://github.com/lovell/sharp/issues/3822
sharp(input).withMetadata().withMetadata({}).withMetadata(false);