delowardev / vue3-emoji-picker

Simple and Powerful Emoji Picker for Vue3
https://codesandbox.io/p/github/delowardev/vue3-emoji-picker/main?file=%2FREADME.md
MIT License
171 stars 34 forks source link

use componente vue+ typescript #49

Closed alessandronuunes closed 1 year ago

alessandronuunes commented 1 year ago

I'm in a project using vue+typescript and after installing it gives me the following error Could not find a declaration file for module 'vue3-emoji-picker'. 'c:/xampp/htdocs/webchat/node_modules/vue3-emoji-picker/dist/emoji-picker.umd.js' implicitly has an 'any' type. Try npm i --save-dev @types/vue3-emoji-picker if it exists or add a new declaration (.d.ts) file containing declare module 'vue3-emoji-picker';

when importing the component gives the following error Cannot find module 'vue3-emoji-picker' or its corresponding type declarations.ts(2307)

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

delowardev commented 1 year ago

Hi @alessandronuunes, please follow this step down below: image

ChronicStone commented 10 months ago

Hi @delowardev is there a particular reason why you're not bundling / exporting types for the package ? The package itself seem to be written in TS, so generating DTS & referencing these in the package.json will solve this issue, but also provide full type-safety for users working with TS in their projects.

Considering the package is already TS & fully typed, it's kind of a loss to not export types