From 7d3e93b80d9c7d07d986a2e580618c23be99914d Mon Sep 17 00:00:00 2001 From: Mikael Kohlmyr Date: Tue, 7 Mar 2017 13:25:21 +0100 Subject: [PATCH 1/2] Fix es6 import for blueimp-md5. --- blueimp-md5/blueimp-md5-tests.ts | 7 +++---- blueimp-md5/index.d.ts | 8 +++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/blueimp-md5/blueimp-md5-tests.ts b/blueimp-md5/blueimp-md5-tests.ts index 18edc69b57..1e2348dc7b 100644 --- a/blueimp-md5/blueimp-md5-tests.ts +++ b/blueimp-md5/blueimp-md5-tests.ts @@ -1,6 +1,5 @@ +import * as md5 from "blueimp-md5"; -import blueimp = require('blueimp-md5'); - -function hash(): boolean { - return blueimp.md5('hello world') === '5eb63bbbe01eeed093cb22bb8f5acdc3'; +function hash1(): string { + return md5('hello world'); } diff --git a/blueimp-md5/index.d.ts b/blueimp-md5/index.d.ts index b51f554e32..656bd4316b 100644 --- a/blueimp-md5/index.d.ts +++ b/blueimp-md5/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for blueimp-md5 v1.1.0 +// Type definitions for blueimp-md5 v2.7.0 // Project: https://github.com/blueimp/JavaScript-MD5 -// Definitions by: Ray Martone +// Definitions by: Ray Martone , Mikael Kohlmyr // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export declare function md5(value: string, key?: string, raw?: boolean): string; +declare function md5(value: string, key?: string, raw?: boolean): string; +declare namespace md5 { } +export = md5; From 94692a26d73bf75defb05e8da5f4d618ff27932d Mon Sep 17 00:00:00 2001 From: Mikael Kohlmyr Date: Thu, 23 Mar 2017 14:11:24 +0100 Subject: [PATCH 2/2] Fix es6 import for blueimp-md5. --- blueimp-md5/blueimp-md5-tests.ts | 2 +- blueimp-md5/index.d.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/blueimp-md5/blueimp-md5-tests.ts b/blueimp-md5/blueimp-md5-tests.ts index 1e2348dc7b..0b59ae2f24 100644 --- a/blueimp-md5/blueimp-md5-tests.ts +++ b/blueimp-md5/blueimp-md5-tests.ts @@ -1,4 +1,4 @@ -import * as md5 from "blueimp-md5"; +import md5 = require("blueimp-md5"); function hash1(): string { return md5('hello world'); diff --git a/blueimp-md5/index.d.ts b/blueimp-md5/index.d.ts index 656bd4316b..881d5c7afe 100644 --- a/blueimp-md5/index.d.ts +++ b/blueimp-md5/index.d.ts @@ -4,5 +4,4 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare function md5(value: string, key?: string, raw?: boolean): string; -declare namespace md5 { } export = md5;