-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhover-value-test.stx
More file actions
57 lines (46 loc) · 1.39 KB
/
hover-value-test.stx
File metadata and controls
57 lines (46 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>STX Hover Value Test</title>
</head>
<body>
@ts
interface User {
name: string
age: number
}
const user: User = { name: "John", age: 30 }
const count = 1
@endts
<h1>Hover Test - Variable Values</h1>
<!-- Test 1: Property hover should show: (property) user.name: string with Value: "John" -->
<div>{{ user.name }}</div>
<!-- Test 2: Variable hover should show: const count: number = 1 -->
<div>{{ count }}</div>
<!-- Additional test cases -->
@ts
const message = "Hello World"
const price = 99.99
const isActive = true
const items = [1, 2, 3]
@endts
<div>
<p>{{ message }}</p> <!-- Should show: const message: string = "Hello World" -->
<p>{{ price }}</p> <!-- Should show: const price: number = 99.99 -->
<p>{{ isActive }}</p> <!-- Should show: const isActive: boolean = true -->
<p>{{ items }}</p> <!-- Should show: const items: array = [1, 2, 3] -->
</div>
<!-- Test with explicit types and values -->
@ts
const greeting: string = "Hi there"
const total: number = 100
const enabled: boolean = false
@endts
<div>
<p>{{ greeting }}</p> <!-- Should show: const greeting: string = "Hi there" -->
<p>{{ total }}</p> <!-- Should show: const total: number = 100 -->
<p>{{ enabled }}</p> <!-- Should show: const enabled: boolean = false -->
</div>
</body>
</html>