DCzajkowski / vue-emoji-picker

Very simple, yet powerful, vue emoji picker 🎉🔥🚀
MIT License
332 stars 49 forks source link

Added basic typescript module declaration and typings folder #3

Closed Edza closed 6 years ago

Edza commented 6 years ago

This simply makes the typescript compiler not throw an error that the module has no typing. Props/Methods can be added to the typings later.

I tested this with a forked npm package in Visual Studio Code. Works.

Edza commented 6 years ago

To test you can open in VS Code my repo: https://github.com/Edza/Intertyper

And then change the: import EmojiPicker from 'vue-emoji-picker-fork'

to

import EmojiPicker from 'vue-emoji-picker'

Without the fix it's:

Could not find a declaration file for module 'vue-emoji-picker'. 'c:/Users/edza/Desktop/intertyper/node_modules/vue-emoji-picker/dist-module/main.js' implicitly has an 'any' type.
  Try `npm install @types/vue-emoji-picker` if it exists or add a new declaration (.d.ts) file containing `declare module 'vue-emoji-picker';`

No error with it. 😊

DCzajkowski commented 6 years ago

Great job! 💪 Thanks!