Replies: 2 comments
-
|
One option would be using this library https://github.com/mcintyre321/OneOf |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Initial implementation added. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal: Code generation for union types
I'm planning to resolve #5 in near future.
Since C# doesn't support union types, we have to use a struct with implicit casting for each type of the union to implement this.
For example, a union type
int | float | stringwill be lowered to below C# code with this proposal (not sure about whether we should use nullable types or not here):Then we can use it as follows:
which outputs:
If anyone has ideas about how this feature should be implemented, feel free to reply in this discussion.
Thanks for using TypedocConverter.
Beta Was this translation helpful? Give feedback.
All reactions