From e4e75c6498001bf2f5e48386c9682a3054650e06 Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Thu, 6 Oct 2016 11:33:29 +0200 Subject: [PATCH 1/3] resemblejs typings did not work at all --- resemblejs/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resemblejs/index.d.ts b/resemblejs/index.d.ts index 7b1801ad35..69c3356797 100644 --- a/resemblejs/index.d.ts +++ b/resemblejs/index.d.ts @@ -95,3 +95,7 @@ declare namespace Resemble { } declare var resemble: Resemble.ResembleStatic; + +declare module "resemblejs" { + export = resemble; +} From 491d5379dca729dd76097f11931d37afe81e1b37 Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Fri, 7 Oct 2016 09:53:56 +0200 Subject: [PATCH 2/3] process review comment --- resemblejs/index.d.ts | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/resemblejs/index.d.ts b/resemblejs/index.d.ts index 69c3356797..166beb186b 100644 --- a/resemblejs/index.d.ts +++ b/resemblejs/index.d.ts @@ -3,18 +3,19 @@ // Definitions by: Tim Perry // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace Resemble { - interface ResembleStatic { - /** - * Retrieve basic analysis for a single image (add compareTo to compare with another). - */ - (image: string|ImageData): ResembleAnalysis; +export = Resemble; +export as namespace resemble; - /** - * Set the resemblance image output style - */ - outputSettings(settings: OutputSettings): ResembleStatic; - } +/** + * Retrieve basic analysis for a single image (add compareTo to compare with another). + */ +declare function Resemble(image: string | ImageData): Resemble.ResembleAnalysis; + +declare namespace Resemble { + /** + * Set the resemblance image output style + */ + function outputSettings(settings: OutputSettings): typeof Resemble; interface OutputSettings { errorColor: { @@ -36,7 +37,7 @@ declare namespace Resemble { /** * Compare this image to another image, to get resemblance data */ - compareTo(fileData: string|ImageData): ResembleComparison; + compareTo(fileData: string | ImageData): ResembleComparison; } interface ResembleAnalysisResult { @@ -93,9 +94,3 @@ declare namespace Resemble { analysisTime: number; } } - -declare var resemble: Resemble.ResembleStatic; - -declare module "resemblejs" { - export = resemble; -} From 6bd2349f41dd9ea57d326702c2dfbe77fbbc8aa8 Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Mon, 10 Oct 2016 09:03:06 +0200 Subject: [PATCH 3/3] fix CI test failure --- phantomcss/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phantomcss/index.d.ts b/phantomcss/index.d.ts index 48829a1bbe..9f57e26c46 100644 --- a/phantomcss/index.d.ts +++ b/phantomcss/index.d.ts @@ -138,7 +138,7 @@ declare namespace PhantomCSS { prefixCount?: boolean; hideElements?: string; - outputSettings?: Resemble.OutputSettings; + outputSettings?: resemble.OutputSettings; } }