mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
[@types/pixelmatch] Add missing types added in v5.0 (#36574)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
336f4afa7c
commit
00ebbce409
Vendored
+9
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for pixelmatch 4.0
|
||||
// Type definitions for pixelmatch 5.0
|
||||
// Project: https://github.com/mapbox/pixelmatch#readme
|
||||
// Definitions by: Oleg Repin <https://github.com/iamolegga>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -20,11 +20,19 @@ declare function Pixelmatch(
|
||||
options?: Options,
|
||||
): number;
|
||||
|
||||
type RGBTuple = [number, number, number];
|
||||
|
||||
interface Options {
|
||||
/** Matching threshold, ranges from 0 to 1. Smaller values make the comparison more sensitive. 0.1 by default. */
|
||||
readonly threshold?: number;
|
||||
/** If true, disables detecting and ignoring anti-aliased pixels. false by default. */
|
||||
readonly includeAA?: boolean;
|
||||
/* Blending factor of unchanged pixels in the diff output. Ranges from 0 for pure white to 1 for original brightness. 0.1 by default. */
|
||||
alpha?: number;
|
||||
/* The color of anti-aliased pixels in the diff output. [255, 255, 0] by default. */
|
||||
aaColor?: RGBTuple;
|
||||
/* The color of differing pixels in the diff output. [255, 0, 0] by default. */
|
||||
diffColor?: RGBTuple;
|
||||
}
|
||||
|
||||
export = Pixelmatch;
|
||||
|
||||
Reference in New Issue
Block a user