rune-langium / visual-editor/src / AdapterChoiceOption
Interface: AdapterChoiceOption
Defined in: packages/visual-editor/src/adapters/structure-graph-adapter.ts:99
Mirrors the real ChoiceOption AST shape: only typeCall, no name, no card. Choice arms are alternatives ("pick one of these types"), not attributes.
typeCall is optional because partial-parse state (the user has typed arm: but no type name yet) yields entries with typeCall === undefined. The adapter substitutes a sentinel — see buildChoiceArm. Widened type (vs. strict + defensive guards) keeps the runtime contract honest for downstream consumers (Copilot review on PR #219).
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
typeCall? | readonly | | string | { type?: { $refText?: string; }; } | The type reference in the same union form as AdapterAttribute.typeCall. | packages/visual-editor/src/adapters/structure-graph-adapter.ts:101 |