Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated internal method #24540

Merged
1 commit merged into from
Jun 1, 2018
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
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