Skip to content

Commit 0416fc8

Browse files
committed
more tests
1 parent 4e501d2 commit 0416fc8

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script>
2+
class Foo {
3+
foo = $state(0)
4+
}
5+
function bar() {
6+
const a = new Foo();
7+
}
8+
</script>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script>
2+
function bar() {
3+
const a = new class Foo {
4+
foo = $state(0)
5+
}
6+
}
7+
</script>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"code": "inline-new-class",
4+
"message": "Creating inline classes will likely cause performance issues. Instead, declare the class at the module-level and create new instances from the class reference.",
5+
"start": {
6+
"column": 12,
7+
"line": 3
8+
},
9+
"end": {
10+
"column": 3,
11+
"line": 5
12+
}
13+
}
14+
]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<script context="module">
2+
const a = new class Foo {
3+
foo = $state(0)
4+
}
5+
</script>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

0 commit comments

Comments
 (0)