add back accidentally removed one

pull/14111/head
Ben McCann 2 years ago
parent 02f469bd60
commit 3c0d0af852

@ -654,6 +654,12 @@ HTML restricts where certain elements can appear. In case of a violation the bro
This code will work when the component is rendered on the client (which is why this is a warning rather than an error), but if you use server rendering it will cause hydration to fail. This code will work when the component is rendered on the client (which is why this is a warning rather than an error), but if you use server rendering it will cause hydration to fail.
### non_reactive_update
```
`%name%` is updated, but is not declared with `$state(...)`. Changing its value will not correctly trigger updates
```
### options_deprecated_accessors ### options_deprecated_accessors
``` ```

@ -6,6 +6,10 @@
> Svelte 5 components are no longer classes. Instantiate them using `mount` or `hydrate` (imported from 'svelte') instead. > Svelte 5 components are no longer classes. Instantiate them using `mount` or `hydrate` (imported from 'svelte') instead.
## non_reactive_update
> `%name%` is updated, but is not declared with `$state(...)`. Changing its value will not correctly trigger updates
## perf_avoid_inline_class ## perf_avoid_inline_class
> Avoid 'new class' — instead, declare the class at the top level scope > Avoid 'new class' — instead, declare the class at the top level scope

@ -97,6 +97,7 @@ export const codes = [
"options_renamed_ssr_dom", "options_renamed_ssr_dom",
"export_let_unused", "export_let_unused",
"legacy_component_creation", "legacy_component_creation",
"non_reactive_update",
"perf_avoid_inline_class", "perf_avoid_inline_class",
"perf_avoid_nested_class", "perf_avoid_nested_class",
"reactive_declaration_invalid_placement", "reactive_declaration_invalid_placement",
@ -598,6 +599,15 @@ export function legacy_component_creation(node) {
w(node, "legacy_component_creation", "Svelte 5 components are no longer classes. Instantiate them using `mount` or `hydrate` (imported from 'svelte') instead."); w(node, "legacy_component_creation", "Svelte 5 components are no longer classes. Instantiate them using `mount` or `hydrate` (imported from 'svelte') instead.");
} }
/**
* `%name%` is updated, but is not declared with `$state(...)`. Changing its value will not correctly trigger updates
* @param {null | NodeLike} node
* @param {string} name
*/
export function non_reactive_update(node, name) {
w(node, "non_reactive_update", `\`${name}\` is updated, but is not declared with \`$state(...)\`. Changing its value will not correctly trigger updates`);
}
/** /**
* Avoid 'new class' instead, declare the class at the top level scope * Avoid 'new class' instead, declare the class at the top level scope
* @param {null | NodeLike} node * @param {null | NodeLike} node

Loading…
Cancel
Save