diff --git a/types/pixelmatch/index.d.ts b/types/pixelmatch/index.d.ts index 0a2e4277ac..e40a63db53 100644 --- a/types/pixelmatch/index.d.ts +++ b/types/pixelmatch/index.d.ts @@ -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 // 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;