cr feedback

This commit is contained in:
zhengbli
2015-11-11 10:31:09 -08:00
parent f92d241888
commit b9778e6d20
2 changed files with 4 additions and 4 deletions

View File

@@ -1006,7 +1006,7 @@ namespace ts.server {
/**
* @param filename is absolute pathname
* @param fileContent is a known version of the file content that is more up to date
* @param fileContent is a known version of the file content that is more up to date than the one on disk
*/
openFile(fileName: string, openedByClient: boolean, fileContent?: string) {
fileName = ts.normalizePath(fileName);
@@ -1014,7 +1014,7 @@ namespace ts.server {
if (!info) {
let content: string;
if (this.host.fileExists(fileName)) {
content = fileContent ? fileContent : this.host.readFile(fileName);
content = fileContent || this.host.readFile(fileName);
}
if (!content) {
if (openedByClient) {
@@ -1061,7 +1061,7 @@ namespace ts.server {
/**
* Open file whose contents is managed by the client
* @param filename is absolute pathname
* @param fileContent is a known version of the file content that is more up to date
* @param fileContent is a known version of the file content that is more up to date than the one on disk
*/
openClientFile(fileName: string, fileContent?: string) {
this.openOrUpdateConfiguredProjectForFile(fileName);

View File

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