I am currently working in vue 3 with typescript.
I would like to use the vue owl library (https://www.npmjs.com/package/vue-owl-carousel).
However, I get a message that I need to declare it which I did as follows:
tsconfig.json
"compilerOptions": {
...
"include": [
...
"src/owl/index.d.ts"
],
...
}
owl index.d.ts
declare module "vue-owl-carousel";
vue component
<template>
<div class="hello">
<carousel>
<img src="https://placeimg.com/200/200/any?1">
<img src="https://placeimg.com/200/200/any?2">
<img src="https://placeimg.com/200/200/any?3">
<img src="https://placeimg.com/200/200/any?4">
</carousel>
</div>
</template>
<script lang="ts">
import { Options, Vue } from "vue-class-component";
import carousel from "vue-owl-carousel";
@Options({
components: {
carousel
}
})
...
</script>
When I open the page I get a blank page and in the console this error appears:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…