Merge pull request #7584 from Microsoft/LS-rename-getSourceFile

mark LanguageService.getSourceFile as internal and rename it
This commit is contained in:
Vladimir Matveev 2016-03-24 14:05:49 -07:00
commit 55cbdc9623
5 changed files with 7 additions and 7 deletions

View file

@ -1414,7 +1414,7 @@ namespace FourSlash {
return;
}
const incrementalSourceFile = this.languageService.getSourceFile(this.activeFile.fileName);
const incrementalSourceFile = this.languageService.getNonBoundSourceFile(this.activeFile.fileName);
Utils.assertInvariants(incrementalSourceFile, /*parent:*/ undefined);
const incrementalSyntaxDiagnostics = incrementalSourceFile.parseDiagnostics;

View file

@ -423,7 +423,7 @@ namespace Harness.LanguageService {
getProgram(): ts.Program {
throw new Error("Program can not be marshaled across the shim layer.");
}
getSourceFile(fileName: string): ts.SourceFile {
getNonBoundSourceFile(fileName: string): ts.SourceFile {
throw new Error("SourceFile can not be marshaled across the shim layer.");
}
dispose(): void { this.shim.dispose({}); }

View file

@ -613,7 +613,7 @@ namespace ts.server {
throw new Error("SourceFile objects are not serializable through the server protocol.");
}
getSourceFile(fileName: string): SourceFile {
getNonBoundSourceFile(fileName: string): SourceFile {
throw new Error("SourceFile objects are not serializable through the server protocol.");
}

View file

@ -1326,7 +1326,7 @@ namespace ts.server {
}
isExternalModule(filename: string): boolean {
const sourceFile = this.languageService.getSourceFile(filename);
const sourceFile = this.languageService.getNonBoundSourceFile(filename);
return ts.isExternalModule(sourceFile);
}

View file

@ -1112,7 +1112,7 @@ namespace ts {
getProgram(): Program;
getSourceFile(fileName: string): SourceFile;
/* @internal */ getNonBoundSourceFile(fileName: string): SourceFile;
dispose(): void;
}
@ -6528,7 +6528,7 @@ namespace ts {
}
/// Syntactic features
function getSourceFile(fileName: string): SourceFile {
function getNonBoundSourceFile(fileName: string): SourceFile {
return syntaxTreeCache.getCurrentSourceFile(fileName);
}
@ -7616,7 +7616,7 @@ namespace ts {
getFormattingEditsAfterKeystroke,
getDocCommentTemplateAtPosition,
getEmitOutput,
getSourceFile,
getNonBoundSourceFile,
getProgram
};
}