Nonlinear Performance Magnification

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

    8.0.1 • 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

    // Type definitions for gulp-imagemin 8.0
    // Project: https://github.com/sindresorhus/gulp-imagemin#readme
    // Definitions by: Romain Faust <https://github.com/romain-faust>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    /// <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?: ReadonlyArray<Plugin> | imagemin.Options): Transform;
    declare function imagemin(plugins?: ReadonlyArray<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.

    Keywords

    none

    Install

    npm i @types/gulp-imagemin

    DownloadsWeekly Downloads

    6,069

    Version

    8.0.1

    License

    MIT

    Unpacked Size

    5.65 kB

    Total Files

    4

    Last publish

    Collaborators

    • types