mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
TypeScript: Ensure WebpOptions minSize is boolean (#3758)
This commit is contained in:
parent
2829e17743
commit
87562a5111
2
lib/index.d.ts
vendored
2
lib/index.d.ts
vendored
@ -1124,7 +1124,7 @@ declare namespace sharp {
|
|||||||
/** Level of CPU effort to reduce file size, integer 0-6 (optional, default 4) */
|
/** Level of CPU effort to reduce file size, integer 0-6 (optional, default 4) */
|
||||||
effort?: number | undefined;
|
effort?: number | undefined;
|
||||||
/** Prevent use of animation key frames to minimise file size (slow) (optional, default false) */
|
/** Prevent use of animation key frames to minimise file size (slow) (optional, default false) */
|
||||||
minSize?: number;
|
minSize?: boolean;
|
||||||
/** Allow mixture of lossy and lossless animation frames (slow) (optional, default false) */
|
/** Allow mixture of lossy and lossless animation frames (slow) (optional, default false) */
|
||||||
mixed?: boolean;
|
mixed?: boolean;
|
||||||
/** Preset options: one of default, photo, picture, drawing, icon, text (optional, default 'default') */
|
/** Preset options: one of default, photo, picture, drawing, icon, text (optional, default 'default') */
|
||||||
|
@ -524,7 +524,7 @@ sharp('input.tiff').jxl({ lossless: true }).toFile('out.jxl');
|
|||||||
sharp('input.tiff').jxl({ effort: 7 }).toFile('out.jxl');
|
sharp('input.tiff').jxl({ effort: 7 }).toFile('out.jxl');
|
||||||
|
|
||||||
// Support `minSize` and `mixed` webp options
|
// Support `minSize` and `mixed` webp options
|
||||||
sharp('input.tiff').webp({ minSize: 1000, mixed: true }).toFile('out.gif');
|
sharp('input.tiff').webp({ minSize: true, mixed: true }).toFile('out.gif');
|
||||||
|
|
||||||
// 'failOn' input param
|
// 'failOn' input param
|
||||||
sharp('input.tiff', { failOn: 'none' });
|
sharp('input.tiff', { failOn: 'none' });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user