From e06a6975ca699c9b09e09f85891a7a9e24710dd6 Mon Sep 17 00:00:00 2001 From: Hugo LEHMANN Date: Thu, 20 Jul 2017 12:10:18 +0200 Subject: [PATCH 1/2] add typings --- index.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..6bcc928 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,11 @@ +/** + * Returns the SHA-256 hash of `message` as an hexadecimal string. + * @param message The message to hash + */ +export function sha256(message: string | ArrayLike | Uint8Array | ArrayBuffer): string; + +/** + * Returns the SHA-224 hash of `message` as an hexadecimal string. + * @param message The message to hash + */ +export function sha224(message: string | ArrayLike | Uint8Array | ArrayBuffer): string; From 7aaab1d1cea0581d7d56b96127d39b0f5f71a582 Mon Sep 17 00:00:00 2001 From: Hugo LEHMANN Date: Thu, 20 Jul 2017 12:12:51 +0200 Subject: [PATCH 2/2] Include typings in package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index df3b640..688b8ac 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.6.0", "description": "A simple SHA-256 / SHA-224 hash function for JavaScript supports UTF-8 encoding.", "main": "src/sha256.js", + "typings": "index.d.ts", "devDependencies": { "expect.js": "~0.3.1", "jscoverage": "~0.5.9",