Merge pull request #18622 from asgerf/js/typescript-tsconfig-names

JS: Treat more file patterns as tsconfig-like files
This commit is contained in:
Asger F
2025-01-31 09:42:50 +01:00
committed by GitHub
8 changed files with 47 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
export function main(foo: string) {
let x = foo;
console.log(x);
}

View File

@@ -0,0 +1,9 @@
types
| (...data: any[]) => void |
| (foo: string) => void |
| Console |
| any |
| any[] |
| string |
| void |
jsonFiles

View File

@@ -0,0 +1,5 @@
import javascript
query predicate types(Type type) { any() }
query predicate jsonFiles(File file) { file.getExtension() = "json" }

View File

@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"include": [
"src"
],
"compilerOptions": {
"composite": true
}
}

View File

@@ -0,0 +1,7 @@
{
"include": [],
"files": [],
"references": [
{ "path": "./tsconfig.foo.json" },
],
}