Severity: error | Blocks morph build: yes
Status: documented rule —
morph checkdoes not report this code yet. The underlying problem still breaks your build or your UI; the cause and fix below apply when you hit it.
You call a method the runtime types do not implement — for example .map() /
.split() / .toUpperCase() in a position or on a value kind without support:
error : mx-js-method : Method `.toUpperCase()` is not implemented for this value
hint: Check the runtime type docs for supported methods, or use a `.cpp` helper
Learn more: https://morph.levizr.com/docs/errors/mx-js-methodString, array, and object operations in Morph lower to morph::str helpers
and container methods on the native types. Coverage is broad but not total
(see translator coverage): exotic or highly
dynamic methods have no helper to call. Emitting a guessed equivalent would
change string semantics silently — the worst kind of bug in UI text — so the
call is rejected with the exact method named.
import { morphState } from 'morph';
export default function App() {
const [name, setName] = morphState("ada");
// ❌ If the method/position lacks support — mx-js-method
return <div>{name.toFancyCase()}</div>;
}// ✅ Native helper for the missing method
import { shout } from './helpers.cpp';
import { morphState } from 'morph';
export default function App() {
const [name, setName] = morphState("ada");
return <div>{shout(name)}</div>;
}Steps:
.cpp helper.morph check.Do not disable this rule. Unimplemented methods have no native code to call.