From ff774c2c643139f71b048ad6f69eb09e0f218405 Mon Sep 17 00:00:00 2001 From: Cameron Crothers Date: Tue, 18 Apr 2017 01:42:55 +1000 Subject: [PATCH] Fix error TS2497 on `import * as X from 'md5'`: (#15584) * Add support for es6 import syntax * Remove bad test name * Remove old test from tsconfig --- types/md5/index.d.ts | 11 +++++++---- types/md5/tsconfig.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/types/md5/index.d.ts b/types/md5/index.d.ts index 2ea591fcfa..7cfed0ca35 100644 --- a/types/md5/index.d.ts +++ b/types/md5/index.d.ts @@ -1,15 +1,18 @@ // Type definitions for md5 v2.1.0 // Project: https://github.com/pvorb/node-md5 -// Definitions by: Bill Sourour +// Definitions by: Bill Sourour , Cameron Crothers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// /** * js function for hashing messages with MD5 - * + * * @param {(string | Buffer)} message - a string or buffer to hash * @returns {string} the resultant MD5 hash of the given message */ -declare function main(message: string | Buffer): string; -export = main; +declare function md5(message: string | Buffer): string; + +declare namespace md5 {} + +export = md5; diff --git a/types/md5/tsconfig.json b/types/md5/tsconfig.json index 23854bdbe1..c3e5a225c7 100644 --- a/types/md5/tsconfig.json +++ b/types/md5/tsconfig.json @@ -19,4 +19,4 @@ "index.d.ts", "md5-tests.ts" ] -} \ No newline at end of file +}