Skip to content

Commit 85700d4

Browse files
committed
fix
1 parent 3c2ab15 commit 85700d4

16 files changed

+6431
-52
lines changed

Diff for: src/parser/typescript/analyze/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ function analyzeRuneVariables(
343343
}
344344
case "$inspect": {
345345
appendDeclareFunctionVirtualScripts(globalName, [
346-
`<T extends any[]>(...values: T): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void };`,
346+
`<T extends any[]>(...values: T): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void }`,
347347
]);
348348
break;
349349
}

Diff for: tests/fixtures/parser/ast/svelte5/docs/runes/11-1-$inspect-ts-output.json

-17
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,6 @@
9898
}
9999
},
100100
"body": [
101-
{
102-
"type": "EmptyStatement",
103-
"range": [
104-
21,
105-
21
106-
],
107-
"loc": {
108-
"start": {
109-
"line": 2,
110-
"column": 2
111-
},
112-
"end": {
113-
"line": 2,
114-
"column": 2
115-
}
116-
}
117-
},
118101
{
119102
"type": "VariableDeclaration",
120103
"kind": "let",

Diff for: tests/fixtures/parser/ast/svelte5/docs/runes/11-2-$inspect-ts-output.json

-17
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,6 @@
9898
}
9999
},
100100
"body": [
101-
{
102-
"type": "EmptyStatement",
103-
"range": [
104-
21,
105-
21
106-
],
107-
"loc": {
108-
"start": {
109-
"line": 2,
110-
"column": 2
111-
},
112-
"end": {
113-
"line": 2,
114-
"column": 2
115-
}
116-
}
117-
},
118101
{
119102
"type": "VariableDeclaration",
120103
"kind": "let",

Diff for: tests/fixtures/parser/ast/svelte5/docs/runes/11-3-$inspect-ts-output.json

-17
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,6 @@
9898
}
9999
},
100100
"body": [
101-
{
102-
"type": "EmptyStatement",
103-
"range": [
104-
21,
105-
21
106-
],
107-
"loc": {
108-
"start": {
109-
"line": 2,
110-
"column": 2
111-
},
112-
"end": {
113-
"line": 2,
114-
"column": 2
115-
}
116-
}
117-
},
118101
{
119102
"type": "VariableDeclaration",
120103
"kind": "let",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script lang="ts">
2+
let count = $state(0);
3+
4+
$inspect(count).with((type, count) => {
5+
if (type === "update") {
6+
debugger; // or `console.trace`, or whatever you want
7+
}
8+
});
9+
</script>
10+
11+
<button onclick="{() => count++}">Increment</button>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[
2+
{
3+
"ruleId": "no-unused-vars",
4+
"code": "count",
5+
"line": 4,
6+
"column": 31
7+
}
8+
]

0 commit comments

Comments
 (0)