fix rebasing

pull/5870/head
Ivan Hofer 5 years ago
parent e4a19d28e9
commit 28e5e45c6f

@ -543,8 +543,7 @@ export default function dom(
class ${name} extends ${superclass} { class ${name} extends ${superclass} {
constructor(options) { constructor(options) {
super(${options.dev && 'options'}); super(${options.dev && 'options'});
${should_add_css && b`if (!@_document.getElementById("${component.stylesheet.id}-style")) ${add_css}();`} @init(this, options, ${definition}, ${has_create_fragment ? 'create_fragment' : 'null'}, ${not_equal}, ${prop_indexes}, ${optionalParameters});
@init(this, options, ${definition}, ${has_create_fragment ? 'create_fragment' : 'null'}, ${not_equal}, ${prop_indexes}, ${dirty});
${options.dev && b`@dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "${name.name}", options, id: create_fragment.name });`} ${options.dev && b`@dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "${name.name}", options, id: create_fragment.name });`}
${dev_props_check} ${dev_props_check}

@ -105,7 +105,7 @@ export interface SvelteComponentDev {
[accessor: string]: any; [accessor: string]: any;
} }
interface IComponentOptions<Props extends Record<string, any> = Record<string, any>> { interface IComponentOptions<Props extends Record<string, any> = Record<string, any>> {
target: Element; target: Element|ShadowRoot;
anchor?: Element; anchor?: Element;
props?: Props; props?: Props;
context?: Map<any, any>; context?: Map<any, any>;
@ -140,14 +140,7 @@ export class SvelteComponentDev extends SvelteComponent {
*/ */
$$slot_def: any; $$slot_def: any;
constructor(options: { constructor(options: IComponentOptions) {
target: Element|ShadowRoot;
anchor?: Element;
props?: Props;
hydrate?: boolean;
intro?: boolean;
$$inline?: boolean;
}) {
if (!options || (!options.target && !options.$$inline)) { if (!options || (!options.target && !options.$$inline)) {
throw new Error("'target' is a required option"); throw new Error("'target' is a required option");
} }
@ -239,14 +232,7 @@ export class SvelteComponentTyped<
*/ */
$$slot_def: Slots; $$slot_def: Slots;
constructor(options: { constructor(options: IComponentOptions) {
target: Element|ShadowRoot;
anchor?: Element;
props?: Props;
hydrate?: boolean;
intro?: boolean;
$$inline?: boolean;
}) {
super(options); super(options);
} }
} }

@ -80,10 +80,9 @@ export function create_slot(definition, ctx, $$scope, fn) {
} }
function get_slot_context(definition, ctx, $$scope, fn) { function get_slot_context(definition, ctx, $$scope, fn) {
const context = definition[1] && fn return definition[1] && fn
? assign($$scope.ctx.slice(), definition[1](fn(ctx))) ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))
: $$scope.ctx; : $$scope.ctx;
return context;
} }
export function get_slot_changes(definition, $$scope, dirty, fn) { export function get_slot_changes(definition, $$scope, dirty, fn) {

Loading…
Cancel
Save