10000 A same name prop and variable will show wrong type · Issue #5694 · vuejs/core · GitHub
[go: up one dir, main page]

Skip to content
A same name prop and variable will show wrong type #5694
@sapphi-red

Description

@sapphi-red

Version

3.2.31

Reproduction link

stackblitz.com

Steps to reproduce

  1. Open reproduction.
  2. Hover a of (new Comp()).a inside src/components/Foo.ts.

What is expected?

It shows string.

What is actually happening?

It shows never.


When a prop and a variable returned from setup has the same name, the variable returned from setup has higher precedence than a prop.
This can be confirmed by the fact that 55: is rendered instead of 55 in the reproduction.

related: vuejs/language-tools#1142

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

      0