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; } } diff --git a/resemblejs/index.d.ts b/resemblejs/index.d.ts index 7b1801ad35..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,5 +94,3 @@ declare namespace Resemble { analysisTime: number; } } - -declare var resemble: Resemble.ResembleStatic;