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
2 changes: 1 addition & 1 deletion src/harness/fourslash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/harness/harnessLanguageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({}); }
Expand Down
2 changes: 1 addition & 1 deletion src/server/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}

Expand Down
2 changes: 1 addition & 1 deletion src/server/editorServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ namespace ts.server {
}

isExternalModule(filename: string): boolean {
const sourceFile = this.languageService.getSourceFile(filename);
const sourceFile = this.languageService.getNonBoundSourceFile(filename);
return ts.isExternalModule(sourceFile);
}

Expand Down
6 changes: 3 additions & 3 deletions src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ namespace ts {

getProgram(): Program;

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

dispose(): void;
}
Expand Down Expand Up @@ -6528,7 +6528,7 @@ namespace ts {
}

/// Syntactic features
function getSourceFile(fileName: string): SourceFile {
function getNonBoundSourceFile(fileName: string): SourceFile {
return syntaxTreeCache.getCurrentSourceFile(fileName);
}

Expand Down Expand Up @@ -7616,7 +7616,7 @@ namespace ts {
getFormattingEditsAfterKeystroke,
getDocCommentTemplateAtPosition,
getEmitOutput,
getSourceFile,
getNonBoundSourceFile,
getProgram
};
}
Expand Down