Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
baseballyama committed Jan 21, 2024
1 parent 3c2ab15 commit 85700d4
Show file tree
Hide file tree
Showing 16 changed files with 6,431 additions and 52 deletions.
2 changes: 1 addition & 1 deletion src/parser/typescript/analyze/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function analyzeRuneVariables(
}
case "$inspect": {
appendDeclareFunctionVirtualScripts(globalName, [
`<T extends any[]>(...values: T): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void };`,
`<T extends any[]>(...values: T): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void }`,
]);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,6 @@
}
},
"body": [
{
"type": "EmptyStatement",
"range": [
21,
21
],
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 2
}
}
},
{
"type": "VariableDeclaration",
"kind": "let",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,6 @@
}
},
"body": [
{
"type": "EmptyStatement",
"range": [
21,
21
],
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 2
}
}
},
{
"type": "VariableDeclaration",
"kind": "let",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,6 @@
}
},
"body": [
{
"type": "EmptyStatement",
"range": [
21,
21
],
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 2
}
}
},
{
"type": "VariableDeclaration",
"kind": "let",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script lang="ts">
let count = $state(0);
$inspect(count).with((type, count) => {
if (type === "update") {
debugger; // or `console.trace`, or whatever you want
}
});
</script>

<button onclick="{() => count++}">Increment</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"ruleId": "no-unused-vars",
"code": "count",
"line": 4,
"column": 31
}
]

0 comments on commit 85700d4

Please sign in to comment.