Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Can not add createLocalVue errorHandler Option by typescript #1872

Copy link
Copy link
Closed
@coolboy0961

Description

@coolboy0961
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.