there is a bootstrap-vue.js modal and try to close it in my click-function.
but get the following error:
Property ‘hide’ does not exist on type ‘vue.js | Element | Vue | Element‘.
Property ‘hide’ does not exist on type ‘Vue’
I tried with jquery also
Property ‘modal’ does not exist on type ‘JQuery<HTMLElement>’
With the latest version of Bootstrapvue.js (2.0.0-rc.21 +), you can use the newer this.$bvModal.hide(id) method to close a modal with the specified id. $bvModal is typed, so it should work fine with Typescript.
When refs are not working for me in Vue+Typescript, I sometimes cast the ref to an HTMLElement or disable type checking by using any.
(this.$refs[‘my-modal’] as HTMLElement).hide()
(this.$refs[‘my-modal’] as any).hide()