initbase / vue-modal-2

A simple and lightweight Vue (v2) modal component.
https://initbase.github.io/vue-modal-2/
MIT License
8 stars 4 forks source link

Property '$vm2' does not exist on type #2

Closed avpavp closed 3 years ago

avpavp commented 3 years ago

Hi

Thanks for your component.

I'm using it successfully in debug mode. While in debug mode I do get an error though:

Property '$vm2' does not exist on type 'CombinedVueInstance<Vue, PageState....

While in debug mode this still runs correctly, but if I try and do yarn build, it fails with the same error.

Any ideas?

Thanks

burhanahmeed commented 3 years ago

which version are you using?

burhanahmeed commented 3 years ago

I think v1.1.7 or v1.1.8 should be fine.

Tested it using debug mode and build mode no error prompted in console.

avpavp commented 3 years ago

Hmmm... I was using v1.1.6. upgraded to 1.1.8, still getting the same error... Must be something else about my config...?

I am using typescript - might that be related?

*** Fixed

I believe it is a typescript issue. Where I'm using 'this', i changed to (this as any) and error went away. I think maybe this could also be solved if you included a types package with your package for TS?

Thanks for your package and your help!

burhanahmeed commented 3 years ago

thanks for feedback! I will check again compatibility on TS