mirror of https://github.com/sveltejs/svelte
parent
a5968dd2d0
commit
f542ac9ab8
@ -0,0 +1,31 @@
|
|||||||
|
/* generated by Svelte vX.Y.Z */
|
||||||
|
import { SvelteComponent, init, safe_not_equal } from "svelte/internal";
|
||||||
|
|
||||||
|
function instance($$self, $$props, $$invalidate) {
|
||||||
|
const a = { b: true };
|
||||||
|
|
||||||
|
function removeB() {
|
||||||
|
$$invalidate(1, delete a.b, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
$$self.$$.update = () => {
|
||||||
|
if ($$self.$$.dirty & /*a*/ 2) {
|
||||||
|
$: console.log(a.b);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return [removeB, a];
|
||||||
|
}
|
||||||
|
|
||||||
|
class Component extends SvelteComponent {
|
||||||
|
constructor(options) {
|
||||||
|
super();
|
||||||
|
init(this, options, instance, null, safe_not_equal, { removeB: 0 });
|
||||||
|
}
|
||||||
|
|
||||||
|
get removeB() {
|
||||||
|
return this.$$.ctx[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Component;
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
const a = { b: true };
|
||||||
|
|
||||||
|
export function removeB() {
|
||||||
|
delete a.b;
|
||||||
|
}
|
||||||
|
|
||||||
|
$: console.log(a.b);
|
||||||
|
</script>
|
||||||
Loading…
Reference in new issue