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

Can not add createLocalVue errorHandler Option by typescript #1872

Closed
coolboy0961 opened this issue Jul 11, 2021 · 1 comment
Closed

Can not add createLocalVue errorHandler Option by typescript #1872

coolboy0961 opened this issue Jul 11, 2021 · 1 comment

Comments

@coolboy0961
Copy link
Contributor

Subject of the issue

Describe your issue here.
according to this PR, I should be alow create local vue like this.
#1670

const localVue = createLocalVue({
  errorHandler
})

But the type file do not allow to add a options parameter.
image

image

Steps to reproduce

ues typescript and type this in your spec file.

    const errorHandler = (err, vm, info) => {
      expect(err).toBeInstanceOf(Error);
    };
    localVue = createLocalVue({ errorHandler });

Expected behaviour

It should no error happen.

Actual behaviour

A type error happen.

Possible Solution

change the type to this below.

export declare function createLocalVue (options?: any): typeof Vue
@coolboy0961
Copy link
Contributor Author

made a PR for this issue.
#1873

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

No branches or pull requests

1 participant