-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-extension.yaml
More file actions
42 lines (33 loc) · 903 Bytes
/
test-extension.yaml
File metadata and controls
42 lines (33 loc) · 903 Bytes
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
# Quick Test File - Use this to verify the extension works
name: Extension Test
# TEST 1: Type mismatch (should show error)
test1:
code: |
const myNumber: number = "this is a string";
# TEST 2: Missing property (should show error)
test2:
code: |
interface Person {
name: string;
age: number;
email: string;
}
const person: Person = {
name: "Alice",
age: 30
// Missing 'email' - should error!
};
# TEST 3: Invalid union type (should show error)
test3:
code: |
type Status = "active" | "inactive" | "pending";
const myStatus: Status = "invalid";
# TEST 4: Function parameter error (should show error)
test4:
code: |
function greet(name: string): string {
return `Hello, ${name}`;
}
greet(123); // Wrong type!
# If you see RED SQUIGGLY LINES under the errors above,
# the extension is working! 🎉