Skip to content

Commit 7b8b095

Browse files
committed
fix message
1 parent 179335c commit 7b8b095

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

documentation/docs/98-reference/.generated/compile-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ Cannot use `%rune%()` more than once
579579
### props_id_invalid_placement
580580

581581
```
582-
`$props.id()` can only be affected at the top level of components as a const declaration initializer
582+
`$props.id()` can only be used at the top level of components as a variable declaration initializer
583583
```
584584

585585
### props_illegal_name

packages/svelte/messages/compile-errors/script.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ This turned out to be buggy and unpredictable, particularly when working with de
124124
125125
## props_id_invalid_placement
126126

127-
> `$props.id()` can only be affected at the top level of components as a const declaration initializer
127+
> `$props.id()` can only be used at the top level of components as a variable declaration initializer
128128
129129
## props_illegal_name
130130

packages/svelte/src/compiler/errors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,12 @@ export function props_duplicate(node, rune) {
289289
}
290290

291291
/**
292-
* `$props.id()` can only be affected at the top level of components as a const declaration initializer
292+
* `$props.id()` can only be used at the top level of components as a variable declaration initializer
293293
* @param {null | number | NodeLike} node
294294
* @returns {never}
295295
*/
296296
export function props_id_invalid_placement(node) {
297-
e(node, 'props_id_invalid_placement', `\`$props.id()\` can only be affected at the top level of components as a const declaration initializer\nhttps://svelte.dev/e/props_id_invalid_placement`);
297+
e(node, 'props_id_invalid_placement', `\`$props.id()\` can only be used at the top level of components as a variable declaration initializer\nhttps://svelte.dev/e/props_id_invalid_placement`);
298298
}
299299

300300
/**

0 commit comments

Comments
 (0)