Installation
npm install --save @types/imagemin-webp
Summary
This package contains type definitions for imagemin-webp (https://github.com/imagemin/imagemin-webp#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imagemin-webp.
import { Plugin } from "imagemin";
export default function imageminWebp(options?: Options): Plugin;
export type Preset = "default" | "photo" | "picture" | "drawing" | "icon" | "text";
export interface Resize {
width: number;
height: number;
}
export interface Crop extends Resize {
x: number;
y: number;
}
export type Metadata = "all" | "none" | "exif" | "icc" | "xmp";
export interface Options {
preset?: Preset | undefined;
quality?: number | undefined;
alphaQuality?: number | undefined;
method?: number | undefined;
size?: number | undefined;
sns?: number | undefined;
filter?: number | undefined;
autoFilter?: boolean | undefined;
sharpness?: number | undefined;
lossless?: boolean | undefined;
nearLossless?: number | undefined;
crop?: Crop | undefined;
resize?: Resize | undefined;
metadata?: Metadata | Metadata[] | undefined;
}
Additional Details
Credits
These definitions were written by Brett M, and Piotr Błażejewicz.