From 8da1ba7b5d1c17c80e6c206d98372fc0b35992ce Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Thu, 24 Dec 2015 23:57:59 +0000 Subject: [PATCH] Add some docs to Resemble.js --- resemblejs/resemblejs.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/resemblejs/resemblejs.d.ts b/resemblejs/resemblejs.d.ts index 7ebb90bb7..b2e1b1299 100644 --- a/resemblejs/resemblejs.d.ts +++ b/resemblejs/resemblejs.d.ts @@ -5,7 +5,14 @@ declare namespace Resemble { interface ResembleStatic { + /** + * Retrieve basic analysis on one image (add compareTo to compare with another). + */ (image: string|ImageData): ResembleAnalysis; + + /** + * Set the resemblance image output style + */ outputSettings(settings: OutputSettings): ResembleStatic; } @@ -21,7 +28,14 @@ declare namespace Resemble { } interface ResembleAnalysis { + /** + * Run the analysis and get the result + */ onComplete(callback: (result: ResembleAnalysisResult) => void): void; + + /** + * Compare this image to another image, to get resemblance data + */ compareTo(fileData: string|ImageData): ResembleComparison; } @@ -33,6 +47,14 @@ declare namespace Resemble { } interface ResembleComparison { + /** + * Run the analysis and get the result + */ + onComplete(callback: (result: ResembleAnalysisResult) => void): void; + + /** + * Run the analysis and get the comparison result + */ onComplete(callback: (result: ResembleComparisonResult) => void): void; ignoreNothing(): ResembleComparison;