diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 1670251973a..f63cb36f9ec 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -204,7 +204,7 @@ namespace ts { { name: "target", shortName: "t", - type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6 }, + type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6, "es7": ScriptTarget.ES7 }, description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental, paramType: Diagnostics.VERSION, error: Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES6 diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 57eb848ac23..f149ceeb268 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -932,7 +932,16 @@ module Harness { } else { if (fn === defaultLibFileName) { - return languageVersion === ts.ScriptTarget.ES6 ? defaultES6LibSourceFile : defaultLibSourceFile; + switch (languageVersion) { + case ts.ScriptTarget.ES6: + case ts.ScriptTarget.ES7: + // TODO : Update to use ES7 specific lib file + return defaultES6LibSourceFile; + case ts.ScriptTarget.ES3: + case ts.ScriptTarget.ES5: + default: + return defaultLibSourceFile; + } } // Don't throw here -- the compiler might be looking for a test that actually doesn't exist as part of the TC return undefined;