Skip to content

[2.7.10] [typescript] Cannot change the typing of $emit since 2.7.5 #12773

Open
@vidal7

Description

@vidal7

Version

2.7.10

Reproduction link

github.com

Steps to reproduce

  • Clone the repo
  • npm install
  • npm run compile

What is expected?

No typescript compilation errors

What is actually happening?

There is typescript compilation errors


Since 2.7.5 and 005e52d, $emit cannot be typed with vue-class-component.

If you checkout commit 62000a803bbe4ed1dc9d30c20772a948cab49d16 and doing npm install to go back in vue 2.7.4 and npm run compile, everything is fine.

See file src/ComponentWithTypedEvents.ts to see examples about working typing of events.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions