else is missing its @
The message
MARKLESS_BRANCH_ELSE_SPELLING: This `else` follows an @if arm but is not written as `@else`, so it is not read as a branch at all. TSRX parses it as literal text next to the @if, and the block after it becomes a separate expression, so the page renders the word "else" followed by the arm's own source as escaped text.
Markless branches are spelled with the `@` sigil — `@if`, `@else if`, `@else` — because that sigil is what tells the parser a construct starts here. Without it the parser has no branch to attach the alternative to, and the mistake is silent: the module compiles and ships visible garbage instead of failing.
Write the alternative as `@else { ... }`.
https://markless.dev/errors/MARKLESS_BRANCH_ELSE_SPELLINGWhy
Without the @, Markless does not see a branch. A braced } else { stops the build. An unbraced one shows the word "else" and the code after it as text.
Fix
Write @else, with the @ sign.
Before
import { state } from '@markless/core';export function Menu() @{ let open = state(false); @if (open) { <p>Open</p> } else { <p>Closed</p> }}After
@if (open) { <p>Open</p>} @else { <p>Closed</p>}