Skip to content

Can not add createLocalVue errorHandler Option by typescript #1872

Closed
@coolboy0961

Description

@coolboy0961

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