jperelli / vue2-leaflet-markercluster

markercluster plugin extension for vue2-leaflet package
MIT License
132 stars 55 forks source link

Could not find a declaration file for module 'vue2-leaflet-markercluster' #50

Open yog3sha opened 3 years ago

yog3sha commented 3 years ago

How to add types or declaration of this module when project is created in Vue TS? Map is getting created but getting following error in terminal: Trynpm install @types/vue2-leaflet-markerclusterif it exists or add a new declaration (.d.ts) file containingdeclare module 'vue2-leaflet-markercluster';``

yog3sha commented 3 years ago

I created a file named 'vue2-leaflet-markercluster.d.ts' at the level of tsconfig.js and added line declare module 'vue2-leaflet-markercluster'; to it. Error got resolved. Is there any better or more proper way to do this for this package?

MinerMax555 commented 3 years ago

I have done the same for my project, I don't believe there is any better way as there is no declaration file contained in this library.