proxied-state-each-blocks
Dominic Gannaway 9 months ago
parent 4288843576
commit 28ac98e3f0

@ -15,9 +15,7 @@
"end": 36,
"type": "StyleDirective",
"name": "color",
"modifiers": [
"important"
],
"modifiers": ["important"],
"value": [
{
"type": "MustacheTag",
@ -47,4 +45,4 @@
}
]
}
}
}

@ -9,11 +9,8 @@
"start": 0,
"end": 30,
"data": " svelte-ignore foo bar ",
"ignores": [
"foo",
"bar"
]
"ignores": ["foo", "bar"]
}
]
}
}
}

@ -81,4 +81,4 @@
"styles": "\n\tdiv {\n\t\tcolor: red;\n\t}\n"
}
}
}
}

@ -81,4 +81,4 @@
"styles": "\n\tdiv {\n\t\tcolor: red;\n\t}\n"
}
}
}
}

@ -8,6 +8,6 @@ export default test({
async test({ assert, target, component }) {
await Promise.resolve();
await Promise.resolve();
assert.deepEqual(component.log, ['a1: ', {}, 'b1: ', {}]);
assert.deepEqual(component.log, ['a1: ', true, 'b1: ', true]);
}
});

@ -3,26 +3,26 @@
let b1 = $state();
const {log} = $props();
$effect(() => {
log.push('a1: ', a1);
});
$effect(() => {
log.push('b1: ', b1);
});
a();
queueMicrotask(a);
b();
queueMicrotask(b);
function a() {
a1 ??= {};
a1 ??= true;
}
function b() {
b1 ?? (b1 = {});
b1 ?? (b1 = true);
}
</script>

Loading…
Cancel
Save