mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Types for imagemin-pngquant (#35068)
* clear to tests * clear to tests * clear to tests * tslint passed
This commit is contained in:
committed by
Wesley Wigham
parent
99c7e06f5e
commit
088f477d65
@@ -0,0 +1,16 @@
|
||||
import imagemin = require('imagemin');
|
||||
import imageminPngquant = require('imagemin-pngquant');
|
||||
|
||||
imagemin(['*.png'], {
|
||||
plugins: [
|
||||
imageminPngquant(),
|
||||
imageminPngquant({
|
||||
speed: 11,
|
||||
strip: true,
|
||||
quality: [0.4, 0.5],
|
||||
dithering: 0,
|
||||
posterize: 1,
|
||||
verbose: true
|
||||
})
|
||||
]
|
||||
});
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for imagemin-pngquant 7.0
|
||||
// Project: https://github.com/imagemin/imagemin-pngquant
|
||||
// Definitions by: Takesi Tokugawa <https://github.com/TokugawaTakesi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Plugin } from 'imagemin';
|
||||
import { Stream } from 'stream';
|
||||
|
||||
declare function imageminPngquant(options?: ImageminPngquant.Options): Plugin;
|
||||
|
||||
declare namespace ImageminPngquant {
|
||||
interface Options {
|
||||
speed?: number;
|
||||
strip?: boolean;
|
||||
quality?: [number, number];
|
||||
dithering?: number | boolean;
|
||||
posterize?: number;
|
||||
verbose?: boolean;
|
||||
input?: Buffer | Stream;
|
||||
}
|
||||
}
|
||||
|
||||
export = imageminPngquant;
|
||||
@@ -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",
|
||||
"imagemin-pngquant-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user