Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
481 B · 12 lines
TypeScript
12345678910111213import type { Renderable } from "@opentui/core"import type { SimulationProtocol } from "@opencode/simulation/protocol"
type Definition = Omit<SimulationProtocol.Frontend.SemanticNode, "id" | "element" | "parent">
const key = Symbol.for("opencode.simulation.semantics")
const bind = (definition: () => Definition) => (renderable: Renderable) => { Object.defineProperty(renderable, key, { value: definition, configurable: true })}
export const SimulationSemantics = { bind }