File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/svelte/src/compiler/phases
3-transform/client/visitors Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2743,7 +2743,7 @@ export const template_visitors = {
2743
2743
'$.bind_property' ,
2744
2744
b . literal ( node . name ) ,
2745
2745
b . literal ( property . event ) ,
2746
- b . literal ( property . type ?? 'get' ) ,
2746
+ b . literal ( property . bidirectional ? 'set' : 'get' ) ,
2747
2747
state . node ,
2748
2748
getter ,
2749
2749
setter
Original file line number Diff line number Diff line change 2
2
* @typedef BindingProperty
3
3
* @property {string } [event] This is set if the binding corresponds to the property name on the dom element it's bound to
4
4
* and there's an event that notifies of a change to that property
5
- * @property {string } [type ] Set this to `set ` if updates are written to the dom property
5
+ * @property {boolean } [bidirectional ] Set this to `true ` if updates are written to the dom property
6
6
* @property {boolean } [omit_in_ssr] Set this to true if the binding should not be included in SSR
7
7
* @property {string[] } [valid_elements] If this is set, the binding is only valid on the given elements
8
8
* @property {string[] } [invalid_elements] If this is set, the binding is invalid on the given elements
@@ -166,7 +166,7 @@ export const binding_properties = {
166
166
// checkbox/radio
167
167
indeterminate : {
168
168
event : 'change' ,
169
- type : 'set' ,
169
+ bidirectional : true ,
170
170
valid_elements : [ 'input' ] ,
171
171
omit_in_ssr : true // no corresponding attribute
172
172
} ,
@@ -191,7 +191,7 @@ export const binding_properties = {
191
191
} ,
192
192
open : {
193
193
event : 'toggle' ,
194
- type : 'set' ,
194
+ bidirectional : true ,
195
195
valid_elements : [ 'details' ]
196
196
} ,
197
197
value : {
You can’t perform that action at this time.
0 commit comments