forked from sveltejs/svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpected.js
77 lines (65 loc) · 1.18 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
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
append,
detach,
element,
init,
insert,
listen,
noop,
safe_not_equal,
set_data,
space,
text
} from "svelte/internal";
function create_fragment(ctx) {
var button, t1, p, t2, t3, dispose;
return {
c() {
button = element("button");
button.textContent = "foo";
t1 = space();
p = element("p");
t2 = text("x: ");
t3 = text(ctx.x);
dispose = listen(button, "click", ctx.click_handler);
},
m(target, anchor) {
insert(target, button, anchor);
insert(target, t1, anchor);
insert(target, p, anchor);
append(p, t2);
append(p, t3);
},
p(changed, ctx) {
if (changed.x) {
set_data(t3, ctx.x);
}
},
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(button);
detach(t1);
detach(p);
}
dispose();
}
};
}
function instance($$self, $$props, $$invalidate) {
let x = 0;
function click_handler() {
if (true) { x += 1; $$invalidate('x', x); }
}
return { x, click_handler };
}
class Component extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, []);
}
}
export default Component;