Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Oct 14, 2022
1 parent 39e3c36 commit 857069e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/compiler/compile/render_dom/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,16 +386,6 @@ export default function dom(
${component.compile_options.dev && b`@validate_store(${name.slice(1)}, '${name.slice(1)}');`}
@component_subscribe($$self, ${name.slice(1)}, $$value => $$invalidate(${renderer.context_lookup.get(name).index}, ${name} = $$value));
`);

// const reactive_store_non_hoistable_subscriptions = reactive_stores
// .filter(store => {
// const variable = component.var_lookup.get(store.name.slice(1));
// return !variable || variable.hoistable;
// })
// .map(({ name }) => b`
// ${component.compile_options.dev && b`@validate_store(${name.slice(1)}, '${name.slice(1)}');`}
// @component_subscribe($$self, ${name.slice(1)}, $$value => $$invalidate(${renderer.context_lookup.get(name).index}, ${name} = $$value));
// `);

const resubscribable_reactive_store_unsubscribers = reactive_stores
.filter(store => {
Expand All @@ -405,8 +395,8 @@ export default function dom(
.map(({ name }) => b`$$self.$$.on_destroy.push(() => ${`$$unsubscribe_${name.slice(1)}`}());`);

if (has_definition) {
const reactive_declarations: (Node | Node[]) = [];
const fixed_reactive_declarations: Node[] = []; // not really 'reactive' but whatever
const reactive_declarations: Node[] = [];
const fixed_reactive_declarations: Array<Node | Node[]> = []; // not really 'reactive' but whatever

component.reactive_declarations.forEach(d => {
const dependencies = Array.from(d.dependencies);
Expand Down

0 comments on commit 857069e

Please sign in to comment.