Skip to content

Commit e654442

Browse files
author
Andy
authored
Remove deprecated internal method (#24540)
1 parent 9d42ab9 commit e654442

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

Diff for: src/harness/harnessLanguageService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ namespace Harness.LanguageService {
794794
const proxy = makeDefaultProxy(info);
795795
proxy.getSemanticDiagnostics = filename => {
796796
const prev = info.languageService.getSemanticDiagnostics(filename);
797-
const sourceFile: ts.SourceFile = info.languageService.getSourceFile(filename);
797+
const sourceFile: ts.SourceFile = info.project.getSourceFile(ts.toPath(filename, /*basePath*/ undefined, ts.createGetCanonicalFileName(info.serverHost.useCaseSensitiveFileNames)))!;
798798
prev.push({
799799
category: ts.DiagnosticCategory.Warning,
800800
file: sourceFile,

Diff for: src/services/services.ts

-5
Original file line numberDiff line numberDiff line change
@@ -1780,10 +1780,6 @@ namespace ts {
17801780
return syntaxTreeCache.getCurrentSourceFile(fileName);
17811781
}
17821782

1783-
function getSourceFile(fileName: string): SourceFile {
1784-
return getNonBoundSourceFile(fileName);
1785-
}
1786-
17871783
function getNameOrDottedNameSpan(fileName: string, startPos: number, _endPos: number): TextSpan | undefined {
17881784
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
17891785

@@ -2291,7 +2287,6 @@ namespace ts {
22912287
getEditsForFileRename,
22922288
getEmitOutput,
22932289
getNonBoundSourceFile,
2294-
getSourceFile,
22952290
getProgram,
22962291
getApplicableRefactors,
22972292
getEditsForRefactor,

Diff for: src/services/types.ts

-6
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,6 @@ namespace ts {
350350

351351
/* @internal */ getNonBoundSourceFile(fileName: string): SourceFile;
352352

353-
/**
354-
* @internal
355-
* @deprecated Use ts.createSourceFile instead.
356-
*/
357-
getSourceFile(fileName: string): SourceFile;
358-
359353
dispose(): void;
360354
}
361355

0 commit comments

Comments
 (0)