mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
[@types/gulp-imagemin] Add type definitions (#27692)
* Add koa-router's Router to koa's Context * [@types/gulp-imagemin] Add type definitions
This commit is contained in:
committed by
Sheetal Nandi
parent
9e7f1e9d6f
commit
16b85f0e2f
@@ -0,0 +1,20 @@
|
||||
import * as GulpImagemin from 'gulp-imagemin';
|
||||
|
||||
GulpImagemin();
|
||||
|
||||
GulpImagemin([
|
||||
GulpImagemin.gifsicle({ interlaced: true }),
|
||||
GulpImagemin.jpegtran({ progressive: true }),
|
||||
GulpImagemin.optipng({ optimizationLevel: 5 }),
|
||||
GulpImagemin.svgo({
|
||||
plugins: [{ removeViewBox: true }, { cleanupIDs: false }]
|
||||
})
|
||||
]);
|
||||
|
||||
GulpImagemin({ verbose: true });
|
||||
|
||||
GulpImagemin([
|
||||
GulpImagemin.svgo({
|
||||
plugins: [{ removeViewBox: true }]
|
||||
})
|
||||
], { verbose: true });
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Type definitions for gulp-imagemin 4.1
|
||||
// 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 { Transform } from 'stream';
|
||||
|
||||
declare function imagemin(pluginsOrOptions?: imagemin.Plugin[] | imagemin.Options): Transform;
|
||||
declare function imagemin(plugins?: imagemin.Plugin[], options?: imagemin.Options): Transform;
|
||||
|
||||
declare namespace imagemin {
|
||||
interface Options {
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
type Plugin = (input: any) => Promise<any>;
|
||||
type PluginFactory = (options?: any) => Plugin;
|
||||
|
||||
const gifsicle: PluginFactory;
|
||||
const jpegtran: PluginFactory;
|
||||
const optipng: PluginFactory;
|
||||
const svgo: PluginFactory;
|
||||
}
|
||||
|
||||
export = imagemin;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"gulp-imagemin-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user