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

[defect] when Union has only one option, tcgc transform it as literal #1134

Closed
chunyu3 opened this issue Jul 9, 2024 · 0 comments · Fixed by #1135
Closed

[defect] when Union has only one option, tcgc transform it as literal #1134

chunyu3 opened this issue Jul 9, 2024 · 0 comments · Fixed by #1135
Assignees
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@chunyu3
Copy link
Member

chunyu3 commented Jul 9, 2024

When Union only has one option (see following), tcgc getClientType transform it as literal.

Union OneOptionUnion
{
 A: "A",
}

expected: return Union

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants