1 | # Installation
|
2 | > `npm install --save @types/gulp-imagemin`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for gulp-imagemin (https://github.com/sindresorhus/gulp-imagemin#readme).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-imagemin.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-imagemin/index.d.ts)
|
10 | ````ts
|
11 | /// <reference types="node" />
|
12 |
|
13 | import { Plugin } from "imagemin";
|
14 | import { Options as GifsicleOptions } from "imagemin-gifsicle";
|
15 | import { Options as MozjpegOptions } from "imagemin-mozjpeg";
|
16 | import { Options as OptipngOptions } from "imagemin-optipng";
|
17 | import { Options as SvgoOptions } from "imagemin-svgo";
|
18 | import { Transform } from "stream";
|
19 |
|
20 | declare function imagemin(pluginsOrOptions?: readonly Plugin[] | imagemin.Options): Transform;
|
21 | declare function imagemin(plugins?: readonly Plugin[], options?: imagemin.Options): Transform;
|
22 |
|
23 | declare namespace imagemin {
|
24 | interface Options {
|
25 | silent?: boolean | undefined;
|
26 | verbose?: boolean | undefined;
|
27 | }
|
28 |
|
29 | type PluginFactory<T> = (options?: T) => Plugin;
|
30 |
|
31 | const gifsicle: PluginFactory<GifsicleOptions>;
|
32 | const mozjpeg: PluginFactory<MozjpegOptions>;
|
33 | const optipng: PluginFactory<OptipngOptions>;
|
34 | const svgo: PluginFactory<SvgoOptions>;
|
35 | }
|
36 |
|
37 | export = imagemin;
|
38 |
|
39 | ````
|
40 |
|
41 | ### Additional Details
|
42 | * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
|
43 | * Dependencies: [@types/imagemin](https://npmjs.com/package/@types/imagemin), [@types/imagemin-gifsicle](https://npmjs.com/package/@types/imagemin-gifsicle), [@types/imagemin-mozjpeg](https://npmjs.com/package/@types/imagemin-mozjpeg), [@types/imagemin-optipng](https://npmjs.com/package/@types/imagemin-optipng), [@types/imagemin-svgo](https://npmjs.com/package/@types/imagemin-svgo), [@types/node](https://npmjs.com/package/@types/node)
|
44 |
|
45 | # Credits
|
46 | These definitions were written by [Romain Faust](https://github.com/romain-faust).
|
47 |
|
\ | No newline at end of file |