mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-26 10:56:19 +08:00
Merge pull request #28384 from romain-faust/imagemin-optipng
[@types/imagemin-optipng] Add type definitions
This commit is contained in:
9
types/imagemin-optipng/imagemin-optipng-tests.ts
Normal file
9
types/imagemin-optipng/imagemin-optipng-tests.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import imagemin = require('imagemin');
|
||||
import imageminOptipng = require('imagemin-optipng');
|
||||
|
||||
imagemin(['*.png'], {
|
||||
plugins: [
|
||||
imageminOptipng(),
|
||||
imageminOptipng({ optimizationLevel: 2 })
|
||||
]
|
||||
});
|
||||
19
types/imagemin-optipng/index.d.ts
vendored
Normal file
19
types/imagemin-optipng/index.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Type definitions for imagemin-optipng 5.2
|
||||
// Project: https://github.com/imagemin/imagemin-optipng#readme
|
||||
// Definitions by: Romain Faust <https://github.com/romain-faust>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Plugin } from 'imagemin';
|
||||
|
||||
declare function imageminOptipng(options?: imageminOptipng.Options): Plugin;
|
||||
|
||||
declare namespace imageminOptipng {
|
||||
interface Options {
|
||||
bitDepthReduction?: boolean;
|
||||
colorTypeReduction?: boolean;
|
||||
optimizationLevel?: number;
|
||||
paletteReduction?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = imageminOptipng;
|
||||
23
types/imagemin-optipng/tsconfig.json
Normal file
23
types/imagemin-optipng/tsconfig.json
Normal 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-optipng-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/imagemin-optipng/tslint.json
Normal file
1
types/imagemin-optipng/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user