Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added typescript definitions to fix #68 #109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
added typescript definitions to fix #68
wolph committed Mar 3, 2021
commit 61bbfdbd6aeae2daafd2110be333a24c5d77bd24
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@
"license": "MIT",
"author": "Matt Zollinhofer <[email protected]>",
"main": "src/components/VueTypeaheadBootstrap.vue",
"types": "src/vue-typeahead-bootstrap.d.ts",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --target lib --name VueTypeaheadBootstrap src/components/VueTypeaheadBootstrap.vue",
28 changes: 28 additions & 0 deletions src/vue-typeahead-bootstrap.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
declare module 'vue-typeahead-bootstrap' {

import {Component} from 'vue';

interface Props {
append?: string;
autoClose?: boolean;
backgroundVariant?: string;
data: any[];
disabled?: boolean;
disabledValues?: any[];
disableSort?: boolean;
highlightClass?: string;
inputClass?: string;
maxMatches?: number;
minMatchingChars?: number;
prepend?: string;
serializer?: (input: string) => string;
showAllResults?: boolean;
showOnFocus?: boolean;
size?: 'sm' | 'lg';
textVariant?: string;
}

const VueTypeaheadBootstrap: Component<any, any, any, Props>;

export default VueTypeaheadBootstrap;
}