Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove deprecated internal method
  • Loading branch information
Andy Hanson
Andy Hanson committed May 31, 2018
commit c8b15725d036433d67c42d3363baca607269f3ad
2 changes: 1 addition & 1 deletion src/harness/harnessLanguageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ namespace Harness.LanguageService {
const proxy = makeDefaultProxy(info);
proxy.getSemanticDiagnostics = filename => {
const prev = info.languageService.getSemanticDiagnostics(filename);
const sourceFile: ts.SourceFile = info.languageService.getSourceFile(filename);
const sourceFile: ts.SourceFile = info.project.getSourceFile(ts.toPath(filename, /*basePath*/ undefined, ts.createGetCanonicalFileName(info.serverHost.useCaseSensitiveFileNames)))!;
prev.push({
category: ts.DiagnosticCategory.Warning,
file: sourceFile,
Expand Down
5 changes: 0 additions & 5 deletions src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1780,10 +1780,6 @@ namespace ts {
return syntaxTreeCache.getCurrentSourceFile(fileName);
}

function getSourceFile(fileName: string): SourceFile {
return getNonBoundSourceFile(fileName);
}

function getNameOrDottedNameSpan(fileName: string, startPos: number, _endPos: number): TextSpan | undefined {
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);

Expand Down Expand Up @@ -2291,7 +2287,6 @@ namespace ts {
getEditsForFileRename,
getEmitOutput,
getNonBoundSourceFile,
getSourceFile,
getProgram,
getApplicableRefactors,
getEditsForRefactor,
Expand Down
6 changes: 0 additions & 6 deletions src/services/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,6 @@ namespace ts {

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

/**
* @internal
* @deprecated Use ts.createSourceFile instead.
*/
getSourceFile(fileName: string): SourceFile;

dispose(): void;
}

Expand Down