easy-speech icon indicating copy to clipboard operation
easy-speech copied to clipboard

Typescript types don't work out of the box

Open enyo opened this issue 1 year ago • 4 comments

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"
    }
  }
},

enyo avatar Mar 28 '24 09:03 enyo

Please try [email protected] and let me know if things work as expected

jankapunkt avatar Apr 25 '24 07:04 jankapunkt

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

annam002 avatar Jul 25 '24 12:07 annam002

@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

jankapunkt avatar Jul 29 '24 10:07 jankapunkt

@jankapunkt yes that worked. Thanks!

enyo avatar Aug 01 '24 09:08 enyo