How it will work with typescript?
Closed this issue · 2 comments
MKBLR23 commented
Not working with typescript, I'm getting error Error: Cannot find module 'vue-bootstrap-typeahead'. It's asking for dev dependency '@types/vue-bootstrap-typeahead'.
raphaelkieling-egsys commented
A workaround that you can do is put in a file like a typings.d.ts
declare module "vue-bootstrap-typeahead";
djereg commented
This is my simple type definitions file.
declare module 'vue-bootstrap-typeahead' {
import {Component} from "vue";
interface Props {
data: any[];
serializer?: (input: string) => string;
size?: 'sm' | 'lg';
backgroundVariant?: string;
textVariant?: string;
inputClass?: string;
maxMatches?: number;
minMatchingChars?: number;
prepend?: string;
append?: string;
}
const VueBootstrapTypeahead: Component<any, any, any, Props>;
export default VueBootstrapTypeahead;
}