@types/gulp-imagemin
TypeScript icon, indicating that this package has built-in type declarations

8.0.6 • Public • Published

Installation

npm install --save @types/gulp-imagemin

Summary

This package contains type definitions for gulp-imagemin (https://github.com/sindresorhus/gulp-imagemin#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-imagemin.

index.d.ts

/// <reference types="node" />

import { Plugin } from "imagemin";
import { Options as GifsicleOptions } from "imagemin-gifsicle";
import { Options as MozjpegOptions } from "imagemin-mozjpeg";
import { Options as OptipngOptions } from "imagemin-optipng";
import { Options as SvgoOptions } from "imagemin-svgo";
import { Transform } from "stream";

declare function imagemin(pluginsOrOptions?: readonly Plugin[] | imagemin.Options): Transform;
declare function imagemin(plugins?: readonly Plugin[], options?: imagemin.Options): Transform;

declare namespace imagemin {
    interface Options {
        silent?: boolean | undefined;
        verbose?: boolean | undefined;
    }

    type PluginFactory<T> = (options?: T) => Plugin;

    const gifsicle: PluginFactory<GifsicleOptions>;
    const mozjpeg: PluginFactory<MozjpegOptions>;
    const optipng: PluginFactory<OptipngOptions>;
    const svgo: PluginFactory<SvgoOptions>;
}

export = imagemin;

Additional Details

Credits

These definitions were written by Romain Faust.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/gulp-imagemin

Weekly Downloads

5,091

Version

8.0.6

License

MIT

Unpacked Size

5.13 kB

Total Files

5

Last publish

Collaborators

  • types