remove unreachable trace_rune_duplicate error

pull/14290/head
Rich Harris 2 years ago
parent c02bab8817
commit 8461ca9e0e

@ -970,12 +970,6 @@ A `<textarea>` can have either a value attribute or (equivalently) child content
`<title>` can only contain text and {tags}
```
### trace_rune_duplicate
```
`$inspect.trace` must only be used once within the same block statement
```
### trace_rune_invalid_argument
```

@ -186,10 +186,6 @@ It's possible to export a snippet from a `<script module>` block, but only if it
Using a `$` prefix to refer to the value of a store is only possible inside `.svelte` files, where Svelte can automatically create subscriptions when a component is mounted and unsubscribe when the component is unmounted. Consider migrating to runes instead.
## trace_rune_duplicate
> `$inspect.trace` must only be used once within the same block statement
## trace_rune_invalid_argument
> `$inspect.trace` requires a string argument for the trace name

@ -469,15 +469,6 @@ export function store_invalid_subscription_module(node) {
e(node, "store_invalid_subscription_module", `Cannot reference store value outside a \`.svelte\` file\nhttps://svelte.dev/e/store_invalid_subscription_module`);
}
/**
* `$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", `\`$inspect.trace\` must only be used once within the same block statement\nhttps://svelte.dev/e/trace_rune_duplicate`);
}
/**
* `$inspect.trace` requires a string argument for the trace name
* @param {null | number | NodeLike} node

@ -157,9 +157,6 @@ export function CallExpression(node, context) {
) {
e.trace_rune_invalid_location(node);
}
if (context.state.scope.tracing) {
e.trace_rune_duplicate(node);
}
if (dev) {
context.state.scope.tracing = node.arguments[0].value;

Loading…
Cancel
Save