Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(language-core): inlay hints for destructured props #4634

Merged

Conversation

KazariEX
Copy link
Collaborator

@KazariEX KazariEX commented Jul 31, 2024

resolve #4622

It will look like:

image

@KazariEX
Copy link
Collaborator Author

KazariEX commented Aug 1, 2024

Which is better?

image

image

@KazariEX
Copy link
Collaborator Author

KazariEX commented Aug 1, 2024

I'm unsure why it isn't getting any inlayHints... I'd appreciate understanding the correct solution.

@johnsoncodehk
Copy link
Member

Which is better?

image

image

: props.foo is better. 👍

@johnsoncodehk
Copy link
Member

This is close to complete! However, executing findDestructuredProps in codegen affects the performance of vue-tsc. I am refactoring to move the logic related to inlay hints to the language-service package to avoid unnecessary computations in vue-tsc

@KazariEX
Copy link
Collaborator Author

KazariEX commented Aug 4, 2024

Actually I implemented it in the language-service at first, and only tried to implement it in codegen after being reminded about the magic of __hint.

Additionally, I noticed a feature about tracking reactive variables in the Insiders version. Does this imply that they can extract reusable logic?

@johnsoncodehk
Copy link
Member

Additionally, I noticed a feature about tracking reactive variables in the Insiders version. Does this imply that they can extract reusable logic?

My impression is that the logic is different, it's okay let's see if we can reduce the code after merging this.

@johnsoncodehk johnsoncodehk merged commit fd47493 into vuejs:master Aug 9, 2024
3 checks passed
@KazariEX KazariEX deleted the feat/inlay-hints-destructured-props branch August 9, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inlay hints for destructured props
3 participants