Skip to content

Commit 2ca0e7d

Browse files
committed
TS: Disable output from tracing
1 parent 8f478f7 commit 2ca0e7d

File tree

2 files changed

+9
-1
lines changed
  • javascript
    • extractor/lib/typescript/src
    • ql/test/library-tests/TypeScript/RegressionTests/TraceResolution

2 files changed

+9
-1
lines changed

javascript/extractor/lib/typescript/src/common.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export class Project {
1212
}
1313

1414
public load(): void {
15-
this.program = ts.createProgram(this.config.fileNames, this.config.options);
15+
let host = ts.createCompilerHost(this.config.options, true);
16+
host.trace = undefined; // Disable tracing which would otherwise go to standard out
17+
this.program = ts.createProgram(this.config.fileNames, this.config.options, host);
1618
this.typeTable.setProgram(this.program);
1719
}
1820

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
| node_modules/@types/foo/index.d.ts:1:17:1:19 | foo | () => any |
2+
| test.ts:1:10:1:12 | foo | () => any |
3+
| test.ts:1:10:1:12 | foo | () => any |
4+
| test.ts:1:21:1:25 | "foo" | any |
5+
| test.ts:3:1:3:3 | foo | () => any |
6+
| test.ts:3:1:3:5 | foo() | any |

0 commit comments

Comments
 (0)