import { Default, NAME, pattern, UI } from "commonfabric"; interface PatternState { value: Default; } // FIXTURE: ternary_computed // Verifies: ternary with expressions on both sides produces ifElse() with a lift-applied computation for each branch // state.value + 1 ? state.value + 2 : "undefined" → ifElse(...schemas, lift(...)({...}), lift(...)({...}), "undefined") // pattern(fn) → pattern(fn, inputSchema, outputSchema) // Context: Both condition and consequent contain state expressions that must be individually lift-applied export default pattern((state) => { return { [NAME]: "test ternary with computed", [UI]: (
{state.value + 1 ? state.value + 2 : "undefined"}
), }; });