state() was copied into a variable
The message
MARKLESS_FRAMEWORK_API_ALIAS_UNSUPPORTED: `<declarationKind> <localName> = <apiName>` copies the framework API `<apiName>` into a plain variable. `<localName>(5)` would not create graph state — the compiler only rewrites calls made through the imported name.
<apiName>() is compiled away into graph cells; it has no runtime function value that an alias could call.
Call the imported API directly — before: `const makeState = state; let x = makeState(5);` — after: `let x = state(5);`. For a reusable initialization pattern, wrap the VALUE, not the API (`const defaults = () => ({ open: false }); const menu = state(defaults());`).
https://markless.dev/errors/MARKLESS_FRAMEWORK_API_ALIAS_UNSUPPORTEDWords in angle brackets change from case to case.
Why
Markless only rewrites calls that use the imported name. A copy like const make = state gives it nothing to rewrite.
Fix
Call the imported function by its own name. If you want a reusable start value, wrap the value, not the function. Keep that helper at the top of the file.
const defaults = () => ({ open: false });export function Menu() @{ const menu = state(defaults()); <button onClick={() => (menu.open = !menu.open)}>{menu.open ? 'Close' : 'Open'}</button>}