Skip to content

Commit

Permalink
update js code snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Mar 3, 2020
1 parent 926ee8f commit a89c3b0
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 8 deletions.
4 changes: 4 additions & 0 deletions test/js/samples/capture-inject-state/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
space,
subscribe,
text,
validate_slot,
validate_store
} from "svelte/internal";

Expand Down Expand Up @@ -114,6 +115,9 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
});

let { $$slots = {}, $$scope } = $$props;
validate_slot($$slots, []);

$$self.$set = $$props => {
if ("prop" in $$props) $$subscribe_prop($$invalidate(0, prop = $$props.prop));
if ("alias" in $$props) $$invalidate(1, realName = $$props.alias);
Expand Down
6 changes: 5 additions & 1 deletion test/js/samples/debug-empty/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
safe_not_equal,
set_data_dev,
space,
text
text,
validate_slot
} from "svelte/internal";

const file = undefined;
Expand Down Expand Up @@ -75,6 +76,9 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
});

let { $$slots = {}, $$scope } = $$props;
validate_slot($$slots, []);

$$self.$set = $$props => {
if ("name" in $$props) $$invalidate(0, name = $$props.name);
};
Expand Down
6 changes: 5 additions & 1 deletion test/js/samples/debug-foo-bar-baz-things/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
set_data_dev,
space,
text,
validate_each_argument
validate_each_argument,
validate_slot
} from "svelte/internal";

const file = undefined;
Expand Down Expand Up @@ -179,6 +180,9 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
});

let { $$slots = {}, $$scope } = $$props;
validate_slot($$slots, []);

$$self.$set = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
Expand Down
6 changes: 5 additions & 1 deletion test/js/samples/debug-foo/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
set_data_dev,
space,
text,
validate_each_argument
validate_each_argument,
validate_slot
} from "svelte/internal";

const file = undefined;
Expand Down Expand Up @@ -171,6 +172,9 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
});

let { $$slots = {}, $$scope } = $$props;
validate_slot($$slots, []);

$$self.$set = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
Expand Down
5 changes: 4 additions & 1 deletion test/js/samples/debug-hoisted/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
dispatch_dev,
init,
noop,
safe_not_equal
safe_not_equal,
validate_slot
} from "svelte/internal";

const file = undefined;
Expand Down Expand Up @@ -56,6 +57,8 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
});

let { $$slots = {}, $$scope } = $$props;
validate_slot($$slots, []);
$$self.$capture_state = () => ({ obj, kobzol });

$$self.$inject_state = $$props => {
Expand Down
5 changes: 4 additions & 1 deletion test/js/samples/debug-no-dependencies/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
safe_not_equal,
space,
text,
validate_each_argument
validate_each_argument,
validate_slot
} from "svelte/internal";

const file = undefined;
Expand Down Expand Up @@ -141,6 +142,8 @@ function instance($$self, $$props) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
});

let { $$slots = {}, $$scope } = $$props;
validate_slot($$slots, []);
return [];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
safe_not_equal,
set_data_dev,
space,
text
text,
validate_slot
} from "svelte/internal";

const file = undefined;
Expand Down Expand Up @@ -72,6 +73,9 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
});

let { $$slots = {}, $$scope } = $$props;
validate_slot($$slots, []);

$$self.$set = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
};
Expand Down
8 changes: 6 additions & 2 deletions test/js/samples/loop-protect/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
insert_dev,
loop_guard,
noop,
safe_not_equal
safe_not_equal,
validate_slot
} from "svelte/internal";

const { console: console_1 } = globals;
Expand Down Expand Up @@ -110,6 +111,9 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console_1.warn(`<Component> was created with unknown prop '${key}'`);
});

let { $$slots = {}, $$scope } = $$props;
validate_slot($$slots, []);

function div_binding($$value) {
binding_callbacks[$$value ? "unshift" : "push"](() => {
$$invalidate(0, node = $$value);
Expand Down Expand Up @@ -161,4 +165,4 @@ class Component extends SvelteComponentDev {
}
}

export default Component;
export default Component;

0 comments on commit a89c3b0

Please sign in to comment.