Change getCurrentDirectory and getDefaultLibname from passing around

function to its final value
This commit is contained in:
Yui T
2014-09-05 16:15:12 -07:00
parent 623b97f2ec
commit 537f55cede
5 changed files with 16 additions and 20 deletions

View File

@@ -1420,17 +1420,14 @@ module ts {
getNewLine: () => "\r\n",
// Need something that doesn't depend on sys.ts here
getDefaultLibFilename: (): string => {
return host.getDefaultLibFilename();
return "";
},
writeFile: (filename, data, writeByteOrderMark) => {
if (writer) {
writer(filename, data, writeByteOrderMark);
return;
}
throw Error("Error occurs: Invalid invocation to writeFile");
writer(filename, data, writeByteOrderMark);
},
getCurrentDirectory: (): string => {
return host.getCurrentDirectory();
// Return empty string as in compilerHost using with Visual Studio should not need to getCurrentDirectory since CompilerHost should have absolute path already
return "";
}
};
}