From 1027eb6715b23fe3b042f3666c24b46ae088ddce Mon Sep 17 00:00:00 2001 From: damian Date: Mon, 27 Apr 2020 11:27:06 +0200 Subject: [PATCH] Accept Uint8ClampedArray for image data (#44259) Co-authored-by: Damian Frizzi --- types/pixelmatch/index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/pixelmatch/index.d.ts b/types/pixelmatch/index.d.ts index acf90a014b..707580d38e 100644 --- a/types/pixelmatch/index.d.ts +++ b/types/pixelmatch/index.d.ts @@ -2,15 +2,16 @@ // Project: https://github.com/mapbox/pixelmatch#readme // Definitions by: Oleg Repin // Piotr Błażejewicz +// Damian Frizzi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// declare function Pixelmatch( /** Image data of the first image to compare. Note: image dimensions must be equal. */ - img1: Buffer | Uint8Array, + img1: Buffer | Uint8Array | Uint8ClampedArray, /** Image data of the second image to compare. Note: image dimensions must be equal. */ - img2: Buffer | Uint8Array, + img2: Buffer | Uint8Array | Uint8ClampedArray, /** Image data to write the diff to, or null if don't need a diff image. */ output: Buffer | Uint8Array | null, /** Width of the images. Note that all three images need to have the same dimensions. */