richie-south / local-emoji-picker

local-emoji-picker
https://local-emoji-picker.richardsoderman.se/
MIT License
2 stars 1 forks source link

Types are not emitted #17

Open hasparus opened 2 years ago

hasparus commented 2 years ago

Hey @richie-south 👋

Firstly, thanks a lot for this library.

I just needed a emoji-picker and after encountering emoji-mart, its Shadow DOM, outdated typings and lackluster docks I embarked on a long keyword search thinking "There has to be something better than this.".

Convenient public API, minimal styling I can easily customize and low (well... lower than alternative libraries) bundle size. Love it.


My only gripe with local-emoji-picker is that the types are not emitted during the build resulting in Could not find a declaration file for module 'local-emoji-picker'. [...] ts(7016) on user's side.

The required change is just

"build:prod": "cross-env NODE_ENV=production webpack && tsc --emitDeclarationOnly"

and possibly adding declaration: true to tsconfig. Here's a commit on my fork implements this.

I had to make some other changes to make it build on my machine (mostly because of node-gyp 😓), but I could do a cherry-pick or just repeat the change and send you a small PR if you'd like.

richie-south commented 2 years ago

Hi! Sorry for the late reply, I'm currently on vacation 😊

Thanks for the kind words!! Please do a pr so i can look at it and merge in to master 😃