Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

How it will work with typescript? #67

Closed
MKBLR23 opened this issue Nov 18, 2019 · 2 comments
Closed

How it will work with typescript? #67

MKBLR23 opened this issue Nov 18, 2019 · 2 comments

Comments

@MKBLR23
Copy link

MKBLR23 commented Nov 18, 2019

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
Copy link

raphaelkieling-egsys commented Nov 28, 2019

A workaround that you can do is put in a file like a typings.d.ts

declare module "vue-bootstrap-typeahead";

@djereg
Copy link

djereg commented Nov 30, 2019

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;
}

@MKBLR23 MKBLR23 closed this as completed Dec 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants