borgar / numfmt

Full ECMA-376 number and date formatting in JavaScript
40 stars 9 forks source link

Typescript: TS7016: Could not find a declaration file for module 'numfmt' #52

Closed mreiden closed 3 months ago

mreiden commented 3 months ago

Adding a types export fixes the issue for me:

--- a/node_modules/numfmt/package.json
+++ b/node_modules/numfmt/package.json
@@ -19,6 +19,7 @@
   "exports": {
     ".": {
       "require": "./dist/numfmt.js",
+      "types": "./dist/numfmt.d.ts",
       "default": "./lib/index.js"
     }
   },
borgar commented 3 months ago

Thanks for reporting, 3.1.1 has been published. 🙂