[@types/imagemin-jpegtran] Add type definitions

This commit is contained in:
Romain Faust
2018-08-25 17:45:42 +02:00
parent 00f8143ceb
commit f2a7f1dab3
4 changed files with 50 additions and 0 deletions
@@ -0,0 +1,9 @@
import imagemin = require('imagemin');
import imageminJpegtran = require('imagemin-jpegtran');
imagemin(['*.png'], {
plugins: [
imageminJpegtran(),
imageminJpegtran({ progressive: true })
]
});
+17
View File
@@ -0,0 +1,17 @@
// Type definitions for imagemin-jpegtran 5.0
// Project: https://github.com/imagemin/imagemin-jpegtran#readme
// Definitions by: Romain Faust <https://github.com/romain-faust>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Plugin } from 'imagemin';
declare function imageminJpegtran(options?: imageminJpegtran.Options): Plugin;
declare namespace imageminJpegtran {
interface Options {
arithmetic?: boolean;
progressive?: boolean;
}
}
export = imageminJpegtran;
+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-jpegtran-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }