Change flag --singleCompilation to --isolatedModules

This commit is contained in:
Mohamed Hegazy
2015-05-18 21:49:41 -07:00
parent 79ab85e0eb
commit 1da04ba8f4
43 changed files with 91 additions and 91 deletions

View File

@@ -732,7 +732,7 @@ module ts {
let target = resolveAlias(symbol);
if (target) {
let markAlias =
(target === unknownSymbol && compilerOptions.separateCompilation) ||
(target === unknownSymbol && compilerOptions.isolatedModules) ||
(target !== unknownSymbol && (target.flags & SymbolFlags.Value) && !isConstEnumOrConstEnumOnlyModule(target));
if (markAlias) {
@@ -8889,7 +8889,7 @@ module ts {
// serialize the type metadata.
if (node && node.kind === SyntaxKind.TypeReference) {
let type = getTypeFromTypeNode(node);
let shouldCheckIfUnknownType = type === unknownType && compilerOptions.separateCompilation;
let shouldCheckIfUnknownType = type === unknownType && compilerOptions.isolatedModules;
if (!type || (!shouldCheckIfUnknownType && type.flags & (TypeFlags.Intrinsic | TypeFlags.NumberLike | TypeFlags.StringLike))) {
return;
}
@@ -10054,7 +10054,7 @@ module ts {
}
}
if (baseTypes.length || (baseTypeNode && compilerOptions.separateCompilation)) {
if (baseTypes.length || (baseTypeNode && compilerOptions.isolatedModules)) {
// Check that base type can be evaluated as expression
checkExpressionOrQualifiedName(baseTypeNode.expression);
}
@@ -10470,8 +10470,8 @@ module ts {
computeEnumMemberValues(node);
let enumIsConst = isConst(node);
if (compilerOptions.separateCompilation && enumIsConst && isInAmbientContext(node)) {
error(node.name, Diagnostics.Ambient_const_enums_are_not_allowed_when_the_separateCompilation_flag_is_provided);
if (compilerOptions.isolatedModules && enumIsConst && isInAmbientContext(node)) {
error(node.name, Diagnostics.Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided);
}
// Spec 2014 - Section 9.3:
@@ -10561,7 +10561,7 @@ module ts {
if (symbol.flags & SymbolFlags.ValueModule
&& symbol.declarations.length > 1
&& !isInAmbientContext(node)
&& isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.separateCompilation)) {
&& isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules)) {
let firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);
if (firstNonAmbientClassOrFunc) {
if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) {
@@ -11661,7 +11661,7 @@ module ts {
function isAliasResolvedToValue(symbol: Symbol): boolean {
let target = resolveAlias(symbol);
if (target === unknownSymbol && compilerOptions.separateCompilation) {
if (target === unknownSymbol && compilerOptions.isolatedModules) {
return true;
}
// const enums and modules that contain only const enums are not considered values from the emit perespective

View File

@@ -142,7 +142,7 @@ module ts {
paramType: Diagnostics.LOCATION,
},
{
name: "separateCompilation",
name: "isolatedModules",
type: "boolean",
},
{

View File

@@ -165,8 +165,8 @@ module ts {
Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1205, category: DiagnosticCategory.Error, key: "Decorators are only available when targeting ECMAScript 5 and higher." },
Decorators_are_not_valid_here: { code: 1206, category: DiagnosticCategory.Error, key: "Decorators are not valid here." },
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: DiagnosticCategory.Error, key: "Decorators cannot be applied to multiple get/set accessors of the same name." },
Cannot_compile_namespaces_when_the_separateCompilation_flag_is_provided: { code: 1208, category: DiagnosticCategory.Error, key: "Cannot compile namespaces when the '--separateCompilation' flag is provided." },
Ambient_const_enums_are_not_allowed_when_the_separateCompilation_flag_is_provided: { code: 1209, category: DiagnosticCategory.Error, key: "Ambient const enums are not allowed when the '--separateCompilation' flag is provided." },
Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: DiagnosticCategory.Error, key: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: DiagnosticCategory.Error, key: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: DiagnosticCategory.Error, key: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: DiagnosticCategory.Error, key: "A class declaration without the 'default' modifier must have a name" },
Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode" },
@@ -449,11 +449,11 @@ module ts {
Option_noEmit_cannot_be_specified_with_option_out_or_outDir: { code: 5040, category: DiagnosticCategory.Error, key: "Option 'noEmit' cannot be specified with option 'out' or 'outDir'." },
Option_noEmit_cannot_be_specified_with_option_declaration: { code: 5041, category: DiagnosticCategory.Error, key: "Option 'noEmit' cannot be specified with option 'declaration'." },
Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: DiagnosticCategory.Error, key: "Option 'project' cannot be mixed with source files on a command line." },
Option_sourceMap_cannot_be_specified_with_option_separateCompilation: { code: 5043, category: DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'separateCompilation'." },
Option_declaration_cannot_be_specified_with_option_separateCompilation: { code: 5044, category: DiagnosticCategory.Error, key: "Option 'declaration' cannot be specified with option 'separateCompilation'." },
Option_noEmitOnError_cannot_be_specified_with_option_separateCompilation: { code: 5045, category: DiagnosticCategory.Error, key: "Option 'noEmitOnError' cannot be specified with option 'separateCompilation'." },
Option_out_cannot_be_specified_with_option_separateCompilation: { code: 5046, category: DiagnosticCategory.Error, key: "Option 'out' cannot be specified with option 'separateCompilation'." },
Option_separateCompilation_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher: { code: 5047, category: DiagnosticCategory.Error, key: "Option 'separateCompilation' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher." },
Option_sourceMap_cannot_be_specified_with_option_isolatedModules: { code: 5043, category: DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'isolatedModules'." },
Option_declaration_cannot_be_specified_with_option_isolatedModules: { code: 5044, category: DiagnosticCategory.Error, key: "Option 'declaration' cannot be specified with option 'isolatedModules'." },
Option_noEmitOnError_cannot_be_specified_with_option_isolatedModules: { code: 5045, category: DiagnosticCategory.Error, key: "Option 'noEmitOnError' cannot be specified with option 'isolatedModules'." },
Option_out_cannot_be_specified_with_option_isolatedModules: { code: 5046, category: DiagnosticCategory.Error, key: "Option 'out' cannot be specified with option 'isolatedModules'." },
Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher: { code: 5047, category: DiagnosticCategory.Error, key: "Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher." },
Option_sourceMap_cannot_be_specified_with_option_inlineSourceMap: { code: 5048, category: DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'inlineSourceMap'." },
Option_sourceRoot_cannot_be_specified_with_option_inlineSourceMap: { code: 5049, category: DiagnosticCategory.Error, key: "Option 'sourceRoot' cannot be specified with option 'inlineSourceMap'." },
Option_mapRoot_cannot_be_specified_with_option_inlineSourceMap: { code: 5050, category: DiagnosticCategory.Error, key: "Option 'mapRoot' cannot be specified with option 'inlineSourceMap'." },

View File

@@ -647,11 +647,11 @@
"category": "Error",
"code": 1207
},
"Cannot compile namespaces when the '--separateCompilation' flag is provided.": {
"Cannot compile namespaces when the '--isolatedModules' flag is provided.": {
"category": "Error",
"code": 1208
},
"Ambient const enums are not allowed when the '--separateCompilation' flag is provided.": {
"Ambient const enums are not allowed when the '--isolatedModules' flag is provided.": {
"category": "Error",
"code": 1209
},
@@ -1785,23 +1785,23 @@
"category": "Error",
"code": 5042
},
"Option 'sourceMap' cannot be specified with option 'separateCompilation'.": {
"Option 'sourceMap' cannot be specified with option 'isolatedModules'.": {
"category": "Error",
"code": 5043
},
"Option 'declaration' cannot be specified with option 'separateCompilation'.": {
"Option 'declaration' cannot be specified with option 'isolatedModules'.": {
"category": "Error",
"code": 5044
},
"Option 'noEmitOnError' cannot be specified with option 'separateCompilation'.": {
"Option 'noEmitOnError' cannot be specified with option 'isolatedModules'.": {
"category": "Error",
"code": 5045
},
"Option 'out' cannot be specified with option 'separateCompilation'.": {
"Option 'out' cannot be specified with option 'isolatedModules'.": {
"category": "Error",
"code": 5046
},
"Option 'separateCompilation' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher.": {
"Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher.": {
"category": "Error",
"code": 5047
},

View File

@@ -1714,7 +1714,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
}
function tryEmitConstantValue(node: PropertyAccessExpression | ElementAccessExpression): boolean {
if (compilerOptions.separateCompilation) {
if (compilerOptions.isolatedModules) {
// do not inline enum values in separate compilation mode
return false;
}
@@ -4364,7 +4364,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
function shouldEmitEnumDeclaration(node: EnumDeclaration) {
let isConstEnum = isConst(node);
return !isConstEnum || compilerOptions.preserveConstEnums || compilerOptions.separateCompilation;
return !isConstEnum || compilerOptions.preserveConstEnums || compilerOptions.isolatedModules;
}
function emitEnumDeclaration(node: EnumDeclaration) {
@@ -4456,7 +4456,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
}
function shouldEmitModuleDeclaration(node: ModuleDeclaration) {
return isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.separateCompilation);
return isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules);
}
function isModuleMergedWithES6Class(node: ModuleDeclaration) {
@@ -5631,7 +5631,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
}
}
if (isExternalModule(node) || compilerOptions.separateCompilation) {
if (isExternalModule(node) || compilerOptions.isolatedModules) {
if (languageVersion >= ScriptTarget.ES6) {
emitES6Module(node, startIndex);
}

View File

@@ -529,21 +529,21 @@ module ts {
}
function verifyCompilerOptions() {
if (options.separateCompilation) {
if (options.isolatedModules) {
if (options.sourceMap) {
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_sourceMap_cannot_be_specified_with_option_separateCompilation));
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_sourceMap_cannot_be_specified_with_option_isolatedModules));
}
if (options.declaration) {
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_declaration_cannot_be_specified_with_option_separateCompilation));
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_declaration_cannot_be_specified_with_option_isolatedModules));
}
if (options.noEmitOnError) {
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_noEmitOnError_cannot_be_specified_with_option_separateCompilation));
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_noEmitOnError_cannot_be_specified_with_option_isolatedModules));
}
if (options.out) {
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_out_cannot_be_specified_with_option_separateCompilation));
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_out_cannot_be_specified_with_option_isolatedModules));
}
}
@@ -580,15 +580,15 @@ module ts {
let languageVersion = options.target || ScriptTarget.ES3;
let firstExternalModuleSourceFile = forEach(files, f => isExternalModule(f) ? f : undefined);
if (options.separateCompilation) {
if (options.isolatedModules) {
if (!options.module && languageVersion < ScriptTarget.ES6) {
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_separateCompilation_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher));
diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher));
}
let firstNonExternalModuleSourceFile = forEach(files, f => !isExternalModule(f) && !isDeclarationFile(f) ? f : undefined);
if (firstNonExternalModuleSourceFile) {
let span = getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile);
diagnostics.add(createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_namespaces_when_the_separateCompilation_flag_is_provided));
diagnostics.add(createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided));
}
}
else if (firstExternalModuleSourceFile && languageVersion < ScriptTarget.ES6 && !options.module) {

View File

@@ -1676,7 +1676,7 @@ module ts {
target?: ScriptTarget;
version?: boolean;
watch?: boolean;
separateCompilation?: boolean;
isolatedModules?: boolean;
emitDecoratorMetadata?: boolean;
/* @internal */ stripInternal?: boolean;
[option: string]: string | number | boolean;

View File

@@ -1438,7 +1438,7 @@ module ts {
if ((isExternalModule(sourceFile) || !compilerOptions.out)) {
// 1. in-browser single file compilation scenario
// 2. non .js file
return compilerOptions.separateCompilation || !fileExtensionIs(sourceFile.fileName, ".js");
return compilerOptions.isolatedModules || !fileExtensionIs(sourceFile.fileName, ".js");
}
return false;
}

View File

@@ -45,10 +45,10 @@ module Utils {
export function getExecutionEnvironment() {
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
return ExecutionEnvironment.CScript;
} else if (typeof window !== "undefined") {
} else if (typeof window !== "undefined") {
return ExecutionEnvironment.Browser;
} else {
return ExecutionEnvironment.Node;
} else {
return ExecutionEnvironment.Node;
}
}
@@ -1092,8 +1092,8 @@ module Harness {
options.preserveConstEnums = setting.value === 'true';
break;
case 'separatecompilation':
options.separateCompilation = setting.value === 'true';
case 'isolatedmodules':
options.isolatedModules = setting.value === 'true';
break;
case 'suppressimplicitanyindexerrors':
@@ -1509,7 +1509,7 @@ module Harness {
"noimplicitany", "noresolve", "newline", "normalizenewline", "emitbom",
"errortruncation", "usecasesensitivefilenames", "preserveconstenums",
"includebuiltfile", "suppressimplicitanyindexerrors", "stripinternal",
"separatecompilation", "inlinesourcemap", "maproot", "sourceroot",
"isolatedmodules", "inlinesourcemap", "maproot", "sourceroot",
"inlinesources", "emitdecoratormetadata"];
function extractCompilerSettings(content: string): CompilerSetting[] {

View File

@@ -1760,13 +1760,13 @@ module ts {
* This function will compile source text from 'input' argument using specified compiler options.
* If not options are provided - it will use a set of default compiler options.
* Extra compiler options that will unconditionally be used bu this function are:
* - separateCompilation = true
* - isolatedModules = true
* - allowNonTsExtensions = true
*/
export function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[]): string {
let options = compilerOptions ? clone(compilerOptions) : getDefaultCompilerOptions();
options.separateCompilation = true;
options.isolatedModules = true;
// Filename can be non-ts file.
options.allowNonTsExtensions = true;

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/separateCompilationAmbientConstEnum.ts(3,20): error TS1209: Ambient const enums are not allowed when the '--separateCompilation' flag is provided.
tests/cases/compiler/separateCompilationAmbientConstEnum.ts(3,20): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/separateCompilationAmbientConstEnum.ts (1 errors) ====
@@ -6,5 +6,5 @@ tests/cases/compiler/separateCompilationAmbientConstEnum.ts(3,20): error TS1209:
declare const enum E { X = 1}
~
!!! error TS1209: Ambient const enums are not allowed when the '--separateCompilation' flag is provided.
!!! error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided.
export var y;

View File

@@ -1,7 +1,7 @@
error TS5044: Option 'declaration' cannot be specified with option 'separateCompilation'.
error TS5044: Option 'declaration' cannot be specified with option 'isolatedModules'.
!!! error TS5044: Option 'declaration' cannot be specified with option 'separateCompilation'.
!!! error TS5044: Option 'declaration' cannot be specified with option 'isolatedModules'.
==== tests/cases/compiler/separateCompilationDeclaration.ts (0 errors) ====
export var x;

View File

@@ -1,7 +1,7 @@
error TS5045: Option 'noEmitOnError' cannot be specified with option 'separateCompilation'.
error TS5045: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'.
!!! error TS5045: Option 'noEmitOnError' cannot be specified with option 'separateCompilation'.
!!! error TS5045: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'.
==== tests/cases/compiler/separateCompilationNoEmitOnError.ts (0 errors) ====
export var x;

View File

@@ -1,8 +1,8 @@
tests/cases/compiler/separateCompilationNoExternalModule.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
tests/cases/compiler/separateCompilationNoExternalModule.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/separateCompilationNoExternalModule.ts (1 errors) ====
var x;
~~~
!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
!!! error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.

View File

@@ -1,12 +1,12 @@
error TS5046: Option 'out' cannot be specified with option 'separateCompilation'.
tests/cases/compiler/file2.ts(1,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
error TS5046: Option 'out' cannot be specified with option 'isolatedModules'.
tests/cases/compiler/file2.ts(1,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
!!! error TS5046: Option 'out' cannot be specified with option 'separateCompilation'.
!!! error TS5046: Option 'out' cannot be specified with option 'isolatedModules'.
==== tests/cases/compiler/file1.ts (0 errors) ====
export var x;
==== tests/cases/compiler/file2.ts (1 errors) ====
var y;
~~~
!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
!!! error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.

View File

@@ -1,10 +1,10 @@
tests/cases/compiler/separateCompilationPlainFile-AMD.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
tests/cases/compiler/separateCompilationPlainFile-AMD.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/separateCompilationPlainFile-AMD.ts (1 errors) ====
declare function run(a: number): void;
~~~~~~~
!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
!!! error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
run(1);

View File

@@ -1,10 +1,10 @@
tests/cases/compiler/separateCompilationPlainFile-CommonJS.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
tests/cases/compiler/separateCompilationPlainFile-CommonJS.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/separateCompilationPlainFile-CommonJS.ts (1 errors) ====
declare function run(a: number): void;
~~~~~~~
!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
!!! error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
run(1);

View File

@@ -1,10 +1,10 @@
tests/cases/compiler/separateCompilationPlainFile-ES6.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
tests/cases/compiler/separateCompilationPlainFile-ES6.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/separateCompilationPlainFile-ES6.ts (1 errors) ====
declare function run(a: number): void;
~~~~~~~
!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
!!! error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
run(1);

View File

@@ -1,10 +1,10 @@
tests/cases/compiler/separateCompilationPlainFile-System.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
tests/cases/compiler/separateCompilationPlainFile-System.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/separateCompilationPlainFile-System.ts (1 errors) ====
declare function run(a: number): void;
~~~~~~~
!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
!!! error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
run(1);

View File

@@ -1,10 +1,10 @@
tests/cases/compiler/separateCompilationPlainFile-UMD.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
tests/cases/compiler/separateCompilationPlainFile-UMD.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/separateCompilationPlainFile-UMD.ts (1 errors) ====
declare function run(a: number): void;
~~~~~~~
!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided.
!!! error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
run(1);

View File

@@ -1,7 +1,7 @@
error TS5043: Option 'sourceMap' cannot be specified with option 'separateCompilation'.
error TS5043: Option 'sourceMap' cannot be specified with option 'isolatedModules'.
!!! error TS5043: Option 'sourceMap' cannot be specified with option 'separateCompilation'.
!!! error TS5043: Option 'sourceMap' cannot be specified with option 'isolatedModules'.
==== tests/cases/compiler/separateCompilationSourceMap.ts (0 errors) ====
export var x;

View File

@@ -1,6 +1,6 @@
error TS5047: Option 'separateCompilation' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher.
error TS5047: Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher.
!!! error TS5047: Option 'separateCompilation' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher.
!!! error TS5047: Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher.
==== tests/cases/compiler/separateCompilationUnspecifiedModule.ts (0 errors) ====
export var x;

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @target: es6
// @filename: file1.ts

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @declaration: true
// @target: es6

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @target: es6
// @filename: file1.ts
export var x;

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @target: es5
// @module: commonjs

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @noEmitOnError:true
// @target: es6

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @target: es6
// @filename: file1.ts

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @target: es6
// @filename: file1.ts

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @out:all.js
// @target: es6

View File

@@ -1,6 +1,6 @@
// @target: es5
// @module: amd
// @separateCompilation: true
// @isolatedModules: true
declare function run(a: number): void;
run(1);

View File

@@ -1,6 +1,6 @@
// @target: es5
// @module: commonjs
// @separateCompilation: true
// @isolatedModules: true
declare function run(a: number): void;
run(1);

View File

@@ -1,5 +1,5 @@
// @target: es6
// @separateCompilation: true
// @isolatedModules: true
declare function run(a: number): void;
run(1);

View File

@@ -1,6 +1,6 @@
// @target: es5
// @module: system
// @separateCompilation: true
// @isolatedModules: true
declare function run(a: number): void;
run(1);

View File

@@ -1,6 +1,6 @@
// @target: es5
// @module: umd
// @separateCompilation: true
// @isolatedModules: true
declare function run(a: number): void;
run(1);

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @sourceMap:true
// @target: es6

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @module: commonjs
// @filename: file1.ts
export var x;

View File

@@ -1,3 +1,3 @@
// @separateCompilation: true
// @isolatedModules: true
// @filename: file1.ts
export var x;

View File

@@ -1,4 +1,4 @@
// @separateCompilation: true
// @isolatedModules: true
// @target: es6
// @filename: file1.d.ts

View File

@@ -1,5 +1,5 @@
// @module: system
// @separateCompilation: true
// @isolatedModules: true
import n, {x} from 'file1'
import n2 = require('file2');

View File

@@ -1,6 +1,6 @@
// @target: es5
// @module: system
// @separateCompilation: true
// @isolatedModules: true
import n, {x} from 'file1'
import n2 = require('file2');

View File

@@ -1,5 +1,5 @@
// @module: system
// @separateCompilation: true
// @isolatedModules: true
// set of tests cases that checks generation of local storage for exported names

View File

@@ -1,5 +1,5 @@
// @module: system
// @separateCompilation: true
// @isolatedModules: true
import * as ns from 'file1';
import {a, b as c} from 'file2';