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

[tcgc] do not use UnionEnumVariant type directly #1360

Closed
tadelesh opened this issue Aug 13, 2024 · 2 comments · Fixed by #1399
Closed

[tcgc] do not use UnionEnumVariant type directly #1360

tadelesh opened this issue Aug 13, 2024 · 2 comments · Fixed by #1399
Assignees
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@tadelesh
Copy link
Member

tadelesh commented Aug 13, 2024

In TCGC, we need to use this type, but it is not exported for now. Since UnionVariant is exported, I believe it is reasonable to also export UnionEnumVariant.

change task to remove dep on UnionEnumVariant in tcgc

@tadelesh tadelesh added the lib:azure-core Issues for @azure-tools/typespec-azure-core library label Aug 13, 2024
@markcowl
Copy link
Member

@tadelesh Can you expound on why this is needed? You can use the helper to get the enumeration details of a union, what is the scenario where this type gives you data you cannot get elsewhere?

@markcowl markcowl added the needs-info Mark an issue that needs reply from the author or it will be closed automatically label Aug 19, 2024
@tadelesh
Copy link
Member Author

@markcowl it is used here to infer the type of the enum member. after checked the code, i believe it could be work around with just pass in the values. let me change the title and the labe. thanks for the info.

@tadelesh tadelesh added lib:tcgc Issues for @azure-tools/typespec-client-generator-core library and removed lib:azure-core Issues for @azure-tools/typespec-azure-core library needs-info Mark an issue that needs reply from the author or it will be closed automatically labels Aug 20, 2024
@tadelesh tadelesh changed the title Expose UnionEnumVariant type [tcgc] do not use UnionEnumVariant type directly Aug 20, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 21, 2024
resolve: #1360

---------

Co-authored-by: iscai-msft <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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