From 2664a12fa013bed78bcdd8cecf44b3d10ca80ae7 Mon Sep 17 00:00:00 2001 From: William Lohan Date: Tue, 13 Feb 2018 13:14:42 -0800 Subject: [PATCH] fix gifffer --- types/gifffer/gifffer-tests.ts | 2 +- types/gifffer/index.d.ts | 20 +++++++++++++------- types/gifffer/tsconfig.json | 5 ++--- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/types/gifffer/gifffer-tests.ts b/types/gifffer/gifffer-tests.ts index b069e0020c..03d54f0d89 100644 --- a/types/gifffer/gifffer-tests.ts +++ b/types/gifffer/gifffer-tests.ts @@ -1,4 +1,4 @@ -import Gifffer from 'gifffer'; +import * as Gifffer from 'gifffer'; let gifs: HTMLButtonElement[]; diff --git a/types/gifffer/index.d.ts b/types/gifffer/index.d.ts index ac0f7663cc..c9742d31b8 100644 --- a/types/gifffer/index.d.ts +++ b/types/gifffer/index.d.ts @@ -3,15 +3,21 @@ // Definitions by: William Lohan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/** - * @see {@link https://github.com/krasimir/gifffer#styling|Styling} - */ -export interface GiffferOptions { - playButtonStyles: { [style: string]: string; }; - playButtonIconStyles: { [style: string]: string; }; +declare namespace Gifffer { + /** + * @see {@link https://github.com/krasimir/gifffer#styling|Styling} + */ + interface GiffferOptions { + playButtonStyles: { [style: string]: string; }; + playButtonIconStyles: { [style: string]: string; }; + } } /** * @see {@link https://github.com/krasimir/gifffer#usage|Usage} */ -export default function Gifffer(options?: GiffferOptions): HTMLButtonElement[]; +declare function Gifffer(options?: Gifffer.GiffferOptions): HTMLButtonElement[]; + +export as namespace Gifffer; + +export = Gifffer; diff --git a/types/gifffer/tsconfig.json b/types/gifffer/tsconfig.json index e5d099d008..273e998048 100644 --- a/types/gifffer/tsconfig.json +++ b/types/gifffer/tsconfig.json @@ -15,11 +15,10 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, - "esModuleInterop": true + "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", "gifffer-tests.ts" ] -} \ No newline at end of file +}