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 | // Type definitions for gulp-imagemin 8.0
|
12 | // Project: https://github.com/sindresorhus/gulp-imagemin#readme
|
13 | // Definitions by: Romain Faust <https://github.com/romain-faust>
|
14 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
15 |
|
16 | /// <reference types="node" />
|
17 |
|
18 | import { Plugin } from 'imagemin';
|
19 | import { Options as GifsicleOptions } from 'imagemin-gifsicle';
|
20 | import { Options as MozjpegOptions } from 'imagemin-mozjpeg';
|
21 | import { Options as OptipngOptions } from 'imagemin-optipng';
|
22 | import { Options as SvgoOptions } from 'imagemin-svgo';
|
23 | import { Transform } from 'stream';
|
24 |
|
25 | declare function imagemin(pluginsOrOptions?: ReadonlyArray<Plugin> | imagemin.Options): Transform;
|
26 | declare function imagemin(plugins?: ReadonlyArray<Plugin>, options?: imagemin.Options): Transform;
|
27 |
|
28 | declare namespace imagemin {
|
29 | interface Options {
|
30 | silent?: boolean | undefined;
|
31 | verbose?: boolean | undefined;
|
32 | }
|
33 |
|
34 | type PluginFactory<T> = (options?: T) => Plugin;
|
35 |
|
36 | const gifsicle: PluginFactory<GifsicleOptions>;
|
37 | const mozjpeg: PluginFactory<MozjpegOptions>;
|
38 | const optipng: PluginFactory<OptipngOptions>;
|
39 | const svgo: PluginFactory<SvgoOptions>;
|
40 | }
|
41 |
|
42 | export = imagemin;
|
43 |
|
44 | ````
|
45 |
|
46 | ### Additional Details
|
47 | * Last updated: Wed, 23 Feb 2022 18:01:45 GMT
|
48 | * 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)
|
49 | * Global values: none
|
50 |
|
51 | # Credits
|
52 | These definitions were written by [Romain Faust](https://github.com/romain-faust).
|
53 |
|
\ | No newline at end of file |