rapideditor/country-coder

Types not added in package.json exports

iraticasi opened this issue · 1 comments

Package.json exports does not specify types, so declaration are not found when exports supported (moduleResolution: bundler in tsconfig)
It should be specified in package.json as:

  "type": "module",
  "source": "./src/country-coder.ts",
  "types": "./dist/country-coder.d.ts",
  "main": "./dist/country-coder.cjs",
  "module": "./dist/country-coder.mjs",
  "exports": {
+    "types": "./dist/country-coder.d.ts",
    "import": "./dist/country-coder.mjs",
    "require": "./dist/country-coder.cjs"
  },

Error

TS7016: Could not find a declaration file for module '@rapideditor/country-coder'. 'my-project/node_modules/@rapideditor/country-coder/dist/country-coder.mjs' implicitly has an 'any' type.   There are types at 'my-project/node_modules/@rapideditor/country-coder/dist/country-coder.d.ts', but this result could not be resolved when respecting package.json "exports". The '@rapideditor/country-coder' library may need to update its package.json or typings.

Sorry about that! I will push out a new version that includes this in the export map.