From d50ce1cb4783537cd0a18dbff99a97fc680a8ee4 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 18 Nov 2014 12:05:40 -0800 Subject: [PATCH] Refactoring compiler utility-related files to use short-hand --- src/compiler/commandLineParser.ts | 6 +++--- src/compiler/core.ts | 18 +++++++++--------- src/compiler/sys.ts | 10 +++++----- src/compiler/types.ts | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 5e61e9e1cb7..3fabf6c8588 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -153,9 +153,9 @@ module ts { parseStrings(commandLine); return { - options: options, - filenames: filenames, - errors: errors + options, + filenames, + errors }; function parseStrings(args: string[]) { diff --git a/src/compiler/core.ts b/src/compiler/core.ts index e512688fee2..2c613996689 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -258,9 +258,9 @@ module ts { } return { - file: file, - start: start, - length: length, + file, + start, + length, messageText: text, category: message.category, @@ -335,12 +335,12 @@ module ts { } return { - file: file, - start: start, - length: length, - code: code, - category: category, - messageText: messageText + file, + start, + length, + code, + category, + messageText }; } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index d685a30d959..e58d08589ba 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -99,14 +99,14 @@ var sys: System = (function () { } return { - args: args, + args, newLine: "\r\n", useCaseSensitiveFileNames: false, write(s: string): void { WScript.StdOut.Write(s); }, - readFile: readFile, - writeFile: writeFile, + readFile, + writeFile, resolvePath(path: string): string { return fso.GetAbsolutePathName(path); }, @@ -191,8 +191,8 @@ var sys: System = (function () { // 1 is a standard descriptor for stdout _fs.writeSync(1, s); }, - readFile: readFile, - writeFile: writeFile, + readFile, + writeFile, watchFile: (fileName, callback) => { // watchFile polls a file every 250ms, picking up file notifications. _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 19e0b79f423..6c176bb9552 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -713,7 +713,7 @@ module ts { getSymbolCount(): number; getTypeCount(): number; checkProgram(): void; - emitFiles(targetSourceFile?: SourceFile): EmitResult; + invokeEmitter(targetSourceFile?: SourceFile): EmitResult; getParentOfSymbol(symbol: Symbol): Symbol; getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type;