Skip to content

Commit b9778e6

Browse files
author
zhengbli
committed
cr feedback
1 parent f92d241 commit b9778e6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/server/editorServices.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,15 +1006,15 @@ namespace ts.server {
10061006

10071007
/**
10081008
* @param filename is absolute pathname
1009-
* @param fileContent is a known version of the file content that is more up to date
1009+
* @param fileContent is a known version of the file content that is more up to date than the one on disk
10101010
*/
10111011
openFile(fileName: string, openedByClient: boolean, fileContent?: string) {
10121012
fileName = ts.normalizePath(fileName);
10131013
let info = ts.lookUp(this.filenameToScriptInfo, fileName);
10141014
if (!info) {
10151015
let content: string;
10161016
if (this.host.fileExists(fileName)) {
1017-
content = fileContent ? fileContent : this.host.readFile(fileName);
1017+
content = fileContent || this.host.readFile(fileName);
10181018
}
10191019
if (!content) {
10201020
if (openedByClient) {
@@ -1061,7 +1061,7 @@ namespace ts.server {
10611061
/**
10621062
* Open file whose contents is managed by the client
10631063
* @param filename is absolute pathname
1064-
* @param fileContent is a known version of the file content that is more up to date
1064+
* @param fileContent is a known version of the file content that is more up to date than the one on disk
10651065
*/
10661066
openClientFile(fileName: string, fileContent?: string) {
10671067
this.openOrUpdateConfiguredProjectForFile(fileName);

src/server/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ namespace ts.server {
534534

535535
/**
536536
* @param fileName is the name of the file to be opened
537-
* @param fileContent is a version of the file content that is known to be more up to date
537+
* @param fileContent is a version of the file content that is known to be more up to date than the one on disk
538538
*/
539539
private openClientFile(fileName: string, fileContent?: string) {
540540
const file = ts.normalizePath(fileName);

0 commit comments

Comments
 (0)