forked from sveltejs/svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpected.js
94 lines (77 loc) · 1.47 KB
/
expected.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
detach,
element,
empty,
init,
insert,
noop,
safe_not_equal
} from "svelte/internal";
// (5:0) {#if foo}
function create_if_block(ctx) {
var p;
return {
c() {
p = element("p");
p.textContent = "foo!";
},
m(target, anchor) {
insert(target, p, anchor);
},
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
function create_fragment(ctx) {
var if_block_anchor;
var if_block = (ctx.foo) && create_if_block(ctx);
return {
c() {
if (if_block) if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block) if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
},
p(changed, ctx) {
if (ctx.foo) {
if (!if_block) {
if_block = create_if_block(ctx);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
if_block.d(1);
if_block = null;
}
},
i: noop,
o: noop,
d(detaching) {
if (if_block) if_block.d(detaching);
if (detaching) {
detach(if_block_anchor);
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { foo } = $$props;
$$self.$set = $$props => {
if ('foo' in $$props) $$invalidate('foo', foo = $$props.foo);
};
return { foo };
}
class Component extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]);
}
}
export default Component;