1 |
|
2 |
|
3 | import { Plugin } from "imagemin";
|
4 | import { Options as GifsicleOptions } from "imagemin-gifsicle";
|
5 | import { Options as MozjpegOptions } from "imagemin-mozjpeg";
|
6 | import { Options as OptipngOptions } from "imagemin-optipng";
|
7 | import { Options as SvgoOptions } from "imagemin-svgo";
|
8 | import { Transform } from "stream";
|
9 |
|
10 | declare function imagemin(pluginsOrOptions?: readonly Plugin[] | imagemin.Options): Transform;
|
11 | declare function imagemin(plugins?: readonly Plugin[], options?: imagemin.Options): Transform;
|
12 |
|
13 | declare namespace imagemin {
|
14 | interface Options {
|
15 | silent?: boolean | undefined;
|
16 | verbose?: boolean | undefined;
|
17 | }
|
18 |
|
19 | type PluginFactory<T> = (options?: T) => Plugin;
|
20 |
|
21 | const gifsicle: PluginFactory<GifsicleOptions>;
|
22 | const mozjpeg: PluginFactory<MozjpegOptions>;
|
23 | const optipng: PluginFactory<OptipngOptions>;
|
24 | const svgo: PluginFactory<SvgoOptions>;
|
25 | }
|
26 |
|
27 | export = imagemin;
|