remove static analysis restriction

pull/15579/head
Rich Harris 1 year ago
parent 0d4add1917
commit 0b8d2fa817

@ -660,12 +660,6 @@ Cannot access a computed property of a rune
`%name%` is not a valid rune
```
### rune_invalid_options
```
Options for `%rune%` needs to be declared inline
```
### rune_invalid_usage
```

@ -162,10 +162,6 @@ This turned out to be buggy and unpredictable, particularly when working with de
> `%name%` is not a valid rune
## rune_invalid_options
> Options for `%rune%` needs to be declared inline
## rune_invalid_usage
> Cannot use `%rune%` rune in non-runes mode

@ -383,16 +383,6 @@ export function rune_invalid_name(node, name) {
e(node, 'rune_invalid_name', `\`${name}\` is not a valid rune\nhttps://svelte.dev/e/rune_invalid_name`);
}
/**
* Options for `%rune%` needs to be declared inline
* @param {null | number | NodeLike} node
* @param {string} rune
* @returns {never}
*/
export function rune_invalid_options(node, rune) {
e(node, 'rune_invalid_options', `Options for \`${rune}\` needs to be declared inline\nhttps://svelte.dev/e/rune_invalid_options`);
}
/**
* Cannot use `%rune%` rune in non-runes mode
* @param {null | number | NodeLike} node

@ -121,9 +121,6 @@ export function CallExpression(node, context) {
if (node.arguments.length > 2) {
e.rune_invalid_arguments_length(node, rune, 'at most two arguments');
}
if (node.arguments.length === 2 && node.arguments[1].type !== 'ObjectExpression') {
e.rune_invalid_options(node.arguments[1], rune);
}
}
break;

@ -1,14 +0,0 @@
[
{
"code": "rune_invalid_options",
"end": {
"column": 29,
"line": 3
},
"start": {
"column": 22,
"line": 3
},
"message": "Options for `$state` needs to be declared inline"
}
]

@ -1,4 +0,0 @@
<script>
let options = {};
let test = $state(0, options);
</script>
Loading…
Cancel
Save