Installation
npm install --save @types/imagemin
Summary
This package contains type definitions for imagemin (https://github.com/imagemin/imagemin#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imagemin.
declare function imagemin(input: readonly string[], options?: Options): Promise<Result[]>;
declare namespace imagemin {
function buffer(input: Buffer, options?: BufferOptions): Promise<Buffer>;
}
export type Plugin = (input: Buffer) => Promise<Buffer>;
export interface Options {
destination?: string | undefined;
plugins: readonly Plugin[];
glob?: boolean | undefined;
}
export interface Result {
data: Buffer;
sourcePath: string;
destinationPath: string;
}
export interface BufferOptions {
plugins: readonly Plugin[];
}
export default imagemin;
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: @types/node
Credits
These definitions were written by Romain Faust, and Jeff Chan.