Skip to content

Commit

Permalink
update messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Dec 14, 2024
1 parent e69c992 commit 9b69a3b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions documentation/docs/98-reference/.generated/compile-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -973,19 +973,19 @@ A `<textarea>` can have either a value attribute or (equivalently) child content
### trace_rune_duplicate

```
`$track` must only be used once within the same block statement
`$inspect.trace` must only be used once within the same block statement
```

### trace_rune_invalid_argument

```
`$track` requires a string argument for the trace name
`$inspect.trace` requires a string argument for the trace name
```

### trace_rune_invalid_location

```
`$track` must be placed directly inside a block statement
`$inspect.trace` must be placed directly inside a block statement
```

### transition_conflict
Expand Down
6 changes: 3 additions & 3 deletions packages/svelte/messages/compile-errors/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ Using a `$` prefix to refer to the value of a store is only possible inside `.sv

## trace_rune_duplicate

> `$track` must only be used once within the same block statement
> `$inspect.trace` must only be used once within the same block statement
## trace_rune_invalid_argument

> `$track` requires a string argument for the trace name
> `$inspect.trace` requires a string argument for the trace name
## trace_rune_invalid_location

> `$track` must be placed directly inside a block statement
> `$inspect.trace` must be placed directly inside a block statement
## typescript_invalid_feature

Expand Down
14 changes: 7 additions & 7 deletions packages/svelte/src/compiler/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,30 +470,30 @@ export function store_invalid_subscription_module(node) {
}

/**
* `$track` must only be used once within the same block statement
* `$inspect.trace` must only be used once within the same block statement
* @param {null | number | NodeLike} node
* @returns {never}
*/
export function trace_rune_duplicate(node) {
e(node, "trace_rune_duplicate", "`$track` must only be used once within the same block statement");
e(node, "trace_rune_duplicate", "`$inspect.trace` must only be used once within the same block statement");
}

/**
* `$track` requires a string argument for the trace name
* `$inspect.trace` requires a string argument for the trace name
* @param {null | number | NodeLike} node
* @returns {never}
*/
export function trace_rune_invalid_argument(node) {
e(node, "trace_rune_invalid_argument", "`$track` requires a string argument for the trace name");
e(node, "trace_rune_invalid_argument", "`$inspect.trace` requires a string argument for the trace name");
}

/**
* `$track` must be placed directly inside a block statement
* `$inspect.trace` must be placed directly inside a block statement
* @param {null | number | NodeLike} node
* @returns {never}
*/
export function trace_rune_invalid_location(node) {
e(node, "trace_rune_invalid_location", "`$track` must be placed directly inside a block statement");
e(node, "trace_rune_invalid_location", "`$inspect.trace` must be placed directly inside a block statement");
}

/**
Expand Down Expand Up @@ -1590,4 +1590,4 @@ export function unexpected_reserved_word(node, word) {
*/
export function void_element_invalid_content(node) {
e(node, "void_element_invalid_content", `Void elements cannot have children or closing tags\nhttps://svelte.dev/e/void_element_invalid_content`);
}
}

0 comments on commit 9b69a3b

Please sign in to comment.