Open sandersn opened 3 years ago
I 've met the same issue. According to this doc
Also note that if your main declaration file is named index.d.ts and lives at the root of the package (next to index.js) you do not need to mark the types property, though it is advisable to do so.
However there is neither index.js
in the root nor types
field defined in the published package.json file.
Package.json doesn't have a
"types"
property anymore. There is a directory namedtypes.d.ts/
, but it's generated the same way as the other directories, and its package.json has pointers to non-existing files in../cjs
and../esm
. I don't think Typescript would be able to resolve types this way anyway (except maybe in TS 4.5 beta, which has some ESM support now).