import { isComputed, } from '@/astride/types.js'; export default function({object, property, wrapper}, {evaluate, scope}) { const member = (O, P) => (wrapper?.optional ? O?.[P] : O[P]); const O = evaluate(object, {scope}); const P = isComputed(property) ? evaluate(property, {scope}) : {value: property.value}; if (O.async || P.async) { return { async: true, value: Promise.all([O.value, P.value]).then(([O, P]) => member(O, P)), }; } return {value: member(O.value, P.value)}; }