TheWidlarzGroup / rn-emoji-keyboard

Super performant, lightweight, fully customizable emoji picker 🚀
https://thewidlarzgroup.github.io/rn-emoji-keyboard/
MIT License
326 stars 59 forks source link

Wrong Typescript definitions path in package.json #120

Closed renchap closed 1 year ago

renchap commented 1 year ago

Describe the bug When using the latest version in a Typescript project, Typescript complains no types are found:

file.tsx:9:37 - error TS7016: Could not find a declaration file for module 'rn-emoji-keyboard'. node_modules/rn-emoji-keyboard/lib/commonjs/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/rn-emoji-keyboard` if it exists or add a new declaration (.d.ts) file containing `declare module 'rn-emoji-keyboard';`

To Reproduce Use the library in a Typescript project, Typescript will complain no types can be found

Expected behavior Types are working

Source of the issue The index.d.ts file path defined for the types key in package.json is lib/typescript/index.d.ts, but the real file in the NPM package is node_modules/rn-emoji-keyboard/lib/typescript/src/index.d.ts (note the additional src/)

mateki0 commented 1 year ago

Thanks for reporting. It will be fixed soon! :)

jakex7 commented 1 year ago

Hi, this issue has been resolved a while ago in 1.2.1, so I'm closing this thread. If the problem still occurs, feel free to reopen this issue 🔒