leaonline/easy-speech

Typescript types don't work out of the box

Closed this issue · 4 comments

enyo commented

After installing and importing the package, I get:

There are types at '.../node_modules/easy-speech/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'easy-speech' library may need to update its package.json or typings.

I'm not entirely sure, but I think changing the exports field to this should work:

"exports": {
  ".": {
    "import": {
      "types": "./dist/index.d.ts",
      "default": "./dist/EasySpeech.js"
    }
  }
},

Please try easy-speech@2.4.0-rc.0 and let me know if things work as expected

Ran into the same problem. Upgrading the version to 2.4.0-rc.0 fixed it for me.

@annam002 thanks for the feedback. I will release 2.4.0 this week, since there were no complaints on the rc so far. @enyo please let me know if there are still issues with types in the RC

enyo commented

@jankapunkt yes that worked. Thanks!