From 16d7e5cad7df2173e18dfd1b41c78478248d1f4f Mon Sep 17 00:00:00 2001 From: Keith Mashinter Date: Sun, 26 Apr 2015 12:19:16 -0400 Subject: [PATCH] Compiler flag to specify line ending #1693 fix whitespace --- src/compiler/commandLineParser.ts | 4 ++-- src/compiler/diagnosticMessages.json | 18 +++++++++--------- src/compiler/program.ts | 2 +- src/compiler/types.ts | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 7dc56382e14..9aab24637af 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -69,9 +69,9 @@ module ts { { name: "newLine", type: { "crlf": NewLineKind.CRLF, "lf": NewLineKind.LF }, - description: Diagnostics.Emit_newline_Colon_CRLF_dos_or_LF_unix, + description: Diagnostics.Emit_newline_Colon_CRLF_dos_or_LF_unix, paramType: Diagnostics.NEWLINE, - error: Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF + error: Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF }, { name: "noEmit", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index e20f0414831..85f629cbcde 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1999,17 +1999,17 @@ "code": 6059 }, "Emit newline: 'CRLF' (dos) or 'LF' (unix).": { - "category": "Message", - "code": 6061 - }, + "category": "Message", + "code": 6061 + }, "NEWLINE": { - "category": "Message", - "code": 6062 - }, + "category": "Message", + "code": 6062 + }, "Argument for --newLine option must be 'CRLF' or 'LF'.": { - "category": "Error", - "code": 6063 - }, + "category": "Error", + "code": 6063 + }, "Variable '{0}' implicitly has an '{1}' type.": { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a3a228fc007..c54acd44a8c 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -91,7 +91,7 @@ module ts { } } - let newLine = [sys.newLine, "\r\n", "\n"][options.newLine ? Number(options.newLine) : 0]; + let newLine = [sys.newLine, "\r\n", "\n"][options.newLine ? Number(options.newLine) : 0]; return { getSourceFile, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 75eb7a954bb..c5eceadedb1 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1656,7 +1656,7 @@ module ts { locale?: string; mapRoot?: string; module?: ModuleKind; - newLine?: string; + newLine?: string; noEmit?: boolean; noEmitHelpers?: boolean; noEmitOnError?: boolean; @@ -1692,7 +1692,7 @@ module ts { export const enum NewLineKind { DEFAULT = 0, - CRLF = 1, + CRLF = 1, LF = 2, }