thecodealer / vue-panzoom

Vue plugin to zoom/pan dom elements
MIT License
89 stars 20 forks source link

Missing declaration file? #16

Closed nat-alia closed 3 years ago

nat-alia commented 4 years ago

Error on Visual Code saying:

Could not find a declaration file for module 'vue-panzoom'. '/Users/nataliaoledzka/Documents/Capstone/capstone-codemarch22/node_modules/vue-panzoom/dist/vue-panzoom.umd.js' implicitly has an 'any' type. Try npm install @types/vue-panzoom if it exists or add a new declaration (.d.ts) file containing declare module 'vue-panzoom';ts(7016)

Tried npm install @types/vue-panzoom and tried to add a new declaration file but either I did it incorrectly or it doesn't work.

Thank you!

janvorisek commented 4 years ago

Create a new file src/vue-panzoom.d.ts and put declare module "vue-panzoom"; inside of it. You will stop getting the error (but no type hinting will be available).

iwalucas commented 3 years ago

@janvorisek I am having the same issue, and its not working even declaring the d.ts.... any other idea?

janvorisek commented 3 years ago

@iwalucas The author needs to publish the built library files into the npm releases. This also coulld be automated in the build process. I'll send PR when I can.