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

Programmatic control methods are missing in typescript declaration #1499

Closed
slaweet opened this issue Nov 10, 2021 · 0 comments · Fixed by #1609
Closed

Programmatic control methods are missing in typescript declaration #1499

slaweet opened this issue Nov 10, 2021 · 0 comments · Fixed by #1609
Assignees
Labels
Milestone

Comments

@slaweet
Copy link

slaweet commented Nov 10, 2021

Steps to reproduce

Try to use

in a project with typescript

Expected behaviour

It works with Typescript as in the docs with Javascript.

because activate/deactivate is defined in

declare class Multiselect extends Vue { }

in a similar way as in another project https://github.com/bootstrap-vue/bootstrap-vue/blob/45635d1d391263192787e9e0bddc004abe115ace/src/components/modal/index.d.ts#L9-L13

In this case it would be something like this:

declare class Multiselect extends Vue {
  activate: () => void
  deactivate: () => void
}

Actual behaviour

You'll get an error like:

Property 'activate' does not exist on type 'Multiselect'.

because it's not defined in

declare class Multiselect extends Vue { }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants