Types for imagemin-pngquant (#35068)

* clear to tests

* clear to tests

* clear to tests

* tslint passed
This commit is contained in:
TokugawaT_YD
2019-04-28 23:54:54 -07:00
committed by Wesley Wigham
parent 99c7e06f5e
commit 088f477d65
4 changed files with 65 additions and 0 deletions
@@ -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
})
]
});
+25
View File
@@ -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;
+23
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }