From d2c8ac776a618503b40f986fadfa9cefa1e4f467 Mon Sep 17 00:00:00 2001 From: kinoshitajona Date: Thu, 5 Sep 2019 11:36:33 +0900 Subject: [PATCH] Add TypeScript types from DefinitelyTyped Co-authored-by: Dimitri Benin --- .gitignore | 3 ++- index.d.ts | 5 +++++ package.json | 8 +++++--- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 index.d.ts diff --git a/.gitignore b/.gitignore index d4e0402..44dfc9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ .DS_Store -coverage/ \ No newline at end of file +coverage/ +package-lock.json diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..72d0ab8 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,5 @@ +import { BaseConverter } from 'base-x'; + +declare const base58: BaseConverter; + +export = base58; diff --git a/package.json b/package.json index da0ca3c..7a51767 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bs58", - "version": "4.0.1", + "version": "4.0.2", "description": "Base 58 encoding / decoding", "keywords": [ "base58", @@ -23,15 +23,17 @@ "type": "git" }, "files": [ - "./index.js" + "./index.js", + "./index.d.ts" ], "main": "./index.js", + "types": "./index.d.ts", "scripts": { "standard": "standard", "test": "npm run standard && npm run unit", "unit": "tape test/index.js" }, "dependencies": { - "base-x": "^3.0.2" + "base-x": "^3.0.7" } }