mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-26 19:04:13 +08:00
Merge pull request #28385 from romain-faust/imagemin-svgo
[@types/imagemin-svgo] Add type definitions
This commit is contained in:
9
types/imagemin-svgo/imagemin-svgo-tests.ts
Normal file
9
types/imagemin-svgo/imagemin-svgo-tests.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import imagemin = require('imagemin');
|
||||
import imageminSvgo = require('imagemin-svgo');
|
||||
|
||||
imagemin(['*.svg'], {
|
||||
plugins: [
|
||||
imageminSvgo(),
|
||||
imageminSvgo({ floatPrecision: 2 })
|
||||
]
|
||||
});
|
||||
16
types/imagemin-svgo/index.d.ts
vendored
Normal file
16
types/imagemin-svgo/index.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Type definitions for imagemin-svgo 7.0
|
||||
// Project: https://github.com/imagemin/imagemin-svgo#readme
|
||||
// Definitions by: Romain Faust <https://github.com/romain-faust>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import { Plugin } from 'imagemin';
|
||||
import { Options as SvgoOptions } from 'svgo';
|
||||
|
||||
declare function imageminSvgo(options?: imageminSvgo.Options): Plugin;
|
||||
|
||||
declare namespace imageminSvgo {
|
||||
type Options = SvgoOptions;
|
||||
}
|
||||
|
||||
export = imageminSvgo;
|
||||
23
types/imagemin-svgo/tsconfig.json
Normal file
23
types/imagemin-svgo/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-svgo-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/imagemin-svgo/tslint.json
Normal file
1
types/imagemin-svgo/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user