Toss the System out

This commit is contained in:
Wesley Wigham committed 2015-08-27 16:52:49 -07:00
1 parent e4af02bb8b
commit f1dbf904a7
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -374,10 +374,10 @@ namespace ts {
* Read tsconfig.json file
* @param fileName The path to the config file
*/
export function readConfigFile(fileName: string, system: System): { config?: any; error?: Diagnostic } {
export function readConfigFile(fileName: string, readFile: (path: string) => string): { config?: any; error?: Diagnostic } {
let text = "";
try {
text = system.readFile(fileName);
text = readFile(fileName);
}
catch (e) {
return { error: createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) };