mirror of https://github.com/sveltejs/svelte
Convert src/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.ts to JavaScript
parent
920f6383c8
commit
5b196405d7
@ -1,16 +1,17 @@
|
||||
import AttributeWrapper from './Attribute';
|
||||
import BindingWrapper from './Binding';
|
||||
import ElementWrapper from './index';
|
||||
|
||||
export default function handle_select_value_binding(
|
||||
attr: AttributeWrapper | BindingWrapper,
|
||||
dependencies: Set<string>
|
||||
) {
|
||||
const { parent } = attr;
|
||||
if (parent.node.name === 'select') {
|
||||
(parent as ElementWrapper).select_binding_dependencies = dependencies;
|
||||
dependencies.forEach((prop: string) => {
|
||||
parent.renderer.component.indirect_dependencies.set(prop, new Set());
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {import('./Attribute.js').default | import('./Binding.js').default} attr
|
||||
* @param {Set<string>} dependencies
|
||||
*/
|
||||
export default function handle_select_value_binding(attr, dependencies) {
|
||||
const { parent } = attr;
|
||||
if (parent.node.name === 'select') {
|
||||
( /** @type {import('./index.js').default} */(parent)).select_binding_dependencies = dependencies;
|
||||
dependencies.forEach((prop) => {
|
||||
parent.renderer.component.indirect_dependencies.set(prop, new Set());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in new issue