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

[typespec-vscode] Make 'convert to object value' code fix recursive #5342

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mzhongl524
Copy link
Member

Fix : #4613

There will be two quick fixes for this issue, and only by clicking on the quick fix of the entire expression can you get the desired result; If you click on the quick fix for a partial expression, because there is no recursive part in the middle of the partial expression, you need to click twice to get the desired result

… the quick fix of the entire expression can you get the desired result;

If you click on the quick fix for a partial expression, because there is no recursive part in the middle of the partial expression, you need to click twice to get the desired result
@azure-sdk
Copy link
Collaborator

azure-sdk commented Dec 12, 2024

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

Code Fix recursively handles complex model expression transformations

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

@RodgeFu RodgeFu added the ide Issues for VS, VSCode, Monaco, etc. label Dec 18, 2024
@RodgeFu RodgeFu changed the title [Not Ready] [typespec-vscode] Make 'convert to object value' code fix recursive [typespec-vscode] Make 'convert to object value' code fix recursive Dec 18, 2024
@chrisradek
Copy link
Member

Can this also support converting tuples to value syntax?

@example({ Bar: [ {Baz: "Hello"}, [ "foo" ] ] })
// to
@example(#{ Bar: #[ #{Baz: "Hello"}, #[ "foo" ] ] })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:core Issues for @typespec/compiler ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: "convert to an object value" code fix is not recursive
4 participants