From dfb32c5daeec501ae0817dadceeda1cb0d7a35c5 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Wed, 2 Dec 2015 11:49:54 -0800 Subject: [PATCH] Simplified after CR feedback. --- src/compiler/sys.ts | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 3b75a26a9a0..cd7580119b5 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -477,9 +477,7 @@ namespace ts { newLine: "\r\n", args: ChakraHost.args, useCaseSensitiveFileNames: false, - write(message: string) { - ChakraHost.echo(message); - }, + write: ChakraHost.echo, readFile(path: string, encoding?: string) { // encoding is automatically handled by the implementation in ChakraHost return ChakraHost.readFile(path); @@ -492,30 +490,14 @@ namespace ts { ChakraHost.writeFile(path, data); }, - resolvePath(path: string) { - return ChakraHost.resolvePath(path); - }, - fileExists(path: string) { - return ChakraHost.fileExists(path); - }, - directoryExists(path: string) { - return ChakraHost.directoryExists(path); - }, - createDirectory(path: string) { - ChakraHost.createDirectory(path); - }, - getExecutingFilePath() { - return ChakraHost.executingFile; - }, - getCurrentDirectory() { - return ChakraHost.currentDirectory; - }, - readDirectory(path: string, extension?: string, exclude?: string[]) { - return ChakraHost.readDirectory(path, extension, exclude); - }, - exit(exitCode?: number) { - ChakraHost.quit(exitCode); - } + resolvePath: ChakraHost.resolvePath, + fileExists: ChakraHost.fileExists, + directoryExists: ChakraHost.directoryExists, + createDirectory: ChakraHost.createDirectory, + getExecutingFilePath: () => ChakraHost.executingFile, + getCurrentDirectory: () => ChakraHost.currentDirectory, + readDirectory: ChakraHost.readDirectory, + exit: ChakraHost.quit, }; }