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/src/compile/nodes/ThenBlock.ts

18 lines
537 B

import map_children from './shared/map_children';
import TemplateScope from './shared/TemplateScope';
import AbstractBlock from './shared/AbstractBlock';
export default class ThenBlock extends AbstractBlock {
scope: TemplateScope;
constructor(component, parent, scope, info) {
super(component, parent, scope, info);
this.scope = scope.child();
this.scope.add(parent.value, parent.expression.dependencies, this);
this.children = map_children(component, parent, this.scope, info.children);
this.warn_if_empty_block();
}
}