Open true-eye opened 4 years ago
push
You can add the line
declare module 'vue-text-highlight';
to your src/shims-vue.d.ts
file (or any other src/*.d.ts
file in src
).
Then the component can be used with Vue + Typescript when registered globally (e.g. in main.ts
) like this:
import TextHighlight from 'vue-text-highlight'; // import works now
Vue.component('text-highlight', TextHighlight);
That worked for me at least.
Great Library!
I'm using vue.js and typescript. Is there any typescript version for this library?
Please let me know Thanks,