adding tests for #4170

pull/4187/head
AnatoleLucet 6 years ago
parent 4c381343e4
commit 0d40cb65f3

@ -42,7 +42,7 @@ function handleFoo(bar) {
}
function foo(node, callback) {
}
function instance($$self, $$props, $$invalidate) {
@ -50,7 +50,7 @@ function instance($$self, $$props, $$invalidate) {
const foo_function = () => handleFoo(bar);
$$self.$set = $$props => {
if ("bar" in $$props) $$invalidate(0, bar = $$props.bar);
if ("bar" in $$props) $$invalidate({ i: 0, ret: bar = $$props.bar });
};
return [bar, foo_function];

@ -34,7 +34,7 @@ function instance($$self, $$props, $$invalidate) {
let online;
function onlinestatuschanged() {
$$invalidate(0, online = navigator.onLine);
$$invalidate({ i: 0, ret: online = navigator.onLine });
}
return [online, onlinestatuschanged];

@ -46,11 +46,11 @@ function instance($$self, $$props, $$invalidate) {
function details_toggle_handler() {
open = this.open;
$$invalidate(0, open);
$$invalidate({ i: 0, ret: open });
}
$$self.$set = $$props => {
if ("open" in $$props) $$invalidate(0, open = $$props.open);
if ("open" in $$props) $$invalidate({ i: 0, ret: open = $$props.open });
};
return [open, details_toggle_handler];

@ -42,13 +42,13 @@ function instance($$self, $$props, $$invalidate) {
function div_elementresize_handler() {
w = this.offsetWidth;
h = this.offsetHeight;
$$invalidate(0, w);
$$invalidate(1, h);
$$invalidate({ i: 0, ret: w });
$$invalidate({ i: 1, ret: h });
}
$$self.$set = $$props => {
if ("w" in $$props) $$invalidate(0, w = $$props.w);
if ("h" in $$props) $$invalidate(1, h = $$props.h);
if ("w" in $$props) $$invalidate({ i: 0, ret: w = $$props.w });
if ("h" in $$props) $$invalidate({ i: 1, ret: h = $$props.h });
};
return [w, h, div_elementresize_handler];

@ -54,16 +54,16 @@ function instance($$self, $$props, $$invalidate) {
function input0_change_handler() {
files = this.files;
$$invalidate(0, files);
$$invalidate({ i: 0, ret: files });
}
function input1_change_handler() {
files = this.files;
$$invalidate(0, files);
$$invalidate({ i: 0, ret: files });
}
$$self.$set = $$props => {
if ("files" in $$props) $$invalidate(0, files = $$props.files);
if ("files" in $$props) $$invalidate({ i: 0, ret: files = $$props.files });
};
return [files, input0_change_handler, input1_change_handler];

@ -60,7 +60,7 @@ function instance($$self, $$props, $$invalidate) {
function input_input_handler() {
foo = this.value;
$$invalidate(0, foo);
$$invalidate({ i: 0, ret: foo });
}
return [foo, input_input_handler];

@ -49,7 +49,7 @@ function instance($$self, $$props, $$invalidate) {
let { foo = 42 } = $$props;
$$self.$set = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
if ("foo" in $$props) $$invalidate({ i: 0, ret: foo = $$props.foo });
};
return [foo];
@ -63,4 +63,4 @@ class Component extends SvelteComponent {
}
}
export default Component;
export default Component;

@ -84,7 +84,7 @@ function instance($$self, $$props, $$invalidate) {
function input_input_handler() {
z = this.value;
$$invalidate(0, z);
$$invalidate({ i: 0, ret: z });
}
return [z, input_input_handler];

@ -42,7 +42,7 @@ function create_fragment(ctx) {
function instance($$self, $$props, $$invalidate) {
let $foo;
const foo = writable(0);
component_subscribe($$self, foo, value => $$invalidate(0, $foo = value));
component_subscribe($$self, foo, value => $$invalidate({ i: 0, ret: $foo = value }));
return [$foo, foo];
}

@ -11,7 +11,7 @@ import { count } from "./store.js";
function instance($$self, $$props, $$invalidate) {
let $count;
component_subscribe($$self, count, $$value => $$invalidate(1, $count = $$value));
component_subscribe($$self, count, $$value => $$invalidate({ i: 1, ret: $count = $$value }));
function increment() {
set_store_value(count, $count++, $count);

@ -56,12 +56,12 @@ function create_fragment(ctx) {
function instance($$self, $$props, $$invalidate) {
let $foo,
$$unsubscribe_foo = noop,
$$subscribe_foo = () => ($$unsubscribe_foo(), $$unsubscribe_foo = subscribe(foo, $$value => $$invalidate(1, $foo = $$value)), foo);
$$subscribe_foo = () => ($$unsubscribe_foo(), $$unsubscribe_foo = subscribe(foo, $$value => $$invalidate({ i: 1, ret: $foo = $$value })), foo);
$$self.$$.on_destroy.push(() => $$unsubscribe_foo());
let foo = writable(0);
$$subscribe_foo();
const click_handler = () => $$subscribe_foo($$invalidate(0, foo = writable(0)));
const click_handler = () => $$subscribe_foo($$invalidate({ i: 0, ret: foo = writable(0) }));
return [foo, $foo, click_handler];
}

@ -13,7 +13,7 @@ function instance($$self, $$props, $$invalidate) {
}
$$self.$set = $$props => {
if ("x" in $$props) $$invalidate(0, x = $$props.x);
if ("x" in $$props) $$invalidate({ i: 0, ret: x = $$props.x });
};
return [x, a, b];

@ -46,4 +46,4 @@ class Component extends SvelteComponent {
}
}
export default Component;
export default Component;

@ -48,7 +48,7 @@ function instance($$self, $$props, $$invalidate) {
let { bar } = $$props;
$$self.$set = $$props => {
if ("bar" in $$props) $$invalidate(0, bar = $$props.bar);
if ("bar" in $$props) $$invalidate({ i: 0, ret: bar = $$props.bar });
};
return [bar];

@ -76,7 +76,7 @@ function instance($$self, $$props, $$invalidate) {
});
$$self.$set = $$props => {
if ("name" in $$props) $$invalidate(0, name = $$props.name);
if ("name" in $$props) $$invalidate({ i: 0, ret: name = $$props.name });
};
$$self.$capture_state = () => {
@ -84,7 +84,7 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$inject_state = $$props => {
if ("name" in $$props) $$invalidate(0, name = $$props.name);
if ("name" in $$props) $$invalidate({ i: 0, ret: name = $$props.name });
};
return [name];

@ -177,10 +177,10 @@ function instance($$self, $$props, $$invalidate) {
});
$$self.$set = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
if ("bar" in $$props) $$invalidate(2, bar = $$props.bar);
if ("baz" in $$props) $$invalidate(3, baz = $$props.baz);
if ("things" in $$props) $$invalidate({ i: 0, ret: things = $$props.things });
if ("foo" in $$props) $$invalidate({ i: 1, ret: foo = $$props.foo });
if ("bar" in $$props) $$invalidate({ i: 2, ret: bar = $$props.bar });
if ("baz" in $$props) $$invalidate({ i: 3, ret: baz = $$props.baz });
};
$$self.$capture_state = () => {
@ -188,10 +188,10 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$inject_state = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
if ("bar" in $$props) $$invalidate(2, bar = $$props.bar);
if ("baz" in $$props) $$invalidate(3, baz = $$props.baz);
if ("things" in $$props) $$invalidate({ i: 0, ret: things = $$props.things });
if ("foo" in $$props) $$invalidate({ i: 1, ret: foo = $$props.foo });
if ("bar" in $$props) $$invalidate({ i: 2, ret: bar = $$props.bar });
if ("baz" in $$props) $$invalidate({ i: 3, ret: baz = $$props.baz });
};
return [things, foo, bar, baz];

@ -169,8 +169,8 @@ function instance($$self, $$props, $$invalidate) {
});
$$self.$set = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
if ("things" in $$props) $$invalidate({ i: 0, ret: things = $$props.things });
if ("foo" in $$props) $$invalidate({ i: 1, ret: foo = $$props.foo });
};
$$self.$capture_state = () => {
@ -178,8 +178,8 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$inject_state = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
if ("things" in $$props) $$invalidate({ i: 0, ret: things = $$props.things });
if ("foo" in $$props) $$invalidate({ i: 1, ret: foo = $$props.foo });
};
return [things, foo];

@ -56,8 +56,8 @@ function instance($$self) {
};
$$self.$inject_state = $$props => {
if ("obj" in $$props) $$invalidate(0, obj = $$props.obj);
if ("kobzol" in $$props) $$invalidate(1, kobzol = $$props.kobzol);
if ("obj" in $$props) $$invalidate({ i: 0, ret: obj = $$props.obj });
if ("kobzol" in $$props) $$invalidate({ i: 1, ret: kobzol = $$props.kobzol });
};
return [obj, kobzol];

@ -105,7 +105,10 @@ function instance($$self, $$props, $$invalidate) {
let { createElement } = $$props;
$$self.$set = $$props => {
if ("createElement" in $$props) $$invalidate(0, createElement = $$props.createElement);
if ("createElement" in $$props) $$invalidate({
i: 0,
ret: createElement = $$props.createElement
});
};
return [createElement];

@ -11,7 +11,7 @@ function instance($$self, $$props, $$invalidate) {
});
$$self.$set = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
if ("foo" in $$props) $$invalidate({ i: 0, ret: foo = $$props.foo });
};
return [foo];

@ -73,7 +73,7 @@ function instance($$self, $$props, $$invalidate) {
});
$$self.$set = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
if ("foo" in $$props) $$invalidate({ i: 0, ret: foo = $$props.foo });
};
$$self.$capture_state = () => {
@ -81,13 +81,13 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$inject_state = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
if ("bar" in $$props) $$invalidate(1, bar = $$props.bar);
if ("foo" in $$props) $$invalidate({ i: 0, ret: foo = $$props.foo });
if ("bar" in $$props) $$invalidate({ i: 1, ret: bar = $$props.bar });
};
$$self.$$.update = () => {
if ($$self.$$.dirty & /*foo*/ 1) {
$: $$invalidate(1, bar = foo * 2);
$: $$invalidate({ i: 1, ret: bar = foo * 2 });
}
};

@ -107,11 +107,11 @@ function instance($$self, $$props, $$invalidate) {
let { e } = $$props;
$$self.$set = $$props => {
if ("a" in $$props) $$invalidate(0, a = $$props.a);
if ("b" in $$props) $$invalidate(1, b = $$props.b);
if ("c" in $$props) $$invalidate(2, c = $$props.c);
if ("d" in $$props) $$invalidate(3, d = $$props.d);
if ("e" in $$props) $$invalidate(4, e = $$props.e);
if ("a" in $$props) $$invalidate({ i: 0, ret: a = $$props.a });
if ("b" in $$props) $$invalidate({ i: 1, ret: b = $$props.b });
if ("c" in $$props) $$invalidate({ i: 2, ret: c = $$props.c });
if ("d" in $$props) $$invalidate({ i: 3, ret: d = $$props.d });
if ("e" in $$props) $$invalidate({ i: 4, ret: e = $$props.e });
};
return [a, b, c, d, e];

@ -153,10 +153,10 @@ function instance($$self, $$props, $$invalidate) {
let { foo } = $$props;
$$self.$set = $$props => {
if ("comments" in $$props) $$invalidate(0, comments = $$props.comments);
if ("elapsed" in $$props) $$invalidate(1, elapsed = $$props.elapsed);
if ("time" in $$props) $$invalidate(2, time = $$props.time);
if ("foo" in $$props) $$invalidate(3, foo = $$props.foo);
if ("comments" in $$props) $$invalidate({ i: 0, ret: comments = $$props.comments });
if ("elapsed" in $$props) $$invalidate({ i: 1, ret: elapsed = $$props.elapsed });
if ("time" in $$props) $$invalidate({ i: 2, ret: time = $$props.time });
if ("foo" in $$props) $$invalidate({ i: 3, ret: foo = $$props.foo });
};
return [comments, elapsed, time, foo];

@ -127,7 +127,7 @@ function instance($$self, $$props, $$invalidate) {
let { things } = $$props;
$$self.$set = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("things" in $$props) $$invalidate({ i: 0, ret: things = $$props.things });
};
return [things];

@ -96,7 +96,7 @@ function instance($$self, $$props, $$invalidate) {
let { things } = $$props;
$$self.$set = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("things" in $$props) $$invalidate({ i: 0, ret: things = $$props.things });
};
return [things];

@ -84,11 +84,17 @@ function instance($$self, $$props, $$invalidate) {
let number = 0;
function updateHandler1() {
$$invalidate(0, clickHandler = () => $$invalidate(1, number = 1));
$$invalidate({
i: 0,
ret: clickHandler = () => $$invalidate({ i: 1, ret: number = 1 })
});
}
function updateHandler2() {
$$invalidate(0, clickHandler = () => $$invalidate(1, number = 2));
$$invalidate({
i: 0,
ret: clickHandler = () => $$invalidate({ i: 1, ret: number = 2 })
});
}
return [clickHandler, number, updateHandler1, updateHandler2];

@ -89,7 +89,7 @@ function instance($$self, $$props, $$invalidate) {
let { foo } = $$props;
$$self.$set = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
if ("foo" in $$props) $$invalidate({ i: 0, ret: foo = $$props.foo });
};
return [foo];

@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) {
let { foo } = $$props;
$$self.$set = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
if ("foo" in $$props) $$invalidate({ i: 0, ret: foo = $$props.foo });
};
return [foo];

@ -45,9 +45,9 @@ function instance($$self, $$props, $$invalidate) {
let { y } = $$props;
$$self.$set = $$props => {
if ("color" in $$props) $$invalidate(0, color = $$props.color);
if ("x" in $$props) $$invalidate(1, x = $$props.x);
if ("y" in $$props) $$invalidate(2, y = $$props.y);
if ("color" in $$props) $$invalidate({ i: 0, ret: color = $$props.color });
if ("x" in $$props) $$invalidate({ i: 1, ret: x = $$props.x });
if ("y" in $$props) $$invalidate({ i: 2, ret: y = $$props.y });
};
return [color, x, y];

@ -38,7 +38,7 @@ function instance($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$set = $$props => {
if ("data" in $$props) $$invalidate(0, data = $$props.data);
if ("data" in $$props) $$invalidate({ i: 0, ret: data = $$props.data });
};
return [data];

@ -38,7 +38,7 @@ function instance($$self, $$props, $$invalidate) {
let { color } = $$props;
$$self.$set = $$props => {
if ("color" in $$props) $$invalidate(0, color = $$props.color);
if ("color" in $$props) $$invalidate({ i: 0, ret: color = $$props.color });
};
return [color];

@ -55,9 +55,9 @@ function instance($$self, $$props, $$invalidate) {
let { value } = $$props;
$$self.$set = $$props => {
if ("style" in $$props) $$invalidate(0, style = $$props.style);
if ("key" in $$props) $$invalidate(1, key = $$props.key);
if ("value" in $$props) $$invalidate(2, value = $$props.value);
if ("style" in $$props) $$invalidate({ i: 0, ret: style = $$props.style });
if ("key" in $$props) $$invalidate({ i: 1, ret: key = $$props.key });
if ("value" in $$props) $$invalidate({ i: 2, ret: value = $$props.value });
};
return [style, key, value];

@ -40,11 +40,11 @@ function instance($$self, $$props, $$invalidate) {
function input_change_handler() {
files = this.files;
$$invalidate(0, files);
$$invalidate({ i: 0, ret: files });
}
$$self.$set = $$props => {
if ("files" in $$props) $$invalidate(0, files = $$props.files);
if ("files" in $$props) $$invalidate({ i: 0, ret: files = $$props.files });
};
return [files, input_change_handler];

@ -68,7 +68,7 @@ function instance($$self, $$props, $$invalidate) {
function input_input_handler() {
test = this.value;
$$invalidate(0, test);
$$invalidate({ i: 0, ret: test });
}
return [test, handleSubmit, input_input_handler];

@ -51,11 +51,11 @@ function instance($$self, $$props, $$invalidate) {
function input_change_input_handler() {
value = to_number(this.value);
$$invalidate(0, value);
$$invalidate({ i: 0, ret: value });
}
$$self.$set = $$props => {
if ("value" in $$props) $$invalidate(0, value = $$props.value);
if ("value" in $$props) $$invalidate({ i: 0, ret: value = $$props.value });
};
return [value, input_change_input_handler];

@ -61,7 +61,7 @@ function instance($$self, $$props, $$invalidate) {
let name = "change me";
function onInput(event) {
$$invalidate(0, name = event.target.value);
$$invalidate({ i: 0, ret: name = event.target.value });
}
return [name, onInput];

@ -44,11 +44,11 @@ function instance($$self, $$props, $$invalidate) {
function input_change_handler() {
foo = this.checked;
$$invalidate(0, foo);
$$invalidate({ i: 0, ret: foo });
}
$$self.$set = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
if ("foo" in $$props) $$invalidate({ i: 0, ret: foo = $$props.foo });
};
return [foo, input_change_handler];

@ -57,7 +57,7 @@ function instance($$self, $$props, $$invalidate) {
let x = 0;
function foo() {
if (true) $$invalidate(0, x += 1);
if (true) $$invalidate({ i: 0, ret: x += 1 });
}
return [x, foo];

@ -50,15 +50,15 @@ function instance($$self, $$props, $$invalidate) {
setTimeout(
function foo() {
$$invalidate(0, x += 10);
$$invalidate(1, y += 20);
$$invalidate({ i: 0, ret: x += 10 });
$$invalidate({ i: 1, ret: y += 20 });
},
1000
);
$$self.$$.update = () => {
if ($$self.$$.dirty & /*x, y*/ 3) {
$: $$invalidate(0, x += y);
$: $$invalidate({ i: 0, ret: x += y });
}
};

@ -59,7 +59,7 @@ function instance($$self, $$props, $$invalidate) {
function foo() {
things.push(1);
$$invalidate(0, things);
$$invalidate({ i: 0, ret: things });
}
return [things, foo];

@ -57,7 +57,7 @@ function instance($$self, $$props, $$invalidate) {
let x = 0;
const click_handler = () => {
if (true) $$invalidate(0, x += 1);
if (true) $$invalidate({ i: 0, ret: x += 1 });
};
return [x, click_handler];

@ -59,7 +59,7 @@ function instance($$self, $$props, $$invalidate) {
const click_handler = () => {
things.push(1);
$$invalidate(0, things);
$$invalidate({ i: 0, ret: things });
};
return [things, click_handler];

@ -104,7 +104,7 @@ function instance($$self, $$props, $$invalidate) {
function div_binding($$value) {
binding_callbacks[$$value ? "unshift" : "push"](() => {
$$invalidate(0, node = $$value);
$$invalidate({ i: 0, ret: node = $$value });
});
}
@ -113,7 +113,7 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$inject_state = $$props => {
if ("node" in $$props) $$invalidate(0, node = $$props.node);
if ("node" in $$props) $$invalidate({ i: 0, ret: node = $$props.node });
};
$: {

@ -109,66 +109,76 @@ function instance($$self, $$props, $$invalidate) {
function audio_progress_handler() {
buffered = time_ranges_to_array(this.buffered);
$$invalidate(0, buffered);
$$invalidate({ i: 0, ret: buffered });
}
function audio_loadedmetadata_handler() {
buffered = time_ranges_to_array(this.buffered);
seekable = time_ranges_to_array(this.seekable);
$$invalidate(0, buffered);
$$invalidate(1, seekable);
$$invalidate({ i: 0, ret: buffered });
$$invalidate({ i: 1, ret: seekable });
}
function audio_timeupdate_handler() {
played = time_ranges_to_array(this.played);
currentTime = this.currentTime;
ended = this.ended;
$$invalidate(2, played);
$$invalidate(3, currentTime);
$$invalidate(9, ended);
$$invalidate({ i: 2, ret: played });
$$invalidate({ i: 3, ret: currentTime });
$$invalidate({ i: 9, ret: ended });
}
function audio_durationchange_handler() {
duration = this.duration;
$$invalidate(4, duration);
$$invalidate({ i: 4, ret: duration });
}
function audio_play_pause_handler() {
paused = this.paused;
$$invalidate(5, paused);
$$invalidate({ i: 5, ret: paused });
}
function audio_volumechange_handler() {
volume = this.volume;
$$invalidate(6, volume);
$$invalidate({ i: 6, ret: volume });
}
function audio_ratechange_handler() {
playbackRate = this.playbackRate;
$$invalidate(7, playbackRate);
$$invalidate({ i: 7, ret: playbackRate });
}
function audio_seeking_seeked_handler() {
seeking = this.seeking;
$$invalidate(8, seeking);
$$invalidate({ i: 8, ret: seeking });
}
function audio_ended_handler() {
ended = this.ended;
$$invalidate(9, ended);
$$invalidate({ i: 9, ret: ended });
}
$$self.$set = $$props => {
if ("buffered" in $$props) $$invalidate(0, buffered = $$props.buffered);
if ("seekable" in $$props) $$invalidate(1, seekable = $$props.seekable);
if ("played" in $$props) $$invalidate(2, played = $$props.played);
if ("currentTime" in $$props) $$invalidate(3, currentTime = $$props.currentTime);
if ("duration" in $$props) $$invalidate(4, duration = $$props.duration);
if ("paused" in $$props) $$invalidate(5, paused = $$props.paused);
if ("volume" in $$props) $$invalidate(6, volume = $$props.volume);
if ("playbackRate" in $$props) $$invalidate(7, playbackRate = $$props.playbackRate);
if ("seeking" in $$props) $$invalidate(8, seeking = $$props.seeking);
if ("ended" in $$props) $$invalidate(9, ended = $$props.ended);
if ("buffered" in $$props) $$invalidate({ i: 0, ret: buffered = $$props.buffered });
if ("seekable" in $$props) $$invalidate({ i: 1, ret: seekable = $$props.seekable });
if ("played" in $$props) $$invalidate({ i: 2, ret: played = $$props.played });
if ("currentTime" in $$props) $$invalidate({
i: 3,
ret: currentTime = $$props.currentTime
});
if ("duration" in $$props) $$invalidate({ i: 4, ret: duration = $$props.duration });
if ("paused" in $$props) $$invalidate({ i: 5, ret: paused = $$props.paused });
if ("volume" in $$props) $$invalidate({ i: 6, ret: volume = $$props.volume });
if ("playbackRate" in $$props) $$invalidate({
i: 7,
ret: playbackRate = $$props.playbackRate
});
if ("seeking" in $$props) $$invalidate({ i: 8, ret: seeking = $$props.seeking });
if ("ended" in $$props) $$invalidate({ i: 9, ret: ended = $$props.ended });
};
return [

@ -7,12 +7,12 @@ function instance($$self, $$props, $$invalidate) {
let b;
$$self.$set = $$props => {
if ("x" in $$props) $$invalidate(0, x = $$props.x);
if ("x" in $$props) $$invalidate({ i: 0, ret: x = $$props.x });
};
$$self.$$.update = () => {
if ($$self.$$.dirty & /*x*/ 1) {
$: $$invalidate(2, b = x);
$: $$invalidate({ i: 2, ret: b = x });
}
if ($$self.$$.dirty & /*b*/ 4) {

@ -6,8 +6,8 @@ function instance($$self, $$props, $$invalidate) {
let { b = 2 } = $$props;
$$self.$set = $$props => {
if ("a" in $$props) $$invalidate(0, a = $$props.a);
if ("b" in $$props) $$invalidate(1, b = $$props.b);
if ("a" in $$props) $$invalidate({ i: 0, ret: a = $$props.a });
if ("b" in $$props) $$invalidate({ i: 1, ret: b = $$props.b });
};
$$self.$$.update = () => {

@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) {
let { current } = $$props;
$$self.$set = $$props => {
if ("current" in $$props) $$invalidate(0, current = $$props.current);
if ("current" in $$props) $$invalidate({ i: 0, ret: current = $$props.current });
};
return [current];

@ -68,8 +68,8 @@ function instance($$self, $$props, $$invalidate) {
let { slug } = $$props;
$$self.$set = $$props => {
if ("url" in $$props) $$invalidate(0, url = $$props.url);
if ("slug" in $$props) $$invalidate(1, slug = $$props.slug);
if ("url" in $$props) $$invalidate({ i: 0, ret: url = $$props.url });
if ("slug" in $$props) $$invalidate({ i: 1, ret: slug = $$props.slug });
};
return [url, slug];

@ -23,7 +23,7 @@ function instance($$self, $$props, $$invalidate) {
let { custom } = $$props;
$$self.$set = $$props => {
if ("custom" in $$props) $$invalidate(0, custom = $$props.custom);
if ("custom" in $$props) $$invalidate({ i: 0, ret: custom = $$props.custom });
};
return [custom];

@ -123,8 +123,8 @@ function instance($$self, $$props, $$invalidate) {
let { y } = $$props;
$$self.$set = $$props => {
if ("x" in $$props) $$invalidate(0, x = $$props.x);
if ("y" in $$props) $$invalidate(1, y = $$props.y);
if ("x" in $$props) $$invalidate({ i: 0, ret: x = $$props.x });
if ("y" in $$props) $$invalidate({ i: 1, ret: y = $$props.y });
};
return [x, y];

@ -101,7 +101,7 @@ function instance($$self, $$props, $$invalidate) {
let { num = 1 } = $$props;
$$self.$set = $$props => {
if ("num" in $$props) $$invalidate(0, num = $$props.num);
if ("num" in $$props) $$invalidate({ i: 0, ret: num = $$props.num });
};
return [num];

@ -76,7 +76,7 @@ function instance($$self, $$props, $$invalidate) {
const world3 = "world";
function foo() {
$$invalidate(0, world3 = "svelte");
$$invalidate({ i: 0, ret: world3 = "svelte" });
}
return [world3];

@ -44,7 +44,7 @@ function instance($$self, $$props, $$invalidate) {
onMount(() => {
const interval = setInterval(
() => {
$$invalidate(1, b += 1);
$$invalidate({ i: 1, ret: b += 1 });
c += 1;
console.log(b, c);
},
@ -59,7 +59,7 @@ function instance($$self, $$props, $$invalidate) {
$$self.$$.update = () => {
if ($$self.$$.dirty & /*b*/ 2) {
$: $$invalidate(0, y = b * 2);
$: $$invalidate({ i: 0, ret: y = b * 2 });
}
};

@ -244,11 +244,11 @@ function instance($$self, $$props, $$invalidate) {
let { e } = $$props;
$$self.$set = $$props => {
if ("a" in $$props) $$invalidate(0, a = $$props.a);
if ("b" in $$props) $$invalidate(1, b = $$props.b);
if ("c" in $$props) $$invalidate(2, c = $$props.c);
if ("d" in $$props) $$invalidate(3, d = $$props.d);
if ("e" in $$props) $$invalidate(4, e = $$props.e);
if ("a" in $$props) $$invalidate({ i: 0, ret: a = $$props.a });
if ("b" in $$props) $$invalidate({ i: 1, ret: b = $$props.b });
if ("c" in $$props) $$invalidate({ i: 2, ret: c = $$props.c });
if ("d" in $$props) $$invalidate({ i: 3, ret: d = $$props.d });
if ("e" in $$props) $$invalidate({ i: 4, ret: e = $$props.e });
};
return [a, b, c, d, e];

@ -72,26 +72,41 @@ function instance($$self, $$props, $$invalidate) {
function video_timeupdate_handler() {
currentTime = this.currentTime;
$$invalidate(0, currentTime);
$$invalidate({ i: 0, ret: currentTime });
}
function video_resize_handler() {
videoHeight = this.videoHeight;
videoWidth = this.videoWidth;
$$invalidate(1, videoHeight);
$$invalidate(2, videoWidth);
$$invalidate({ i: 1, ret: videoHeight });
$$invalidate({ i: 2, ret: videoWidth });
}
function video_elementresize_handler() {
offsetWidth = this.offsetWidth;
$$invalidate(3, offsetWidth);
$$invalidate({ i: 3, ret: offsetWidth });
}
$$self.$set = $$props => {
if ("currentTime" in $$props) $$invalidate(0, currentTime = $$props.currentTime);
if ("videoHeight" in $$props) $$invalidate(1, videoHeight = $$props.videoHeight);
if ("videoWidth" in $$props) $$invalidate(2, videoWidth = $$props.videoWidth);
if ("offsetWidth" in $$props) $$invalidate(3, offsetWidth = $$props.offsetWidth);
if ("currentTime" in $$props) $$invalidate({
i: 0,
ret: currentTime = $$props.currentTime
});
if ("videoHeight" in $$props) $$invalidate({
i: 1,
ret: videoHeight = $$props.videoHeight
});
if ("videoWidth" in $$props) $$invalidate({
i: 2,
ret: videoWidth = $$props.videoWidth
});
if ("offsetWidth" in $$props) $$invalidate({
i: 3,
ret: offsetWidth = $$props.offsetWidth
});
};
return [

@ -34,7 +34,7 @@ function instance($$self, $$props, $$invalidate) {
let online;
function onlinestatuschanged() {
$$invalidate(0, online = navigator.onLine);
$$invalidate({ i: 0, ret: online = navigator.onLine });
}
return [online, onlinestatuschanged];

@ -69,11 +69,11 @@ function instance($$self, $$props, $$invalidate) {
let { y } = $$props;
function onwindowscroll() {
$$invalidate(0, y = window.pageYOffset)
$$invalidate({ i: 0, ret: y = window.pageYOffset })
}
$$self.$set = $$props => {
if ("y" in $$props) $$invalidate(0, y = $$props.y);
if ("y" in $$props) $$invalidate({ i: 0, ret: y = $$props.y });
};
return [y, onwindowscroll];

@ -0,0 +1,13 @@
import { writable } from '../../../../store';
export default {
props: {
store: writable({})
},
test({ assert, target }) {
assert.htmlEqual(target.innerHTML, `
<span>undefined</span>
`);
}
};

@ -0,0 +1,7 @@
<script>
export let store;
$: ({ undefinedProperty } = $store);
</script>
<span>{undefinedProperty}</span>
Loading…
Cancel
Save