Skip to content

Commit 470e0c4

Browse files
author
Orta Therox
authored
Merge pull request #277 from DragosRotaru/patch-1
Updated wiki example to match TypeScript 4.2.3
2 parents a9cc2ef + 38206fd commit 470e0c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Using-the-Compiler-API.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function compile(fileNames: string[], options: ts.CompilerOptions): void {
4747

4848
allDiagnostics.forEach(diagnostic => {
4949
if (diagnostic.file) {
50-
let { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!);
50+
let { line, character } = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start!);
5151
let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
5252
console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
5353
} else {

0 commit comments

Comments
 (0)