Error codesState

A destructuring default the build cannot apply

MARKLESS_STATE_DESTRUCTURE_DEFAULT_UNSUPPORTEDerrorMarkless raises it while it builds your .tsrx files.

The message

MARKLESS_STATE_DESTRUCTURE_DEFAULT_UNSUPPORTED: Cannot create graph alias "<localName>" from "<target>" with a default value.
A destructuring default must run only when the property value is undefined. The current graph alias artifact can represent a graph path, but not a fallback expression without changing JavaScript semantics.
Use an explicit computed() for fallback logic, or read the graph path directly without a destructuring default.
https://markless.dev/errors/MARKLESS_STATE_DESTRUCTURE_DEFAULT_UNSUPPORTED

Words in angle brackets change from case to case.

Why

A default on a top-level prop, such as { size = 3 }, works everywhere: markup, computed(), event handlers, @if and @for, and props passed on. Three shapes still stop the build: a default on state you destructure (const { title = "Untitled" } = menu), a default inside a nested prop pattern ({ options: { size = 3 } }), and an object, array or function default ({ items = [] }, { onPick = () => {} }), each read anywhere other than a body assignment or a state() initializer.

Fix

Make the value its own top-level prop with the default there, or write the fallback where you read the value (menu.title ?? "Untitled", (items ?? []).length, onPick?.()).

Before

export function Card({ options: { size = 3 } }: { options: { size?: number } }) @{	<span>{size}</span>}

After

export function Card({ size = 3 }: { size?: number }) @{	<span>{size}</span>}
Where Markless raises it

All error codes

Button sounds are from Josh Comeau's Button Sounds library.