You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/debug-empty/expected.js

96 lines
2.0 KiB

/* generated by Svelte vX.Y.Z */
6 years ago
import {
SvelteComponentDev,
add_location,
append,
detach,
element,
init,
insert,
noop,
safe_not_equal,
set_data,
space,
6 years ago
text
} from "svelte/internal";
const file = undefined;
function create_fragment(ctx) {
6 years ago
var h1, t0, t1, t2, t3;
return {
c: function create() {
6 years ago
h1 = element("h1");
t0 = text("Hello ");
t1 = text(ctx.name);
t2 = text("!");
t3 = space();
debugger;
6 years ago
add_location(h1, file, 4, 0, 38);
},
l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
},
m: function mount(target, anchor) {
insert(target, h1, anchor);
6 years ago
append(h1, t0);
append(h1, t1);
append(h1, t2);
insert(target, t3, anchor);
},
p: function update(changed, ctx) {
if (changed.name) {
6 years ago
set_data(t1, ctx.name);
}
debugger;
},
i: noop,
o: noop,
6 years ago
d: function destroy(detaching) {
if (detaching) {
detach(h1);
detach(t3);
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { name } = $$props;
6 years ago
6 years ago
$$self.$set = $$props => {
if ('name' in $$props) $$invalidate('name', name = $$props.name);
};
return { name };
}
class SvelteComponent extends SvelteComponentDev {
constructor(options) {
super(options);
6 years ago
init(this, options, instance, create_fragment, safe_not_equal, ["name"]);
const { ctx } = this.$$;
const props = options.props || {};
if (ctx.name === undefined && !('name' in props)) {
console.warn("<SvelteComponent> was created without expected prop 'name'");
}
}
6 years ago
get name() {
throw new Error("<SvelteComponent>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
set name(value) {
throw new Error("<SvelteComponent>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
}
export default SvelteComponent;