-
What is the appropriate way to model sum types where one or more of the members has no payload. For example, the naive grammar for the
But this does not work because How do I tell Langium that export interface None extends AstNode {
readonly $type: 'None';
} |
Beta Was this translation helpful? Give feedback.
Answered by
msujew
Jan 18, 2024
Replies: 1 comment
-
Hey @drhagen, you can just invoke an action to force Langium to instantiate an object (and therefore create a corresponding type in the
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
drhagen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @drhagen,
you can just invoke an action to force Langium to instantiate an object (and therefore create a corresponding type in the
ast.ts
):