mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add type definitions for pngquant-bin (#25159)
This commit is contained in:
parent
ce61935ac8
commit
19493d0fb1
9
types/pngquant-bin/index.d.ts
vendored
Normal file
9
types/pngquant-bin/index.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Type definitions for pngquant-bin 4.0
|
||||
// Project: https://github.com/imagemin/pngquant-bin#readme
|
||||
// Definitions by: Hirotaka Ikoma <https://github.com/hikoma>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
declare const pngquant: string;
|
||||
export = pngquant;
|
||||
6
types/pngquant-bin/pngquant-bin-tests.ts
Normal file
6
types/pngquant-bin/pngquant-bin-tests.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { execFile } from "child_process";
|
||||
import * as pngquant from "pngquant-bin";
|
||||
|
||||
execFile(pngquant, ["-o", "output.png", "input.png"], { encoding: "utf-8" }, (err: Error | null) => {
|
||||
console.log("Image minified!");
|
||||
});
|
||||
23
types/pngquant-bin/tsconfig.json
Normal file
23
types/pngquant-bin/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",
|
||||
"pngquant-bin-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/pngquant-bin/tslint.json
Normal file
1
types/pngquant-bin/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user