fix: improved warning message for legacy non-reactive properties

warning-message
Ben McCann 10 months ago
parent 9b2a8f15fb
commit 3c5316833f

@ -729,7 +729,7 @@ Reassignments of module-level declarations will not cause reactive statements to
### reactive_declaration_non_reactive_property
```
Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.
```
### script_context_deprecated

@ -28,7 +28,7 @@
## reactive_declaration_non_reactive_property
> Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
> Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.
## state_referenced_locally

@ -642,11 +642,11 @@ export function reactive_declaration_module_script_dependency(node) {
}
/**
* Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
* Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.
* @param {null | NodeLike} node
*/
export function reactive_declaration_non_reactive_property(node) {
w(node, "reactive_declaration_non_reactive_property", "Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update");
w(node, "reactive_declaration_non_reactive_property", "Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.");
}
/**

@ -1,7 +1,7 @@
[
{
"code": "reactive_declaration_non_reactive_property",
"message": "Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update",
"message": "Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.",
"start": {
"line": 4,
"column": 11

Loading…
Cancel
Save