[@types/pixelmatch] Add missing types added in v5.0 (#36574)

This commit is contained in:
Jake Richards
2019-07-01 11:12:12 -07:00
committed by Ryan Cavanaugh
parent 336f4afa7c
commit 00ebbce409
+9 -1
View File
@@ -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;