Skip to content

Vue › Inlay Hints: Destructured Props shows on wrong situation #5993

@ludwig801

Description

@ludwig801

Vue - Official extension or vue-tsc version

3.2.5

VSCode version

1.109.5

Vue version

3.5.27

TypeScript version

5.9.3

System Info

package.json dependencies

Steps to reproduce

Suppose the following SFC's setup (simplified):

const { disabled } = defineProps<{ disabled: boolean }>()

// provideFormState() is a composable which returns an object with a { disabled } property
const { disabled: disabledInForm } = provideFormState({
  disabled: computed(() => props.disabled ?? false),
});

What is expected?

The second mention to disabled is a mention to the property as returned by provideFormState and, therefore, has no relation to props, so no inlay hint should be shown there.

What is actually happening?

The disabled property before the rename is being shown as being props.disabled with the inlay hint, which is wrong.

Image

Link to minimal reproduction

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions