Merge pull request #3811 from sveltejs/gh-3508-alt

Alternative fix for #3508
pull/3823/head
Rich Harris 6 years ago committed by GitHub
commit 1273f97808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,6 +10,7 @@ Also:
* Fix edge cases in matching selectors against elements ([#1710](https://github.com/sveltejs/svelte/issues/1710)) * Fix edge cases in matching selectors against elements ([#1710](https://github.com/sveltejs/svelte/issues/1710))
* Fix several bugs related to interaction of `{...spread}` attributes with other features ([#2721](https://github.com/sveltejs/svelte/issues/2721), [#2916](https://github.com/sveltejs/svelte/issues/2916), [#3421](https://github.com/sveltejs/svelte/issues/3421), [#3681](https://github.com/sveltejs/svelte/issues/3681), [#3764](https://github.com/sveltejs/svelte/issues/3764), [#3790](https://github.com/sveltejs/svelte/issues/3790)) * Fix several bugs related to interaction of `{...spread}` attributes with other features ([#2721](https://github.com/sveltejs/svelte/issues/2721), [#2916](https://github.com/sveltejs/svelte/issues/2916), [#3421](https://github.com/sveltejs/svelte/issues/3421), [#3681](https://github.com/sveltejs/svelte/issues/3681), [#3764](https://github.com/sveltejs/svelte/issues/3764), [#3790](https://github.com/sveltejs/svelte/issues/3790))
* Allow exiting a reactive block early with `break $` ([#2828](https://github.com/sveltejs/svelte/issues/2828)) * Allow exiting a reactive block early with `break $` ([#2828](https://github.com/sveltejs/svelte/issues/2828))
* Fix binding to props that have been renamed with `export { ... as ... }` ([#3508](https://github.com/sveltejs/svelte/issues/3508))
* Fix application of style scoping class in cases of ambiguity ([#3544](https://github.com/sveltejs/svelte/issues/3544)) * Fix application of style scoping class in cases of ambiguity ([#3544](https://github.com/sveltejs/svelte/issues/3544))
* Check attributes have changed before setting them to avoid image flicker ([#3579](https://github.com/sveltejs/svelte/pull/3579)) * Check attributes have changed before setting them to avoid image flicker ([#3579](https://github.com/sveltejs/svelte/pull/3579))
* Fix generating malformed code for `{@debug}` tags with no dependencies ([#3588](https://github.com/sveltejs/svelte/issues/3588)) * Fix generating malformed code for `{@debug}` tags with no dependencies ([#3588](https://github.com/sveltejs/svelte/issues/3588))

@ -7,7 +7,7 @@ import add_to_set from '../utils/add_to_set';
import { extract_names } from '../utils/scope'; import { extract_names } from '../utils/scope';
import { invalidate } from '../utils/invalidate'; import { invalidate } from '../utils/invalidate';
import Block from './Block'; import Block from './Block';
import { ClassDeclaration, FunctionExpression, Node, Statement } from 'estree'; import { ClassDeclaration, FunctionExpression, Node, Statement, ObjectExpression } from 'estree';
export default function dom( export default function dom(
component: Component, component: Component,
@ -425,12 +425,9 @@ export default function dom(
`); `);
} }
const prop_names = x`[]`; const prop_names = x`{
${props.map(v => p`${v.export_name}: ${v.export_name === v.name ? 0 : x`"${v.name}"`}}`)}
// TODO find a more idiomatic way of doing this }` as ObjectExpression;
props.forEach(v => {
(prop_names as any).elements.push({ type: 'Literal', value: v.export_name });
});
if (options.customElement) { if (options.customElement) {
const declaration = b` const declaration = b`

@ -1,6 +1,6 @@
import { add_render_callback, flush, schedule_update, dirty_components } from './scheduler'; import { add_render_callback, flush, schedule_update, dirty_components } from './scheduler';
import { current_component, set_current_component } from './lifecycle'; import { current_component, set_current_component } from './lifecycle';
import { blank_object, is_function, run, run_all, noop } from './utils'; import { blank_object, is_function, run, run_all, noop, has_prop } from './utils';
import { children } from './dom'; import { children } from './dom';
import { transition_in } from './transitions'; import { transition_in } from './transitions';
@ -12,7 +12,7 @@ interface T$$ {
update: () => void; update: () => void;
callbacks: any; callbacks: any;
after_update: any[]; after_update: any[];
props: any; props: Record<string, 0 | string>;
fragment: null|any; fragment: null|any;
not_equal: any; not_equal: any;
before_update: any[]; before_update: any[];
@ -22,10 +22,12 @@ interface T$$ {
} }
export function bind(component, name, callback) { export function bind(component, name, callback) {
if (component.$$.props.indexOf(name) === -1) return; if (has_prop(component.$$.props, name)) {
name = component.$$.props[name] || name;
component.$$.bound[name] = callback; component.$$.bound[name] = callback;
callback(component.$$.ctx[name]); callback(component.$$.ctx[name]);
} }
}
export function mount_component(component, target, anchor) { export function mount_component(component, target, anchor) {
const { fragment, on_mount, on_destroy, after_update } = component.$$; const { fragment, on_mount, on_destroy, after_update } = component.$$;
@ -70,18 +72,18 @@ function make_dirty(component, key) {
component.$$.dirty[key] = true; component.$$.dirty[key] = true;
} }
export function init(component, options, instance, create_fragment, not_equal, prop_names) { export function init(component, options, instance, create_fragment, not_equal, props) {
const parent_component = current_component; const parent_component = current_component;
set_current_component(component); set_current_component(component);
const props = options.props || {}; const prop_values = options.props || {};
const $$: T$$ = component.$$ = { const $$: T$$ = component.$$ = {
fragment: null, fragment: null,
ctx: null, ctx: null,
// state // state
props: prop_names, props,
update: noop, update: noop,
not_equal, not_equal,
bound: blank_object(), bound: blank_object(),
@ -101,14 +103,14 @@ export function init(component, options, instance, create_fragment, not_equal, p
let ready = false; let ready = false;
$$.ctx = instance $$.ctx = instance
? instance(component, props, (key, ret, value = ret) => { ? instance(component, prop_values, (key, ret, value = ret) => {
if ($$.ctx && not_equal($$.ctx[key], $$.ctx[key] = value)) { if ($$.ctx && not_equal($$.ctx[key], $$.ctx[key] = value)) {
if ($$.bound[key]) $$.bound[key](value); if ($$.bound[key]) $$.bound[key](value);
if (ready) make_dirty(component, key); if (ready) make_dirty(component, key);
} }
return ret; return ret;
}) })
: props; : prop_values;
$$.update(); $$.update();
ready = true; ready = true;

@ -1,3 +1,5 @@
import { has_prop } from "./utils";
export function append(target: Node, node: Node) { export function append(target: Node, node: Node) {
target.appendChild(node); target.appendChild(node);
} }
@ -29,7 +31,7 @@ export function object_without_properties<T, K extends keyof T>(obj: T, exclude:
const target = {} as Pick<T, Exclude<keyof T, K>>; const target = {} as Pick<T, Exclude<keyof T, K>>;
for (const k in obj) { for (const k in obj) {
if ( if (
Object.prototype.hasOwnProperty.call(obj, k) has_prop(obj, k)
// @ts-ignore // @ts-ignore
&& exclude.indexOf(k) === -1 && exclude.indexOf(k) === -1
) { ) {

@ -105,3 +105,5 @@ export function set_store_value(store, ret, value = ret) {
store.set(value); store.set(value);
return ret; return ret;
} }
export const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);

@ -56,7 +56,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]); init(this, options, instance, create_fragment, safe_not_equal, { bar: 0 });
} }
} }

@ -52,7 +52,7 @@ function link(node) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -42,7 +42,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -58,7 +58,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["open"]); init(this, options, instance, create_fragment, safe_not_equal, { open: 0 });
} }
} }

@ -56,7 +56,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["w", "h"]); init(this, options, instance, create_fragment, safe_not_equal, { w: 0, h: 0 });
} }
} }

@ -68,7 +68,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -58,7 +58,7 @@ class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
if (!document.getElementById("svelte-1a7i8ec-style")) add_css(); if (!document.getElementById("svelte-1a7i8ec-style")) add_css();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, { foo: 0 });
} }
} }

@ -45,7 +45,7 @@ function instance($$self) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -45,7 +45,7 @@ function instance($$self) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, not_equal, []); init(this, options, instance, create_fragment, not_equal, {});
} }
} }

@ -45,7 +45,7 @@ function instance($$self) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, not_equal, []); init(this, options, instance, create_fragment, not_equal, {});
} }
} }

@ -91,7 +91,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -45,7 +45,7 @@ function instance($$self) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -48,7 +48,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -34,7 +34,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["increment"]); init(this, options, instance, create_fragment, safe_not_equal, { increment: 0 });
} }
get increment() { get increment() {

@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -32,7 +32,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["x", "a", "b"]); init(this, options, instance, create_fragment, safe_not_equal, { x: 0, a: 0, b: 0 });
} }
get a() { get a() {

@ -41,7 +41,7 @@ class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
if (!document.getElementById("svelte-1slhpfn-style")) add_css(); if (!document.getElementById("svelte-1slhpfn-style")) add_css();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -33,7 +33,7 @@ class Component extends SvelteElement {
constructor(options) { constructor(options) {
super(); super();
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`; this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
init(this, { target: this.shadowRoot }, null, create_fragment, safe_not_equal, []); init(this, { target: this.shadowRoot }, null, create_fragment, safe_not_equal, {});
if (options) { if (options) {
if (options.target) { if (options.target) {

@ -56,7 +56,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]); init(this, options, instance, create_fragment, safe_not_equal, { bar: 0 });
} }
} }

@ -92,7 +92,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponentDev { class Component extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, instance, create_fragment, safe_not_equal, ["name"]); init(this, options, instance, create_fragment, safe_not_equal, { name: 0 });
dispatch_dev("SvelteRegisterComponent", { dispatch_dev("SvelteRegisterComponent", {
component: this, component: this,

@ -192,7 +192,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponentDev { class Component extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, instance, create_fragment, safe_not_equal, ["things", "foo", "bar", "baz"]); init(this, options, instance, create_fragment, safe_not_equal, { things: 0, foo: 0, bar: 0, baz: 0 });
dispatch_dev("SvelteRegisterComponent", { dispatch_dev("SvelteRegisterComponent", {
component: this, component: this,

@ -186,7 +186,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponentDev { class Component extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, instance, create_fragment, safe_not_equal, ["things", "foo"]); init(this, options, instance, create_fragment, safe_not_equal, { things: 0, foo: 0 });
dispatch_dev("SvelteRegisterComponent", { dispatch_dev("SvelteRegisterComponent", {
component: this, component: this,

@ -64,7 +64,7 @@ function instance($$self) {
class Component extends SvelteComponentDev { class Component extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
dispatch_dev("SvelteRegisterComponent", { dispatch_dev("SvelteRegisterComponent", {
component: this, component: this,

@ -132,7 +132,7 @@ function create_fragment(ctx) {
class Component extends SvelteComponentDev { class Component extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
dispatch_dev("SvelteRegisterComponent", { dispatch_dev("SvelteRegisterComponent", {
component: this, component: this,

@ -112,7 +112,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["createElement"]); init(this, options, instance, create_fragment, safe_not_equal, { createElement: 0 });
} }
} }

@ -29,7 +29,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, { foo: 0 });
} }
} }

@ -96,7 +96,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponentDev { class Component extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, { foo: 0 });
dispatch_dev("SvelteRegisterComponent", { dispatch_dev("SvelteRegisterComponent", {
component: this, component: this,

@ -38,7 +38,7 @@ function make_uppercase() {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -44,7 +44,7 @@ const func = () => import("./Foo.svelte");
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -118,7 +118,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["a", "b", "c", "d", "e"]); init(this, options, instance, create_fragment, safe_not_equal, { a: 0, b: 0, c: 0, d: 0, e: 0 });
} }
} }

@ -163,7 +163,13 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["comments", "elapsed", "time", "foo"]);
init(this, options, instance, create_fragment, safe_not_equal, {
comments: 0,
elapsed: 0,
time: 0,
foo: 0
});
} }
} }

@ -134,7 +134,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["things"]); init(this, options, instance, create_fragment, safe_not_equal, { things: 0 });
} }
} }

@ -103,7 +103,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["things"]); init(this, options, instance, create_fragment, safe_not_equal, { things: 0 });
} }
} }

@ -39,7 +39,7 @@ const touchstart_handler = e => e.preventDefault();
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -71,7 +71,7 @@ function handleClick() {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -39,7 +39,7 @@ function create_fragment(ctx) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -37,7 +37,7 @@ function get_answer() {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -37,7 +37,7 @@ function get_answer() {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -59,7 +59,7 @@ function instance($$self) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -96,7 +96,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, { foo: 0 });
} }
} }

@ -75,7 +75,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, { foo: 0 });
} }
} }

@ -55,7 +55,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["color", "x", "y"]); init(this, options, instance, create_fragment, safe_not_equal, { color: 0, x: 0, y: 0 });
} }
} }

@ -46,7 +46,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["data"]); init(this, options, instance, create_fragment, safe_not_equal, { data: 0 });
} }
} }

@ -46,7 +46,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["color"]); init(this, options, instance, create_fragment, safe_not_equal, { color: 0 });
} }
} }

@ -64,7 +64,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["style", "key", "value"]); init(this, options, instance, create_fragment, safe_not_equal, { style: 0, key: 0, value: 0 });
} }
} }

@ -34,7 +34,7 @@ let color = "red";
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -52,7 +52,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["files"]); init(this, options, instance, create_fragment, safe_not_equal, { files: 0 });
} }
} }

@ -80,7 +80,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -63,7 +63,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["value"]); init(this, options, instance, create_fragment, safe_not_equal, { value: 0 });
} }
} }

@ -56,7 +56,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, { foo: 0 });
} }
} }

@ -65,7 +65,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -65,7 +65,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -32,7 +32,7 @@ function create_fragment(ctx) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -166,16 +166,16 @@ class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, [ init(this, options, instance, create_fragment, safe_not_equal, {
"buffered", buffered: 0,
"seekable", seekable: 0,
"played", played: 0,
"currentTime", currentTime: 0,
"duration", duration: 0,
"paused", paused: 0,
"volume", volume: 0,
"playbackRate" playbackRate: 0
]); });
} }
} }

@ -55,7 +55,7 @@ function create_fragment(ctx) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -33,7 +33,7 @@ let name = "world";
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -36,7 +36,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["x"]); init(this, options, instance, create_fragment, safe_not_equal, { x: 0 });
} }
} }

@ -32,7 +32,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["a", "b"]); init(this, options, instance, create_fragment, safe_not_equal, { a: 0, b: 0 });
} }
} }

@ -75,7 +75,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["current"]); init(this, options, instance, create_fragment, safe_not_equal, { current: 0 });
} }
} }

@ -20,7 +20,7 @@ function foo(bar) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, ["foo"]); init(this, options, null, create_fragment, safe_not_equal, { foo: 0 });
} }
get foo() { get foo() {

@ -38,7 +38,7 @@ function create_fragment(ctx) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, null, create_fragment, safe_not_equal, []); init(this, options, null, create_fragment, safe_not_equal, {});
} }
} }

@ -31,7 +31,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["custom"]); init(this, options, instance, create_fragment, safe_not_equal, { custom: 0 });
} }
} }

@ -131,7 +131,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["x", "y"]); init(this, options, instance, create_fragment, safe_not_equal, { x: 0, y: 0 });
} }
} }

@ -109,7 +109,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["num"]); init(this, options, instance, create_fragment, safe_not_equal, { num: 0 });
} }
} }

@ -84,7 +84,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -72,7 +72,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -252,7 +252,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["a", "b", "c", "d", "e"]); init(this, options, instance, create_fragment, safe_not_equal, { a: 0, b: 0, c: 0, d: 0, e: 0 });
} }
} }

@ -42,7 +42,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, []); init(this, options, instance, create_fragment, safe_not_equal, {});
} }
} }

@ -81,7 +81,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent { class Component extends SvelteComponent {
constructor(options) { constructor(options) {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["y"]); init(this, options, instance, create_fragment, safe_not_equal, { y: 0 });
} }
} }

@ -0,0 +1,4 @@
<script>
let foo = 42;
export { foo as bar };
</script>

@ -0,0 +1,5 @@
export default {
html: `
<div>42</div>
`
};

@ -0,0 +1,8 @@
<script>
import Widget from './Widget.svelte';
let bar;
</script>
<Widget bind:bar/>
<div>{bar}</div>
Loading…
Cancel
Save