From 71d228d0372b9be039789000f669b68378bf39ba Mon Sep 17 00:00:00 2001 From: Raphael Schweikert Date: Sat, 31 Oct 2020 11:35:52 +0100 Subject: [PATCH] Export interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way it’s possible to use the types in calling code, e.g. to create a wrapper function that takes the same options. --- index.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/index.d.ts b/index.d.ts index 25710cd..5585698 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,7 +7,7 @@ /** * coordinate bounds */ -interface CoordBounds { +export interface CoordBounds { /** * X-coordinate of upper left corner */ @@ -29,7 +29,7 @@ interface CoordBounds { /** * bounded image */ -interface BoundedImage { +export interface BoundedImage { /** * image path or buffer */ @@ -43,7 +43,7 @@ interface BoundedImage { /** * The result obtained from the function. */ -interface LooksSameResult { +export interface LooksSameResult { /** * true if images are equal, false - otherwise */ @@ -58,12 +58,12 @@ interface LooksSameResult { diffClusters?: CoordBounds[]; } -type LooksSameCallback = (error: Error | null, result: LooksSameResult) => void; +export type LooksSameCallback = (error: Error | null, result: LooksSameResult) => void; /** * The options passed to looksSame function */ -interface LooksSameOptions { +export interface LooksSameOptions { /** * By default, it will detect only noticeable differences. If you wish to detect any difference, use strict options. */ @@ -117,7 +117,7 @@ interface LooksSameOptions { /** * The options passed to looksSame.createDiff function without diff */ -interface CreateDiffAsBufferOptions { +export interface CreateDiffAsBufferOptions { /** * The baseline image */ @@ -156,7 +156,7 @@ interface CreateDiffAsBufferOptions { /** * The options passed to looksSame.createDiff function */ -interface CreateDiffOptions extends CreateDiffAsBufferOptions { +export interface CreateDiffOptions extends CreateDiffAsBufferOptions { /** * The diff image path to store */ @@ -166,7 +166,7 @@ interface CreateDiffOptions extends CreateDiffAsBufferOptions { /** * Pass to looksSame.colors function */ -interface Color { +export interface Color { /** * Red */