Skip to content

Commit 6d04425

Browse files
committed
JS: Add test
1 parent d66d1a7 commit 6d04425

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export function main(foo: string) {
2+
let x = foo;
3+
console.log(x);
4+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
types
2+
| (...data: any[]) => void |
3+
| (foo: string) => void |
4+
| Console |
5+
| any |
6+
| any[] |
7+
| string |
8+
| void |
9+
jsonFiles
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import javascript
2+
3+
query predicate types(Type type) { any() }
4+
5+
query predicate jsonFiles(File file) { file.getExtension() = "json" }
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": [
4+
"src"
5+
],
6+
"compilerOptions": {
7+
"composite": true
8+
}
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"include": [],
3+
"files": [],
4+
"references": [
5+
{ "path": "./tsconfig.foo.json" },
6+
],
7+
}

0 commit comments

Comments
 (0)