pull/15593/head
ComputerGuy 1 year ago
parent f2ce6f4997
commit b82e182f8f

@ -15,10 +15,11 @@ export function ObjectExpression(node, context) {
* @type {Array<{rune: NonNullable<ReturnType<typeof get_rune>>, property: Property & {value: CallExpression}}>}
*/
let reactive_properties = [];
let valid_property_runes = ['$state', '$derived', '$state.raw', '$derived.by'];
for (let property of node.properties) {
if (property.type !== 'Property') continue;
const rune = get_rune(property.value, context.state.scope);
if (rune) {
if (rune && valid_property_runes.includes(rune)) {
has_runes = true;
reactive_properties.push({
rune,

Loading…
Cancel
Save