From 0a67ac3b3ba1490e6b967f53f5160a282dec3c61 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 9 Sep 2015 13:32:13 -0700 Subject: [PATCH 01/89] Add .js as supported extension --- src/compiler/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index a1f6565ed1f..f792c728227 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -721,7 +721,7 @@ namespace ts { /** * List of supported extensions in order of file resolution precedence. */ - export const supportedExtensions = [".ts", ".tsx", ".d.ts"]; + export const supportedExtensions = [".ts", ".tsx", ".d.ts", ".js"]; const extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; export function removeFileExtension(path: string): string { From 74a3f67250cdeb0a1621a059e88fb72043c936cb Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 9 Sep 2015 14:41:19 -0700 Subject: [PATCH 02/89] Emit the diagnostics for javascript file instead of doing semantic check --- src/compiler/program.ts | 166 +++++++++++++++++++++++++++++++++++++++ src/services/services.ts | 166 +-------------------------------------- 2 files changed, 167 insertions(+), 165 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a1861f6b462..b7a2afce07e 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -639,6 +639,13 @@ namespace ts { } function getSemanticDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken): Diagnostic[] { + // For JavaScript files, we don't want to report the normal typescript semantic errors. + // Instead, we just report errors for using TypeScript-only constructs from within a + // JavaScript file. + if (isJavaScript(sourceFile.fileName)) { + return getJavaScriptSemanticDiagnosticsForFile(sourceFile, cancellationToken); + } + return runWithCancellationToken(() => { let typeChecker = getDiagnosticsProducingTypeChecker(); @@ -651,6 +658,165 @@ namespace ts { }); } + function getJavaScriptSemanticDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken): Diagnostic[] { + return runWithCancellationToken(() => { + let diagnostics: Diagnostic[] = []; + walk(sourceFile); + + return diagnostics; + + function walk(node: Node): boolean { + if (!node) { + return false; + } + + switch (node.kind) { + case SyntaxKind.ImportEqualsDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.ExportAssignment: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.ClassDeclaration: + let classDeclaration = node; + if (checkModifiers(classDeclaration.modifiers) || + checkTypeParameters(classDeclaration.typeParameters)) { + return true; + } + break; + case SyntaxKind.HeritageClause: + let heritageClause = node; + if (heritageClause.token === SyntaxKind.ImplementsKeyword) { + diagnostics.push(createDiagnosticForNode(node, Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); + return true; + } + break; + case SyntaxKind.InterfaceDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.ModuleDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.TypeAliasDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionDeclaration: + let functionDeclaration = node; + if (checkModifiers(functionDeclaration.modifiers) || + checkTypeParameters(functionDeclaration.typeParameters) || + checkTypeAnnotation(functionDeclaration.type)) { + return true; + } + break; + case SyntaxKind.VariableStatement: + let variableStatement = node; + if (checkModifiers(variableStatement.modifiers)) { + return true; + } + break; + case SyntaxKind.VariableDeclaration: + let variableDeclaration = node; + if (checkTypeAnnotation(variableDeclaration.type)) { + return true; + } + break; + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + let expression = node; + if (expression.typeArguments && expression.typeArguments.length > 0) { + let start = expression.typeArguments.pos; + diagnostics.push(createFileDiagnostic(sourceFile, start, expression.typeArguments.end - start, + Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); + return true; + } + break; + case SyntaxKind.Parameter: + let parameter = node; + if (parameter.modifiers) { + let start = parameter.modifiers.pos; + diagnostics.push(createFileDiagnostic(sourceFile, start, parameter.modifiers.end - start, + Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); + return true; + } + if (parameter.questionToken) { + diagnostics.push(createDiagnosticForNode(parameter.questionToken, Diagnostics._0_can_only_be_used_in_a_ts_file, '?')); + return true; + } + if (parameter.type) { + diagnostics.push(createDiagnosticForNode(parameter.type, Diagnostics.types_can_only_be_used_in_a_ts_file)); + return true; + } + break; + case SyntaxKind.PropertyDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.EnumDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.TypeAssertionExpression: + let typeAssertionExpression = node; + diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.Decorator: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.decorators_can_only_be_used_in_a_ts_file)); + return true; + } + + return forEachChild(node, walk); + } + + function checkTypeParameters(typeParameters: NodeArray): boolean { + if (typeParameters) { + let start = typeParameters.pos; + diagnostics.push(createFileDiagnostic(sourceFile, start, typeParameters.end - start, Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); + return true; + } + return false; + } + + function checkTypeAnnotation(type: TypeNode): boolean { + if (type) { + diagnostics.push(createDiagnosticForNode(type, Diagnostics.types_can_only_be_used_in_a_ts_file)); + return true; + } + + return false; + } + + function checkModifiers(modifiers: ModifiersArray): boolean { + if (modifiers) { + for (let modifier of modifiers) { + switch (modifier.kind) { + case SyntaxKind.PublicKeyword: + case SyntaxKind.PrivateKeyword: + case SyntaxKind.ProtectedKeyword: + case SyntaxKind.DeclareKeyword: + diagnostics.push(createDiagnosticForNode(modifier, Diagnostics._0_can_only_be_used_in_a_ts_file, tokenToString(modifier.kind))); + return true; + + // These are all legal modifiers. + case SyntaxKind.StaticKeyword: + case SyntaxKind.ExportKeyword: + case SyntaxKind.ConstKeyword: + case SyntaxKind.DefaultKeyword: + case SyntaxKind.AbstractKeyword: + } + } + } + + return false; + } + }); + } + function getDeclarationDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken): Diagnostic[] { return runWithCancellationToken(() => { if (!isDeclarationFile(sourceFile)) { diff --git a/src/services/services.ts b/src/services/services.ts index d5ede917b8f..bc22975429a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2767,18 +2767,11 @@ namespace ts { let targetSourceFile = getValidSourceFile(fileName); - // For JavaScript files, we don't want to report the normal typescript semantic errors. - // Instead, we just report errors for using TypeScript-only constructs from within a - // JavaScript file. - if (isJavaScript(fileName)) { - return getJavaScriptSemanticDiagnostics(targetSourceFile); - } - // Only perform the action per file regardless of '-out' flag as LanguageServiceHost is expected to call this function per file. // Therefore only get diagnostics for given file. let semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile, cancellationToken); - if (!program.getCompilerOptions().declaration) { + if (!program.getCompilerOptions().declaration || isJavaScript(fileName)) { return semanticDiagnostics; } @@ -2787,163 +2780,6 @@ namespace ts { return concatenate(semanticDiagnostics, declarationDiagnostics); } - function getJavaScriptSemanticDiagnostics(sourceFile: SourceFile): Diagnostic[] { - let diagnostics: Diagnostic[] = []; - walk(sourceFile); - - return diagnostics; - - function walk(node: Node): boolean { - if (!node) { - return false; - } - - switch (node.kind) { - case SyntaxKind.ImportEqualsDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.ExportAssignment: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.ClassDeclaration: - let classDeclaration = node; - if (checkModifiers(classDeclaration.modifiers) || - checkTypeParameters(classDeclaration.typeParameters)) { - return true; - } - break; - case SyntaxKind.HeritageClause: - let heritageClause = node; - if (heritageClause.token === SyntaxKind.ImplementsKeyword) { - diagnostics.push(createDiagnosticForNode(node, Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case SyntaxKind.InterfaceDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.ModuleDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.TypeAliasDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - case SyntaxKind.Constructor: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ArrowFunction: - case SyntaxKind.FunctionDeclaration: - let functionDeclaration = node; - if (checkModifiers(functionDeclaration.modifiers) || - checkTypeParameters(functionDeclaration.typeParameters) || - checkTypeAnnotation(functionDeclaration.type)) { - return true; - } - break; - case SyntaxKind.VariableStatement: - let variableStatement = node; - if (checkModifiers(variableStatement.modifiers)) { - return true; - } - break; - case SyntaxKind.VariableDeclaration: - let variableDeclaration = node; - if (checkTypeAnnotation(variableDeclaration.type)) { - return true; - } - break; - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - let expression = node; - if (expression.typeArguments && expression.typeArguments.length > 0) { - let start = expression.typeArguments.pos; - diagnostics.push(createFileDiagnostic(sourceFile, start, expression.typeArguments.end - start, - Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case SyntaxKind.Parameter: - let parameter = node; - if (parameter.modifiers) { - let start = parameter.modifiers.pos; - diagnostics.push(createFileDiagnostic(sourceFile, start, parameter.modifiers.end - start, - Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); - return true; - } - if (parameter.questionToken) { - diagnostics.push(createDiagnosticForNode(parameter.questionToken, Diagnostics._0_can_only_be_used_in_a_ts_file, '?')); - return true; - } - if (parameter.type) { - diagnostics.push(createDiagnosticForNode(parameter.type, Diagnostics.types_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case SyntaxKind.PropertyDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.EnumDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.TypeAssertionExpression: - let typeAssertionExpression = node; - diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.Decorator: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.decorators_can_only_be_used_in_a_ts_file)); - return true; - } - - return forEachChild(node, walk); - } - - function checkTypeParameters(typeParameters: NodeArray): boolean { - if (typeParameters) { - let start = typeParameters.pos; - diagnostics.push(createFileDiagnostic(sourceFile, start, typeParameters.end - start, Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); - return true; - } - return false; - } - - function checkTypeAnnotation(type: TypeNode): boolean { - if (type) { - diagnostics.push(createDiagnosticForNode(type, Diagnostics.types_can_only_be_used_in_a_ts_file)); - return true; - } - - return false; - } - - function checkModifiers(modifiers: ModifiersArray): boolean { - if (modifiers) { - for (let modifier of modifiers) { - switch (modifier.kind) { - case SyntaxKind.PublicKeyword: - case SyntaxKind.PrivateKeyword: - case SyntaxKind.ProtectedKeyword: - case SyntaxKind.DeclareKeyword: - diagnostics.push(createDiagnosticForNode(modifier, Diagnostics._0_can_only_be_used_in_a_ts_file, tokenToString(modifier.kind))); - return true; - - // These are all legal modifiers. - case SyntaxKind.StaticKeyword: - case SyntaxKind.ExportKeyword: - case SyntaxKind.ConstKeyword: - case SyntaxKind.DefaultKeyword: - case SyntaxKind.AbstractKeyword: - } - } - } - - return false; - } - } - function getCompilerOptionsDiagnostics() { synchronizeHostData(); return program.getOptionsDiagnostics(cancellationToken).concat( From 279018d49c0513195009c11a7dba60d537c08fc2 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 9 Sep 2015 14:56:43 -0700 Subject: [PATCH 03/89] Baseline updates --- .../reference/getEmitOutputWithDeclarationFile3.baseline | 1 + .../project/invalidRootFile/amd/invalidRootFile.errors.txt | 4 ++-- .../project/invalidRootFile/node/invalidRootFile.errors.txt | 4 ++-- tests/cases/unittests/moduleResolution.ts | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline b/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline index 1ce3d9f33c3..e99a1023070 100644 --- a/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline +++ b/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline @@ -2,4 +2,5 @@ EmitSkipped: false FileName : declSingle.js var x = "hello"; var x1 = 1000; +var x2 = 1000; diff --git a/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt b/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt index 9cd0dd7b0cf..de21d58456f 100644 --- a/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt +++ b/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt @@ -1,6 +1,6 @@ error TS6053: File 'a.ts' not found. -error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js'. !!! error TS6053: File 'a.ts' not found. -!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. \ No newline at end of file +!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js'. \ No newline at end of file diff --git a/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt b/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt index 9cd0dd7b0cf..de21d58456f 100644 --- a/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt +++ b/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt @@ -1,6 +1,6 @@ error TS6053: File 'a.ts' not found. -error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js'. !!! error TS6053: File 'a.ts' not found. -!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. \ No newline at end of file +!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js'. \ No newline at end of file diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index 0917e72f1ce..b5cd0dfb00e 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -80,7 +80,7 @@ module ts { let resolution = nodeModuleNameResolver(moduleName, containingFile.name, createModuleResolutionHost(containingFile, packageJson, moduleFile)); assert.equal(resolution.resolvedFileName, moduleFile.name); // expect three failed lookup location - attempt to load module as file with all supported extensions - assert.equal(resolution.failedLookupLocations.length, 3); + assert.equal(resolution.failedLookupLocations.length, ts.supportedExtensions.length); } it("module name as directory - load from typings", () => { @@ -100,6 +100,7 @@ module ts { "/a/b/foo.ts", "/a/b/foo.tsx", "/a/b/foo.d.ts", + "/a/b/foo.js", "/a/b/foo/index.ts", "/a/b/foo/index.tsx", ]); From e9688dd3fd582788d3ab0a2f48b13679b83dc645 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 9 Sep 2015 16:46:39 -0700 Subject: [PATCH 04/89] Allow the js files to emit output --- src/compiler/utilities.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 99ea06532a0..414a2649e56 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1769,8 +1769,9 @@ namespace ts { if (!isDeclarationFile(sourceFile)) { if ((isExternalModule(sourceFile) || !(compilerOptions.outFile || compilerOptions.out))) { // 1. in-browser single file compilation scenario - // 2. non .js file - return compilerOptions.isolatedModules || !fileExtensionIs(sourceFile.fileName, ".js"); + // 2. non supported extension file + return compilerOptions.isolatedModules || + forEach(supportedExtensions, extension => fileExtensionIs(sourceFile.fileName, extension)); } return false; } From fad0db2a0bfce141badfbb88d9056f323f85eb96 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Sep 2015 09:21:01 -0700 Subject: [PATCH 05/89] Report error if output file is among the input files --- src/compiler/diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 ++++ src/compiler/emitter.ts | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index af48e67d964..59f97a9a6ef 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -513,6 +513,7 @@ namespace ts { Option_0_cannot_be_specified_without_specifying_option_1: { code: 5052, category: DiagnosticCategory.Error, key: "Option '{0}' cannot be specified without specifying option '{1}'." }, Option_0_cannot_be_specified_with_option_1: { code: 5053, category: DiagnosticCategory.Error, key: "Option '{0}' cannot be specified with option '{1}'." }, A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5053, category: DiagnosticCategory.Error, key: "A 'tsconfig.json' file is already defined at: '{0}'." }, + Could_not_write_file_0_which_is_one_of_the_input_files: { code: 5054, category: DiagnosticCategory.Error, key: "Could not write file '{0}' which is one of the input files." }, Concatenate_and_emit_output_to_single_file: { code: 6001, category: DiagnosticCategory.Message, key: "Concatenate and emit output to single file." }, Generates_corresponding_d_ts_file: { code: 6002, category: DiagnosticCategory.Message, key: "Generates corresponding '.d.ts' file." }, Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: DiagnosticCategory.Message, key: "Specifies the location where debugger should locate map files instead of generated locations." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7abec7b7c43..b0c877799c9 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2042,6 +2042,10 @@ "category": "Error", "code": 5053 }, + "Could not write file '{0}' which is one of the input files.": { + "category": "Error", + "code": 5054 + }, "Concatenate and emit output to single file.": { "category": "Message", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d84b7b70ada..a37401b9fae 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -7153,6 +7153,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } function emitFile(jsFilePath: string, sourceFile?: SourceFile) { + if (forEach(host.getSourceFiles(), sourceFile => jsFilePath === sourceFile.fileName)) { + // TODO(shkamat) Verify if this works if same file is referred via different paths ..\foo\a.js and a.js refering to same one + // Report error and dont emit this file + diagnostics.push(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_which_is_one_of_the_input_files, jsFilePath)); + return; + } + emitJavaScript(jsFilePath, sourceFile); if (compilerOptions.declaration) { From d3dfd2afef2de6064a0d28ae7ac8621875a6e7a7 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Sep 2015 11:01:13 -0700 Subject: [PATCH 06/89] Add test cases for simple js file compilations --- .../jsFileCompilationEmitDeclarations.js | 25 ++++++++++++++ .../jsFileCompilationEmitDeclarations.symbols | 10 ++++++ .../jsFileCompilationEmitDeclarations.types | 10 ++++++ ...ileCompilationEmitTrippleSlashReference.js | 33 +++++++++++++++++++ ...mpilationEmitTrippleSlashReference.symbols | 15 +++++++++ ...CompilationEmitTrippleSlashReference.types | 15 +++++++++ .../reference/jsFileCompilationWithOut.js | 19 +++++++++++ .../jsFileCompilationWithOut.symbols | 10 ++++++ .../reference/jsFileCompilationWithOut.types | 10 ++++++ .../jsFileCompilationWithoutOut.errors.txt | 12 +++++++ .../reference/jsFileCompilationWithoutOut.js | 17 ++++++++++ .../jsFileCompilationEmitDeclarations.ts | 9 +++++ ...ileCompilationEmitTrippleSlashReference.ts | 14 ++++++++ .../compiler/jsFileCompilationWithOut.ts | 8 +++++ .../compiler/jsFileCompilationWithoutOut.ts | 7 ++++ 15 files changed, 214 insertions(+) create mode 100644 tests/baselines/reference/jsFileCompilationEmitDeclarations.js create mode 100644 tests/baselines/reference/jsFileCompilationEmitDeclarations.symbols create mode 100644 tests/baselines/reference/jsFileCompilationEmitDeclarations.types create mode 100644 tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js create mode 100644 tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.symbols create mode 100644 tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.types create mode 100644 tests/baselines/reference/jsFileCompilationWithOut.js create mode 100644 tests/baselines/reference/jsFileCompilationWithOut.symbols create mode 100644 tests/baselines/reference/jsFileCompilationWithOut.types create mode 100644 tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithoutOut.js create mode 100644 tests/cases/compiler/jsFileCompilationEmitDeclarations.ts create mode 100644 tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts create mode 100644 tests/cases/compiler/jsFileCompilationWithOut.ts create mode 100644 tests/cases/compiler/jsFileCompilationWithoutOut.ts diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.js b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js new file mode 100644 index 00000000000..c6711e4e85f --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/jsFileCompilationEmitDeclarations.ts] //// + +//// [a.ts] +class c { +} + +//// [b.js] +function foo() { +} + + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +function foo() { +} + + +//// [out.d.ts] +declare class c { +} +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.symbols b/tests/baselines/reference/jsFileCompilationEmitDeclarations.symbols new file mode 100644 index 00000000000..5260b8d6cf3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.js === +function foo() { +>foo : Symbol(foo, Decl(b.js, 0, 0)) +} + diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.types b/tests/baselines/reference/jsFileCompilationEmitDeclarations.types new file mode 100644 index 00000000000..dce83eeb8eb --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.js === +function foo() { +>foo : () => void +} + diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js new file mode 100644 index 00000000000..04f36213b1b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts] //// + +//// [a.ts] +class c { +} + +//// [b.js] +/// +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +function bar() { +} +/// +function foo() { +} + + +//// [out.d.ts] +declare class c { +} +declare function bar(): void; +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.symbols b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.symbols new file mode 100644 index 00000000000..805d202a14c --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.symbols @@ -0,0 +1,15 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.js === +/// +function foo() { +>foo : Symbol(foo, Decl(b.js, 0, 0)) +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : Symbol(bar, Decl(c.js, 0, 0)) +} diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.types b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.types new file mode 100644 index 00000000000..b206a486351 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.types @@ -0,0 +1,15 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.js === +/// +function foo() { +>foo : () => void +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : () => void +} diff --git a/tests/baselines/reference/jsFileCompilationWithOut.js b/tests/baselines/reference/jsFileCompilationWithOut.js new file mode 100644 index 00000000000..32d0261061f --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOut.js @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/jsFileCompilationWithOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.js] +function foo() { +} + + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +function foo() { +} diff --git a/tests/baselines/reference/jsFileCompilationWithOut.symbols b/tests/baselines/reference/jsFileCompilationWithOut.symbols new file mode 100644 index 00000000000..5260b8d6cf3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOut.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.js === +function foo() { +>foo : Symbol(foo, Decl(b.js, 0, 0)) +} + diff --git a/tests/baselines/reference/jsFileCompilationWithOut.types b/tests/baselines/reference/jsFileCompilationWithOut.types new file mode 100644 index 00000000000..dce83eeb8eb --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOut.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.js === +function foo() { +>foo : () => void +} + diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt new file mode 100644 index 00000000000..32a60df0996 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt @@ -0,0 +1,12 @@ +error TS5054: Could not write file 'tests/cases/compiler/b.js' which is one of the input files. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/b.js' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.js b/tests/baselines/reference/jsFileCompilationWithoutOut.js new file mode 100644 index 00000000000..4a60c54c3ab --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/jsFileCompilationWithoutOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.js] +function foo() { +} + + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); diff --git a/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts b/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts new file mode 100644 index 00000000000..53ed217c2b5 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts @@ -0,0 +1,9 @@ +// @out: out.js +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: b.js +function foo() { +} diff --git a/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts b/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts new file mode 100644 index 00000000000..88931fa2eaf --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts @@ -0,0 +1,14 @@ +// @out: out.js +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: b.js +/// +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithOut.ts b/tests/cases/compiler/jsFileCompilationWithOut.ts new file mode 100644 index 00000000000..47ca5115cbb --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithOut.ts @@ -0,0 +1,8 @@ +// @out: out.js +// @filename: a.ts +class c { +} + +// @filename: b.js +function foo() { +} diff --git a/tests/cases/compiler/jsFileCompilationWithoutOut.ts b/tests/cases/compiler/jsFileCompilationWithoutOut.ts new file mode 100644 index 00000000000..2936f2eda7c --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithoutOut.ts @@ -0,0 +1,7 @@ +// @filename: a.ts +class c { +} + +// @filename: b.js +function foo() { +} From 1dc3414007a797c5653f736d7f49e25e377f2840 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Sep 2015 11:01:33 -0700 Subject: [PATCH 07/89] Javascript files will emit declarations too so get declaration diagnostics --- src/services/services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/services.ts b/src/services/services.ts index bc22975429a..a2ec76ee86c 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2771,7 +2771,7 @@ namespace ts { // Therefore only get diagnostics for given file. let semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile, cancellationToken); - if (!program.getCompilerOptions().declaration || isJavaScript(fileName)) { + if (!program.getCompilerOptions().declaration) { return semanticDiagnostics; } From 63de162d1ee464c10ce3956adda30a1e3fab8dc2 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Sep 2015 14:19:57 -0700 Subject: [PATCH 08/89] Let harness to name file even when single unit data specified but there is filename tag --- src/harness/harness.ts | 2 +- .../reference/constEnumMergingWithValues1.js | 4 +- .../constEnumMergingWithValues1.symbols | 12 +- .../constEnumMergingWithValues1.types | 2 +- .../reference/constEnumMergingWithValues2.js | 4 +- .../constEnumMergingWithValues2.symbols | 12 +- .../constEnumMergingWithValues2.types | 2 +- .../reference/constEnumMergingWithValues3.js | 4 +- .../constEnumMergingWithValues3.symbols | 14 +- .../constEnumMergingWithValues3.types | 2 +- .../reference/constEnumMergingWithValues4.js | 4 +- .../constEnumMergingWithValues4.symbols | 14 +- .../constEnumMergingWithValues4.types | 2 +- .../reference/constEnumMergingWithValues5.js | 4 +- .../constEnumMergingWithValues5.symbols | 10 +- .../constEnumMergingWithValues5.types | 2 +- ...ierShouldNotShortCircuitBaseTypeBinding.js | 4 +- ...ouldNotShortCircuitBaseTypeBinding.symbols | 2 +- ...ShouldNotShortCircuitBaseTypeBinding.types | 2 +- tests/baselines/reference/es6ExportClause.js | 6 +- .../reference/es6ExportClause.symbols | 30 ++-- .../baselines/reference/es6ExportClause.types | 2 +- .../reference/es6ExportClauseInEs5.js | 6 +- .../reference/es6ExportClauseInEs5.symbols | 30 ++-- .../reference/es6ExportClauseInEs5.types | 2 +- .../exportAssignmentAndDeclaration.errors.txt | 4 +- .../exportAssignmentAndDeclaration.js | 4 +- .../reference/exportAssignmentError.js | 4 +- .../reference/exportAssignmentError.symbols | 12 +- .../reference/exportAssignmentError.types | 2 +- .../importNonStringLiteral.errors.txt | 4 +- .../reference/importNonStringLiteral.js | 4 +- .../initializersInDeclarations.errors.txt | 16 +- .../reference/initializersInDeclarations.js | 23 --- ...isolatedModulesAmbientConstEnum.errors.txt | 4 +- .../isolatedModulesAmbientConstEnum.js | 4 +- .../isolatedModulesDeclaration.errors.txt | 2 +- .../reference/isolatedModulesDeclaration.js | 6 +- .../baselines/reference/isolatedModulesES6.js | 4 +- .../reference/isolatedModulesES6.symbols | 4 +- .../reference/isolatedModulesES6.types | 2 +- ...latedModulesImportExportElision.errors.txt | 10 +- .../isolatedModulesImportExportElision.js | 4 +- .../isolatedModulesNoEmitOnError.errors.txt | 2 +- ...isolatedModulesNoExternalModule.errors.txt | 4 +- .../isolatedModulesNoExternalModule.js | 4 +- .../isolatedModulesNonAmbientConstEnum.js | 4 +- ...isolatedModulesNonAmbientConstEnum.symbols | 16 +- .../isolatedModulesNonAmbientConstEnum.types | 2 +- .../reference/isolatedModulesSourceMap.js | 6 +- .../reference/isolatedModulesSourceMap.js.map | 4 +- .../isolatedModulesSourceMap.sourcemap.txt | 14 +- .../isolatedModulesSourceMap.symbols | 4 +- .../reference/isolatedModulesSourceMap.types | 2 +- .../isolatedModulesSpecifiedModule.js | 4 +- .../isolatedModulesSpecifiedModule.symbols | 4 +- .../isolatedModulesSpecifiedModule.types | 2 +- ...solatedModulesUnspecifiedModule.errors.txt | 2 +- .../isolatedModulesUnspecifiedModule.js | 4 +- .../tsxAttributeInvalidNames.errors.txt | 26 +-- .../reference/tsxAttributeInvalidNames.js | 4 +- .../tsxAttributeResolution1.errors.txt | 16 +- .../reference/tsxAttributeResolution1.js | 4 +- .../tsxAttributeResolution2.errors.txt | 4 +- .../reference/tsxAttributeResolution2.js | 4 +- .../tsxAttributeResolution3.errors.txt | 10 +- .../reference/tsxAttributeResolution3.js | 4 +- .../tsxAttributeResolution4.errors.txt | 4 +- .../reference/tsxAttributeResolution4.js | 4 +- .../tsxAttributeResolution5.errors.txt | 8 +- .../reference/tsxAttributeResolution5.js | 4 +- .../tsxAttributeResolution6.errors.txt | 8 +- .../reference/tsxAttributeResolution6.js | 4 +- .../tsxAttributeResolution7.errors.txt | 4 +- .../reference/tsxAttributeResolution7.js | 4 +- .../reference/tsxAttributeResolution8.js | 4 +- .../reference/tsxAttributeResolution8.symbols | 16 +- .../reference/tsxAttributeResolution8.types | 2 +- .../tsxElementResolution1.errors.txt | 4 +- .../reference/tsxElementResolution1.js | 4 +- .../tsxElementResolution10.errors.txt | 4 +- .../reference/tsxElementResolution10.js | 4 +- .../tsxElementResolution11.errors.txt | 4 +- .../reference/tsxElementResolution11.js | 4 +- .../tsxElementResolution12.errors.txt | 8 +- .../reference/tsxElementResolution12.js | 4 +- .../reference/tsxElementResolution13.js | 4 +- .../reference/tsxElementResolution13.symbols | 20 +-- .../reference/tsxElementResolution13.types | 2 +- .../reference/tsxElementResolution14.js | 4 +- .../reference/tsxElementResolution14.symbols | 14 +- .../reference/tsxElementResolution14.types | 2 +- .../tsxElementResolution15.errors.txt | 4 +- .../reference/tsxElementResolution15.js | 4 +- .../tsxElementResolution16.errors.txt | 6 +- .../reference/tsxElementResolution16.js | 4 +- .../tsxElementResolution18.errors.txt | 4 +- .../reference/tsxElementResolution18.js | 4 +- .../reference/tsxElementResolution2.js | 4 +- .../reference/tsxElementResolution2.symbols | 14 +- .../reference/tsxElementResolution2.types | 2 +- .../tsxElementResolution3.errors.txt | 6 +- .../reference/tsxElementResolution3.js | 4 +- .../tsxElementResolution4.errors.txt | 6 +- .../reference/tsxElementResolution4.js | 4 +- .../reference/tsxElementResolution5.js | 4 +- .../reference/tsxElementResolution5.symbols | 6 +- .../reference/tsxElementResolution5.types | 2 +- .../tsxElementResolution6.errors.txt | 4 +- .../reference/tsxElementResolution6.js | 4 +- .../tsxElementResolution7.errors.txt | 6 +- .../reference/tsxElementResolution7.js | 4 +- .../tsxElementResolution8.errors.txt | 6 +- .../reference/tsxElementResolution8.js | 4 +- .../reference/tsxElementResolution9.js | 4 +- .../reference/tsxElementResolution9.symbols | 58 +++--- .../reference/tsxElementResolution9.types | 2 +- tests/baselines/reference/tsxEmit1.js | 4 +- tests/baselines/reference/tsxEmit1.symbols | 164 ++++++++--------- tests/baselines/reference/tsxEmit1.types | 2 +- tests/baselines/reference/tsxEmit2.js | 4 +- tests/baselines/reference/tsxEmit2.symbols | 64 +++---- tests/baselines/reference/tsxEmit2.types | 2 +- tests/baselines/reference/tsxEmit3.js | 6 +- tests/baselines/reference/tsxEmit3.js.map | 4 +- .../reference/tsxEmit3.sourcemap.txt | 14 +- tests/baselines/reference/tsxEmit3.symbols | 50 +++--- tests/baselines/reference/tsxEmit3.types | 2 +- .../reference/tsxErrorRecovery1.errors.txt | 10 +- .../baselines/reference/tsxErrorRecovery1.js | 4 +- .../tsxGenericArrowFunctionParsing.js | 4 +- .../tsxGenericArrowFunctionParsing.symbols | 64 +++---- .../tsxGenericArrowFunctionParsing.types | 2 +- .../reference/tsxOpeningClosingNames.js | 4 +- .../reference/tsxOpeningClosingNames.symbols | 14 +- .../reference/tsxOpeningClosingNames.types | 2 +- tests/baselines/reference/tsxParseTests1.js | 4 +- .../reference/tsxParseTests1.symbols | 30 ++-- .../baselines/reference/tsxParseTests1.types | 2 +- tests/baselines/reference/tsxReactEmit1.js | 4 +- .../baselines/reference/tsxReactEmit1.symbols | 166 +++++++++--------- tests/baselines/reference/tsxReactEmit1.types | 2 +- tests/baselines/reference/tsxReactEmit2.js | 4 +- .../baselines/reference/tsxReactEmit2.symbols | 66 +++---- tests/baselines/reference/tsxReactEmit2.types | 2 +- tests/baselines/reference/tsxReactEmit3.js | 4 +- .../baselines/reference/tsxReactEmit3.symbols | 28 +-- tests/baselines/reference/tsxReactEmit3.types | 2 +- .../reference/tsxReactEmit4.errors.txt | 4 +- tests/baselines/reference/tsxReactEmit4.js | 4 +- .../reference/tsxReactEmitEntities.js | 4 +- .../reference/tsxReactEmitEntities.symbols | 16 +- .../reference/tsxReactEmitEntities.types | 2 +- .../reference/tsxReactEmitWhitespace.js | 4 +- .../reference/tsxReactEmitWhitespace.symbols | 56 +++--- .../reference/tsxReactEmitWhitespace.types | 2 +- .../reference/tsxReactEmitWhitespace2.js | 4 +- .../reference/tsxReactEmitWhitespace2.symbols | 34 ++-- .../reference/tsxReactEmitWhitespace2.types | 2 +- 159 files changed, 799 insertions(+), 822 deletions(-) delete mode 100644 tests/baselines/reference/initializersInDeclarations.js diff --git a/src/harness/harness.ts b/src/harness/harness.ts index f65a4f88730..ad2648ef208 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1673,7 +1673,7 @@ module Harness { } // normalize the fileName for the single file case - currentFileName = testUnitData.length > 0 ? currentFileName : Path.getFileName(fileName); + currentFileName = testUnitData.length > 0 || currentFileName ? currentFileName : Path.getFileName(fileName); // EOF, push whatever remains let newTestFile2 = { diff --git a/tests/baselines/reference/constEnumMergingWithValues1.js b/tests/baselines/reference/constEnumMergingWithValues1.js index f47fc227bae..b35c41da4ac 100644 --- a/tests/baselines/reference/constEnumMergingWithValues1.js +++ b/tests/baselines/reference/constEnumMergingWithValues1.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues1.ts] +//// [m1.ts] function foo() {} module foo { @@ -7,7 +7,7 @@ module foo { export = foo -//// [constEnumMergingWithValues1.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { function foo() { } return foo; diff --git a/tests/baselines/reference/constEnumMergingWithValues1.symbols b/tests/baselines/reference/constEnumMergingWithValues1.symbols index 3dd1c80705c..ba655091ded 100644 --- a/tests/baselines/reference/constEnumMergingWithValues1.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues1.symbols @@ -1,16 +1,16 @@ -=== tests/cases/compiler/constEnumMergingWithValues1.ts === +=== tests/cases/compiler/m1.ts === function foo() {} ->foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17)) module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues1.ts, 2, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues1.ts, 3, 18)) +>E : Symbol(E, Decl(m1.ts, 2, 12)) +>X : Symbol(E.X, Decl(m1.ts, 3, 18)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17)) diff --git a/tests/baselines/reference/constEnumMergingWithValues1.types b/tests/baselines/reference/constEnumMergingWithValues1.types index 8d5b15795f7..c5b1a82a5a8 100644 --- a/tests/baselines/reference/constEnumMergingWithValues1.types +++ b/tests/baselines/reference/constEnumMergingWithValues1.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues1.ts === +=== tests/cases/compiler/m1.ts === function foo() {} >foo : typeof foo diff --git a/tests/baselines/reference/constEnumMergingWithValues2.js b/tests/baselines/reference/constEnumMergingWithValues2.js index 393ab41fa1f..9641bdf363a 100644 --- a/tests/baselines/reference/constEnumMergingWithValues2.js +++ b/tests/baselines/reference/constEnumMergingWithValues2.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues2.ts] +//// [m1.ts] class foo {} module foo { @@ -7,7 +7,7 @@ module foo { export = foo -//// [constEnumMergingWithValues2.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { var foo = (function () { function foo() { diff --git a/tests/baselines/reference/constEnumMergingWithValues2.symbols b/tests/baselines/reference/constEnumMergingWithValues2.symbols index bfb438a387d..a7744499f49 100644 --- a/tests/baselines/reference/constEnumMergingWithValues2.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues2.symbols @@ -1,16 +1,16 @@ -=== tests/cases/compiler/constEnumMergingWithValues2.ts === +=== tests/cases/compiler/m1.ts === class foo {} ->foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12)) module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues2.ts, 2, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues2.ts, 3, 18)) +>E : Symbol(E, Decl(m1.ts, 2, 12)) +>X : Symbol(E.X, Decl(m1.ts, 3, 18)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12)) diff --git a/tests/baselines/reference/constEnumMergingWithValues2.types b/tests/baselines/reference/constEnumMergingWithValues2.types index dd706ef33a1..ab2372cbae9 100644 --- a/tests/baselines/reference/constEnumMergingWithValues2.types +++ b/tests/baselines/reference/constEnumMergingWithValues2.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues2.ts === +=== tests/cases/compiler/m1.ts === class foo {} >foo : foo diff --git a/tests/baselines/reference/constEnumMergingWithValues3.js b/tests/baselines/reference/constEnumMergingWithValues3.js index d28f29f0962..e191dc2d110 100644 --- a/tests/baselines/reference/constEnumMergingWithValues3.js +++ b/tests/baselines/reference/constEnumMergingWithValues3.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues3.ts] +//// [m1.ts] enum foo { A } module foo { @@ -7,7 +7,7 @@ module foo { export = foo -//// [constEnumMergingWithValues3.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { var foo; (function (foo) { diff --git a/tests/baselines/reference/constEnumMergingWithValues3.symbols b/tests/baselines/reference/constEnumMergingWithValues3.symbols index 33e020b5679..816919c6805 100644 --- a/tests/baselines/reference/constEnumMergingWithValues3.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues3.symbols @@ -1,17 +1,17 @@ -=== tests/cases/compiler/constEnumMergingWithValues3.ts === +=== tests/cases/compiler/m1.ts === enum foo { A } ->foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14)) ->A : Symbol(foo.A, Decl(constEnumMergingWithValues3.ts, 1, 10)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14)) +>A : Symbol(foo.A, Decl(m1.ts, 1, 10)) module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues3.ts, 2, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues3.ts, 3, 18)) +>E : Symbol(E, Decl(m1.ts, 2, 12)) +>X : Symbol(E.X, Decl(m1.ts, 3, 18)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14)) diff --git a/tests/baselines/reference/constEnumMergingWithValues3.types b/tests/baselines/reference/constEnumMergingWithValues3.types index df2e8820466..392772860e4 100644 --- a/tests/baselines/reference/constEnumMergingWithValues3.types +++ b/tests/baselines/reference/constEnumMergingWithValues3.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues3.ts === +=== tests/cases/compiler/m1.ts === enum foo { A } >foo : foo diff --git a/tests/baselines/reference/constEnumMergingWithValues4.js b/tests/baselines/reference/constEnumMergingWithValues4.js index 7ed8b44dc76..3f4ee67cb48 100644 --- a/tests/baselines/reference/constEnumMergingWithValues4.js +++ b/tests/baselines/reference/constEnumMergingWithValues4.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues4.ts] +//// [m1.ts] module foo { const enum E { X } @@ -11,7 +11,7 @@ module foo { export = foo -//// [constEnumMergingWithValues4.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { var foo; (function (foo) { diff --git a/tests/baselines/reference/constEnumMergingWithValues4.symbols b/tests/baselines/reference/constEnumMergingWithValues4.symbols index 817c9aeeff3..a7135b53d57 100644 --- a/tests/baselines/reference/constEnumMergingWithValues4.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues4.symbols @@ -1,21 +1,21 @@ -=== tests/cases/compiler/constEnumMergingWithValues4.ts === +=== tests/cases/compiler/m1.ts === module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues4.ts, 1, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues4.ts, 2, 18)) +>E : Symbol(E, Decl(m1.ts, 1, 12)) +>X : Symbol(E.X, Decl(m1.ts, 2, 18)) } module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1)) var x = 1; ->x : Symbol(x, Decl(constEnumMergingWithValues4.ts, 6, 7)) +>x : Symbol(x, Decl(m1.ts, 6, 7)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1)) diff --git a/tests/baselines/reference/constEnumMergingWithValues4.types b/tests/baselines/reference/constEnumMergingWithValues4.types index 3da306fedbf..92d04fc10cc 100644 --- a/tests/baselines/reference/constEnumMergingWithValues4.types +++ b/tests/baselines/reference/constEnumMergingWithValues4.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues4.ts === +=== tests/cases/compiler/m1.ts === module foo { >foo : typeof foo diff --git a/tests/baselines/reference/constEnumMergingWithValues5.js b/tests/baselines/reference/constEnumMergingWithValues5.js index 378b11cfd22..610826b52ce 100644 --- a/tests/baselines/reference/constEnumMergingWithValues5.js +++ b/tests/baselines/reference/constEnumMergingWithValues5.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues5.ts] +//// [m1.ts] module foo { const enum E { X } @@ -6,7 +6,7 @@ module foo { export = foo -//// [constEnumMergingWithValues5.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { var foo; (function (foo) { diff --git a/tests/baselines/reference/constEnumMergingWithValues5.symbols b/tests/baselines/reference/constEnumMergingWithValues5.symbols index 6354f64d834..257e1897e5c 100644 --- a/tests/baselines/reference/constEnumMergingWithValues5.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues5.symbols @@ -1,13 +1,13 @@ -=== tests/cases/compiler/constEnumMergingWithValues5.ts === +=== tests/cases/compiler/m1.ts === module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues5.ts, 0, 0)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues5.ts, 1, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues5.ts, 2, 18)) +>E : Symbol(E, Decl(m1.ts, 1, 12)) +>X : Symbol(E.X, Decl(m1.ts, 2, 18)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues5.ts, 0, 0)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0)) diff --git a/tests/baselines/reference/constEnumMergingWithValues5.types b/tests/baselines/reference/constEnumMergingWithValues5.types index 617676ba0c0..585363f4d97 100644 --- a/tests/baselines/reference/constEnumMergingWithValues5.types +++ b/tests/baselines/reference/constEnumMergingWithValues5.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues5.ts === +=== tests/cases/compiler/m1.ts === module foo { >foo : typeof foo diff --git a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js index d86925f1fd3..97a51d7032d 100644 --- a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js +++ b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js @@ -1,4 +1,4 @@ -//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts] +//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts] -//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js] +//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.js] diff --git a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols index 61cc569b965..81436a6e510 100644 --- a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols +++ b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols @@ -1,3 +1,3 @@ -=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts === +=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts === No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.types b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.types index 61cc569b965..81436a6e510 100644 --- a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.types +++ b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.types @@ -1,3 +1,3 @@ -=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts === +=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts === No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/es6ExportClause.js b/tests/baselines/reference/es6ExportClause.js index f0d9bbe8cff..742a39e1324 100644 --- a/tests/baselines/reference/es6ExportClause.js +++ b/tests/baselines/reference/es6ExportClause.js @@ -1,4 +1,4 @@ -//// [es6ExportClause.ts] +//// [server.ts] class c { } @@ -16,7 +16,7 @@ export { i, m as instantiatedModule }; export { uninstantiated }; export { x }; -//// [es6ExportClause.js] +//// [server.js] class c { } var m; @@ -30,7 +30,7 @@ export { m as instantiatedModule }; export { x }; -//// [es6ExportClause.d.ts] +//// [server.d.ts] declare class c { } interface i { diff --git a/tests/baselines/reference/es6ExportClause.symbols b/tests/baselines/reference/es6ExportClause.symbols index fe4de21a00f..1bacedec76c 100644 --- a/tests/baselines/reference/es6ExportClause.symbols +++ b/tests/baselines/reference/es6ExportClause.symbols @@ -1,38 +1,38 @@ -=== tests/cases/compiler/es6ExportClause.ts === +=== tests/cases/compiler/server.ts === class c { ->c : Symbol(c, Decl(es6ExportClause.ts, 0, 0)) +>c : Symbol(c, Decl(server.ts, 0, 0)) } interface i { ->i : Symbol(i, Decl(es6ExportClause.ts, 2, 1)) +>i : Symbol(i, Decl(server.ts, 2, 1)) } module m { ->m : Symbol(m, Decl(es6ExportClause.ts, 4, 1)) +>m : Symbol(m, Decl(server.ts, 4, 1)) export var x = 10; ->x : Symbol(x, Decl(es6ExportClause.ts, 6, 14)) +>x : Symbol(x, Decl(server.ts, 6, 14)) } var x = 10; ->x : Symbol(x, Decl(es6ExportClause.ts, 8, 3)) +>x : Symbol(x, Decl(server.ts, 8, 3)) module uninstantiated { ->uninstantiated : Symbol(uninstantiated, Decl(es6ExportClause.ts, 8, 11)) +>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 8, 11)) } export { c }; ->c : Symbol(c, Decl(es6ExportClause.ts, 11, 8)) +>c : Symbol(c, Decl(server.ts, 11, 8)) export { c as c2 }; ->c : Symbol(c2, Decl(es6ExportClause.ts, 12, 8)) ->c2 : Symbol(c2, Decl(es6ExportClause.ts, 12, 8)) +>c : Symbol(c2, Decl(server.ts, 12, 8)) +>c2 : Symbol(c2, Decl(server.ts, 12, 8)) export { i, m as instantiatedModule }; ->i : Symbol(i, Decl(es6ExportClause.ts, 13, 8)) ->m : Symbol(instantiatedModule, Decl(es6ExportClause.ts, 13, 11)) ->instantiatedModule : Symbol(instantiatedModule, Decl(es6ExportClause.ts, 13, 11)) +>i : Symbol(i, Decl(server.ts, 13, 8)) +>m : Symbol(instantiatedModule, Decl(server.ts, 13, 11)) +>instantiatedModule : Symbol(instantiatedModule, Decl(server.ts, 13, 11)) export { uninstantiated }; ->uninstantiated : Symbol(uninstantiated, Decl(es6ExportClause.ts, 14, 8)) +>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 14, 8)) export { x }; ->x : Symbol(x, Decl(es6ExportClause.ts, 15, 8)) +>x : Symbol(x, Decl(server.ts, 15, 8)) diff --git a/tests/baselines/reference/es6ExportClause.types b/tests/baselines/reference/es6ExportClause.types index b0d544201a4..5cab90d6a7f 100644 --- a/tests/baselines/reference/es6ExportClause.types +++ b/tests/baselines/reference/es6ExportClause.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/es6ExportClause.ts === +=== tests/cases/compiler/server.ts === class c { >c : c diff --git a/tests/baselines/reference/es6ExportClauseInEs5.js b/tests/baselines/reference/es6ExportClauseInEs5.js index f987b48aeca..8bd908880f6 100644 --- a/tests/baselines/reference/es6ExportClauseInEs5.js +++ b/tests/baselines/reference/es6ExportClauseInEs5.js @@ -1,4 +1,4 @@ -//// [es6ExportClauseInEs5.ts] +//// [server.ts] class c { } @@ -16,7 +16,7 @@ export { i, m as instantiatedModule }; export { uninstantiated }; export { x }; -//// [es6ExportClauseInEs5.js] +//// [server.js] var c = (function () { function c() { } @@ -33,7 +33,7 @@ var x = 10; exports.x = x; -//// [es6ExportClauseInEs5.d.ts] +//// [server.d.ts] declare class c { } interface i { diff --git a/tests/baselines/reference/es6ExportClauseInEs5.symbols b/tests/baselines/reference/es6ExportClauseInEs5.symbols index 5590b907eec..1bacedec76c 100644 --- a/tests/baselines/reference/es6ExportClauseInEs5.symbols +++ b/tests/baselines/reference/es6ExportClauseInEs5.symbols @@ -1,38 +1,38 @@ -=== tests/cases/compiler/es6ExportClauseInEs5.ts === +=== tests/cases/compiler/server.ts === class c { ->c : Symbol(c, Decl(es6ExportClauseInEs5.ts, 0, 0)) +>c : Symbol(c, Decl(server.ts, 0, 0)) } interface i { ->i : Symbol(i, Decl(es6ExportClauseInEs5.ts, 2, 1)) +>i : Symbol(i, Decl(server.ts, 2, 1)) } module m { ->m : Symbol(m, Decl(es6ExportClauseInEs5.ts, 4, 1)) +>m : Symbol(m, Decl(server.ts, 4, 1)) export var x = 10; ->x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 6, 14)) +>x : Symbol(x, Decl(server.ts, 6, 14)) } var x = 10; ->x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 8, 3)) +>x : Symbol(x, Decl(server.ts, 8, 3)) module uninstantiated { ->uninstantiated : Symbol(uninstantiated, Decl(es6ExportClauseInEs5.ts, 8, 11)) +>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 8, 11)) } export { c }; ->c : Symbol(c, Decl(es6ExportClauseInEs5.ts, 11, 8)) +>c : Symbol(c, Decl(server.ts, 11, 8)) export { c as c2 }; ->c : Symbol(c2, Decl(es6ExportClauseInEs5.ts, 12, 8)) ->c2 : Symbol(c2, Decl(es6ExportClauseInEs5.ts, 12, 8)) +>c : Symbol(c2, Decl(server.ts, 12, 8)) +>c2 : Symbol(c2, Decl(server.ts, 12, 8)) export { i, m as instantiatedModule }; ->i : Symbol(i, Decl(es6ExportClauseInEs5.ts, 13, 8)) ->m : Symbol(instantiatedModule, Decl(es6ExportClauseInEs5.ts, 13, 11)) ->instantiatedModule : Symbol(instantiatedModule, Decl(es6ExportClauseInEs5.ts, 13, 11)) +>i : Symbol(i, Decl(server.ts, 13, 8)) +>m : Symbol(instantiatedModule, Decl(server.ts, 13, 11)) +>instantiatedModule : Symbol(instantiatedModule, Decl(server.ts, 13, 11)) export { uninstantiated }; ->uninstantiated : Symbol(uninstantiated, Decl(es6ExportClauseInEs5.ts, 14, 8)) +>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 14, 8)) export { x }; ->x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 15, 8)) +>x : Symbol(x, Decl(server.ts, 15, 8)) diff --git a/tests/baselines/reference/es6ExportClauseInEs5.types b/tests/baselines/reference/es6ExportClauseInEs5.types index c6ef9033bf1..5cab90d6a7f 100644 --- a/tests/baselines/reference/es6ExportClauseInEs5.types +++ b/tests/baselines/reference/es6ExportClauseInEs5.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/es6ExportClauseInEs5.ts === +=== tests/cases/compiler/server.ts === class c { >c : c diff --git a/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt b/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt index bb228caa0c9..5a84a279122 100644 --- a/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt +++ b/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts(10,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +tests/cases/conformance/externalModules/foo_0.ts(10,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -==== tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts (1 errors) ==== +==== tests/cases/conformance/externalModules/foo_0.ts (1 errors) ==== export enum E1 { A,B,C } diff --git a/tests/baselines/reference/exportAssignmentAndDeclaration.js b/tests/baselines/reference/exportAssignmentAndDeclaration.js index ed9f92d88ef..c1d6510b1f7 100644 --- a/tests/baselines/reference/exportAssignmentAndDeclaration.js +++ b/tests/baselines/reference/exportAssignmentAndDeclaration.js @@ -1,4 +1,4 @@ -//// [exportAssignmentAndDeclaration.ts] +//// [foo_0.ts] export enum E1 { A,B,C } @@ -10,7 +10,7 @@ class C1 { // Invalid, as there is already an exported member. export = C1; -//// [exportAssignmentAndDeclaration.js] +//// [foo_0.js] define(["require", "exports"], function (require, exports) { (function (E1) { E1[E1["A"] = 0] = "A"; diff --git a/tests/baselines/reference/exportAssignmentError.js b/tests/baselines/reference/exportAssignmentError.js index 777a9fab048..adf9d741dbe 100644 --- a/tests/baselines/reference/exportAssignmentError.js +++ b/tests/baselines/reference/exportAssignmentError.js @@ -1,4 +1,4 @@ -//// [exportAssignmentError.ts] +//// [exportEqualsModule_A.ts] module M { export var x; } @@ -8,7 +8,7 @@ import M2 = M; export = M2; // should not error -//// [exportAssignmentError.js] +//// [exportEqualsModule_A.js] define(["require", "exports"], function (require, exports) { var M; (function (M) { diff --git a/tests/baselines/reference/exportAssignmentError.symbols b/tests/baselines/reference/exportAssignmentError.symbols index 482ad586dc2..e10556360a4 100644 --- a/tests/baselines/reference/exportAssignmentError.symbols +++ b/tests/baselines/reference/exportAssignmentError.symbols @@ -1,15 +1,15 @@ -=== tests/cases/compiler/exportAssignmentError.ts === +=== tests/cases/compiler/exportEqualsModule_A.ts === module M { ->M : Symbol(M, Decl(exportAssignmentError.ts, 0, 0)) +>M : Symbol(M, Decl(exportEqualsModule_A.ts, 0, 0)) export var x; ->x : Symbol(x, Decl(exportAssignmentError.ts, 1, 11)) +>x : Symbol(x, Decl(exportEqualsModule_A.ts, 1, 11)) } import M2 = M; ->M2 : Symbol(M2, Decl(exportAssignmentError.ts, 2, 1)) ->M : Symbol(M, Decl(exportAssignmentError.ts, 0, 0)) +>M2 : Symbol(M2, Decl(exportEqualsModule_A.ts, 2, 1)) +>M : Symbol(M, Decl(exportEqualsModule_A.ts, 0, 0)) export = M2; // should not error ->M2 : Symbol(M2, Decl(exportAssignmentError.ts, 2, 1)) +>M2 : Symbol(M2, Decl(exportEqualsModule_A.ts, 2, 1)) diff --git a/tests/baselines/reference/exportAssignmentError.types b/tests/baselines/reference/exportAssignmentError.types index 89e7d461fb2..96f92c8571b 100644 --- a/tests/baselines/reference/exportAssignmentError.types +++ b/tests/baselines/reference/exportAssignmentError.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/exportAssignmentError.ts === +=== tests/cases/compiler/exportEqualsModule_A.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/importNonStringLiteral.errors.txt b/tests/baselines/reference/importNonStringLiteral.errors.txt index 7138680d709..97470e6408d 100644 --- a/tests/baselines/reference/importNonStringLiteral.errors.txt +++ b/tests/baselines/reference/importNonStringLiteral.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/externalModules/importNonStringLiteral.ts(2,22): error TS1141: String literal expected. +tests/cases/conformance/externalModules/vs/foo_0.ts(2,22): error TS1141: String literal expected. -==== tests/cases/conformance/externalModules/importNonStringLiteral.ts (1 errors) ==== +==== tests/cases/conformance/externalModules/vs/foo_0.ts (1 errors) ==== var x = "filename"; import foo = require(x); // invalid ~ diff --git a/tests/baselines/reference/importNonStringLiteral.js b/tests/baselines/reference/importNonStringLiteral.js index 52ef5a10a67..46185a2dfe4 100644 --- a/tests/baselines/reference/importNonStringLiteral.js +++ b/tests/baselines/reference/importNonStringLiteral.js @@ -1,7 +1,7 @@ -//// [importNonStringLiteral.ts] +//// [foo_0.ts] var x = "filename"; import foo = require(x); // invalid -//// [importNonStringLiteral.js] +//// [foo_0.js] var x = "filename"; diff --git a/tests/baselines/reference/initializersInDeclarations.errors.txt b/tests/baselines/reference/initializersInDeclarations.errors.txt index 9840181e092..ed11f2f08ac 100644 --- a/tests/baselines/reference/initializersInDeclarations.errors.txt +++ b/tests/baselines/reference/initializersInDeclarations.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/externalModules/initializersInDeclarations.ts(5,9): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(6,16): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(7,16): error TS1184: An implementation cannot be declared in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(12,15): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(13,15): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(16,2): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(18,16): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(5,9): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(6,16): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(7,16): error TS1184: An implementation cannot be declared in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(12,15): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(13,15): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(16,2): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(18,16): error TS1039: Initializers are not allowed in ambient contexts. -==== tests/cases/conformance/externalModules/initializersInDeclarations.ts (7 errors) ==== +==== tests/cases/conformance/externalModules/file1.d.ts (7 errors) ==== // Errors: Initializers & statements in declaration file diff --git a/tests/baselines/reference/initializersInDeclarations.js b/tests/baselines/reference/initializersInDeclarations.js deleted file mode 100644 index 0506c72fc56..00000000000 --- a/tests/baselines/reference/initializersInDeclarations.js +++ /dev/null @@ -1,23 +0,0 @@ -//// [initializersInDeclarations.ts] - -// Errors: Initializers & statements in declaration file - -declare class Foo { - name = "test"; - "some prop" = 42; - fn(): boolean { - return false; - } -} - -declare var x = []; -declare var y = {}; - -declare module M1 { - while(true); - - export var v1 = () => false; -} - -//// [initializersInDeclarations.js] -// Errors: Initializers & statements in declaration file diff --git a/tests/baselines/reference/isolatedModulesAmbientConstEnum.errors.txt b/tests/baselines/reference/isolatedModulesAmbientConstEnum.errors.txt index bb8a5202bc5..e0eef7d892d 100644 --- a/tests/baselines/reference/isolatedModulesAmbientConstEnum.errors.txt +++ b/tests/baselines/reference/isolatedModulesAmbientConstEnum.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/isolatedModulesAmbientConstEnum.ts(3,20): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided. +tests/cases/compiler/file1.ts(3,20): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided. -==== tests/cases/compiler/isolatedModulesAmbientConstEnum.ts (1 errors) ==== +==== tests/cases/compiler/file1.ts (1 errors) ==== declare const enum E { X = 1} diff --git a/tests/baselines/reference/isolatedModulesAmbientConstEnum.js b/tests/baselines/reference/isolatedModulesAmbientConstEnum.js index 7742122b687..6d9fc540d9a 100644 --- a/tests/baselines/reference/isolatedModulesAmbientConstEnum.js +++ b/tests/baselines/reference/isolatedModulesAmbientConstEnum.js @@ -1,8 +1,8 @@ -//// [isolatedModulesAmbientConstEnum.ts] +//// [file1.ts] declare const enum E { X = 1} export var y; -//// [isolatedModulesAmbientConstEnum.js] +//// [file1.js] export var y; diff --git a/tests/baselines/reference/isolatedModulesDeclaration.errors.txt b/tests/baselines/reference/isolatedModulesDeclaration.errors.txt index 749e86116e8..2997acd58ac 100644 --- a/tests/baselines/reference/isolatedModulesDeclaration.errors.txt +++ b/tests/baselines/reference/isolatedModulesDeclaration.errors.txt @@ -2,6 +2,6 @@ error TS5053: Option 'declaration' cannot be specified with option 'isolatedModu !!! error TS5053: Option 'declaration' cannot be specified with option 'isolatedModules'. -==== tests/cases/compiler/isolatedModulesDeclaration.ts (0 errors) ==== +==== tests/cases/compiler/file1.ts (0 errors) ==== export var x; \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesDeclaration.js b/tests/baselines/reference/isolatedModulesDeclaration.js index 12e6f23f92e..bb3e560a2f8 100644 --- a/tests/baselines/reference/isolatedModulesDeclaration.js +++ b/tests/baselines/reference/isolatedModulesDeclaration.js @@ -1,10 +1,10 @@ -//// [isolatedModulesDeclaration.ts] +//// [file1.ts] export var x; -//// [isolatedModulesDeclaration.js] +//// [file1.js] export var x; -//// [isolatedModulesDeclaration.d.ts] +//// [file1.d.ts] export declare var x: any; diff --git a/tests/baselines/reference/isolatedModulesES6.js b/tests/baselines/reference/isolatedModulesES6.js index eb2ee3ee33a..2963a9d694f 100644 --- a/tests/baselines/reference/isolatedModulesES6.js +++ b/tests/baselines/reference/isolatedModulesES6.js @@ -1,5 +1,5 @@ -//// [isolatedModulesES6.ts] +//// [file1.ts] export var x; -//// [isolatedModulesES6.js] +//// [file1.js] export var x; diff --git a/tests/baselines/reference/isolatedModulesES6.symbols b/tests/baselines/reference/isolatedModulesES6.symbols index c705cbc5af8..625dbfbe699 100644 --- a/tests/baselines/reference/isolatedModulesES6.symbols +++ b/tests/baselines/reference/isolatedModulesES6.symbols @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesES6.ts === +=== tests/cases/compiler/file1.ts === export var x; ->x : Symbol(x, Decl(isolatedModulesES6.ts, 0, 10)) +>x : Symbol(x, Decl(file1.ts, 0, 10)) diff --git a/tests/baselines/reference/isolatedModulesES6.types b/tests/baselines/reference/isolatedModulesES6.types index 898b9715ca4..27dca700bb9 100644 --- a/tests/baselines/reference/isolatedModulesES6.types +++ b/tests/baselines/reference/isolatedModulesES6.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesES6.ts === +=== tests/cases/compiler/file1.ts === export var x; >x : any diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt b/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt index 8c6881a9bc1..60d2ca987e4 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt +++ b/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/isolatedModulesImportExportElision.ts(2,17): error TS2307: Cannot find module 'module'. -tests/cases/compiler/isolatedModulesImportExportElision.ts(3,18): error TS2307: Cannot find module 'module'. -tests/cases/compiler/isolatedModulesImportExportElision.ts(4,21): error TS2307: Cannot find module 'module'. -tests/cases/compiler/isolatedModulesImportExportElision.ts(12,18): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(2,17): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(3,18): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(4,21): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(12,18): error TS2307: Cannot find module 'module'. -==== tests/cases/compiler/isolatedModulesImportExportElision.ts (4 errors) ==== +==== tests/cases/compiler/file1.ts (4 errors) ==== import {c} from "module" ~~~~~~~~ diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index 8cb65747e6f..4498b462e18 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -1,4 +1,4 @@ -//// [isolatedModulesImportExportElision.ts] +//// [file1.ts] import {c} from "module" import {c2} from "module" @@ -13,7 +13,7 @@ let y = ns.value; export {c1} from "module"; export var z = x; -//// [isolatedModulesImportExportElision.js] +//// [file1.js] var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt b/tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt index 337fcb16ba3..2579ffc4a90 100644 --- a/tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt +++ b/tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt @@ -2,6 +2,6 @@ error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedMo !!! error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'. -==== tests/cases/compiler/isolatedModulesNoEmitOnError.ts (0 errors) ==== +==== tests/cases/compiler/file1.ts (0 errors) ==== export var x; \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesNoExternalModule.errors.txt b/tests/baselines/reference/isolatedModulesNoExternalModule.errors.txt index d00520a0618..29353b3284a 100644 --- a/tests/baselines/reference/isolatedModulesNoExternalModule.errors.txt +++ b/tests/baselines/reference/isolatedModulesNoExternalModule.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/isolatedModulesNoExternalModule.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided. +tests/cases/compiler/file1.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided. -==== tests/cases/compiler/isolatedModulesNoExternalModule.ts (1 errors) ==== +==== tests/cases/compiler/file1.ts (1 errors) ==== var x; ~~~ diff --git a/tests/baselines/reference/isolatedModulesNoExternalModule.js b/tests/baselines/reference/isolatedModulesNoExternalModule.js index dd5d23a538c..52cdbaa1402 100644 --- a/tests/baselines/reference/isolatedModulesNoExternalModule.js +++ b/tests/baselines/reference/isolatedModulesNoExternalModule.js @@ -1,6 +1,6 @@ -//// [isolatedModulesNoExternalModule.ts] +//// [file1.ts] var x; -//// [isolatedModulesNoExternalModule.js] +//// [file1.js] var x; diff --git a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.js b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.js index efdba17dc93..396fc597911 100644 --- a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.js +++ b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.js @@ -1,10 +1,10 @@ -//// [isolatedModulesNonAmbientConstEnum.ts] +//// [file1.ts] const enum E { X = 100 }; var e = E.X; export var x; -//// [isolatedModulesNonAmbientConstEnum.js] +//// [file1.js] var E; (function (E) { E[E["X"] = 100] = "X"; diff --git a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.symbols b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.symbols index 5e30fd0b2ff..4755208b21a 100644 --- a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.symbols +++ b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.symbols @@ -1,15 +1,15 @@ -=== tests/cases/compiler/isolatedModulesNonAmbientConstEnum.ts === +=== tests/cases/compiler/file1.ts === const enum E { X = 100 }; ->E : Symbol(E, Decl(isolatedModulesNonAmbientConstEnum.ts, 0, 0)) ->X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14)) +>E : Symbol(E, Decl(file1.ts, 0, 0)) +>X : Symbol(E.X, Decl(file1.ts, 1, 14)) var e = E.X; ->e : Symbol(e, Decl(isolatedModulesNonAmbientConstEnum.ts, 2, 3)) ->E.X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14)) ->E : Symbol(E, Decl(isolatedModulesNonAmbientConstEnum.ts, 0, 0)) ->X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14)) +>e : Symbol(e, Decl(file1.ts, 2, 3)) +>E.X : Symbol(E.X, Decl(file1.ts, 1, 14)) +>E : Symbol(E, Decl(file1.ts, 0, 0)) +>X : Symbol(E.X, Decl(file1.ts, 1, 14)) export var x; ->x : Symbol(x, Decl(isolatedModulesNonAmbientConstEnum.ts, 3, 10)) +>x : Symbol(x, Decl(file1.ts, 3, 10)) diff --git a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.types b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.types index d7e83b81070..4583a1c0730 100644 --- a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.types +++ b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesNonAmbientConstEnum.ts === +=== tests/cases/compiler/file1.ts === const enum E { X = 100 }; >E : E diff --git a/tests/baselines/reference/isolatedModulesSourceMap.js b/tests/baselines/reference/isolatedModulesSourceMap.js index 2722a3ce7ab..02d394752d1 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.js +++ b/tests/baselines/reference/isolatedModulesSourceMap.js @@ -1,7 +1,7 @@ -//// [isolatedModulesSourceMap.ts] +//// [file1.ts] export var x = 1; -//// [isolatedModulesSourceMap.js] +//// [file1.js] export var x = 1; -//# sourceMappingURL=isolatedModulesSourceMap.js.map \ No newline at end of file +//# sourceMappingURL=file1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesSourceMap.js.map b/tests/baselines/reference/isolatedModulesSourceMap.js.map index 9fa3e0da0d6..3d86a0a7144 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.js.map +++ b/tests/baselines/reference/isolatedModulesSourceMap.js.map @@ -1,2 +1,2 @@ -//// [isolatedModulesSourceMap.js.map] -{"version":3,"file":"isolatedModulesSourceMap.js","sourceRoot":"","sources":["isolatedModulesSourceMap.ts"],"names":[],"mappings":"AACA,WAAW,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file +//// [file1.js.map] +{"version":3,"file":"file1.js","sourceRoot":"","sources":["file1.ts"],"names":[],"mappings":"AACA,WAAW,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt b/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt index d31445505f7..7edf071f5d1 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt +++ b/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt @@ -1,12 +1,12 @@ =================================================================== -JsFile: isolatedModulesSourceMap.js -mapUrl: isolatedModulesSourceMap.js.map +JsFile: file1.js +mapUrl: file1.js.map sourceRoot: -sources: isolatedModulesSourceMap.ts +sources: file1.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/compiler/isolatedModulesSourceMap.js -sourceFile:isolatedModulesSourceMap.ts +emittedFile:tests/cases/compiler/file1.js +sourceFile:file1.ts ------------------------------------------------------------------- >>>export var x = 1; 1 > @@ -15,7 +15,7 @@ sourceFile:isolatedModulesSourceMap.ts 4 > ^^^ 5 > ^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^-> 1 > > 2 >export var @@ -30,4 +30,4 @@ sourceFile:isolatedModulesSourceMap.ts 5 >Emitted(1, 17) Source(2, 17) + SourceIndex(0) 6 >Emitted(1, 18) Source(2, 18) + SourceIndex(0) --- ->>>//# sourceMappingURL=isolatedModulesSourceMap.js.map \ No newline at end of file +>>>//# sourceMappingURL=file1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesSourceMap.symbols b/tests/baselines/reference/isolatedModulesSourceMap.symbols index d4ae3c34cf1..2f2d16d8ad0 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.symbols +++ b/tests/baselines/reference/isolatedModulesSourceMap.symbols @@ -1,5 +1,5 @@ -=== tests/cases/compiler/isolatedModulesSourceMap.ts === +=== tests/cases/compiler/file1.ts === export var x = 1; ->x : Symbol(x, Decl(isolatedModulesSourceMap.ts, 1, 10)) +>x : Symbol(x, Decl(file1.ts, 1, 10)) diff --git a/tests/baselines/reference/isolatedModulesSourceMap.types b/tests/baselines/reference/isolatedModulesSourceMap.types index 1955fe5da6e..d2a474c023d 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.types +++ b/tests/baselines/reference/isolatedModulesSourceMap.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesSourceMap.ts === +=== tests/cases/compiler/file1.ts === export var x = 1; >x : number diff --git a/tests/baselines/reference/isolatedModulesSpecifiedModule.js b/tests/baselines/reference/isolatedModulesSpecifiedModule.js index 95e4ec88d92..6d002e5a66e 100644 --- a/tests/baselines/reference/isolatedModulesSpecifiedModule.js +++ b/tests/baselines/reference/isolatedModulesSpecifiedModule.js @@ -1,4 +1,4 @@ -//// [isolatedModulesSpecifiedModule.ts] +//// [file1.ts] export var x; -//// [isolatedModulesSpecifiedModule.js] +//// [file1.js] diff --git a/tests/baselines/reference/isolatedModulesSpecifiedModule.symbols b/tests/baselines/reference/isolatedModulesSpecifiedModule.symbols index 91ede682d7c..625dbfbe699 100644 --- a/tests/baselines/reference/isolatedModulesSpecifiedModule.symbols +++ b/tests/baselines/reference/isolatedModulesSpecifiedModule.symbols @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesSpecifiedModule.ts === +=== tests/cases/compiler/file1.ts === export var x; ->x : Symbol(x, Decl(isolatedModulesSpecifiedModule.ts, 0, 10)) +>x : Symbol(x, Decl(file1.ts, 0, 10)) diff --git a/tests/baselines/reference/isolatedModulesSpecifiedModule.types b/tests/baselines/reference/isolatedModulesSpecifiedModule.types index 8dee90a199f..27dca700bb9 100644 --- a/tests/baselines/reference/isolatedModulesSpecifiedModule.types +++ b/tests/baselines/reference/isolatedModulesSpecifiedModule.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesSpecifiedModule.ts === +=== tests/cases/compiler/file1.ts === export var x; >x : any diff --git a/tests/baselines/reference/isolatedModulesUnspecifiedModule.errors.txt b/tests/baselines/reference/isolatedModulesUnspecifiedModule.errors.txt index 7d290bcae44..c2277a90859 100644 --- a/tests/baselines/reference/isolatedModulesUnspecifiedModule.errors.txt +++ b/tests/baselines/reference/isolatedModulesUnspecifiedModule.errors.txt @@ -2,5 +2,5 @@ error TS5047: Option 'isolatedModules' can only be used when either option'--mod !!! error TS5047: Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher. -==== tests/cases/compiler/isolatedModulesUnspecifiedModule.ts (0 errors) ==== +==== tests/cases/compiler/file1.ts (0 errors) ==== export var x; \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesUnspecifiedModule.js b/tests/baselines/reference/isolatedModulesUnspecifiedModule.js index 68b9bfb62db..6d002e5a66e 100644 --- a/tests/baselines/reference/isolatedModulesUnspecifiedModule.js +++ b/tests/baselines/reference/isolatedModulesUnspecifiedModule.js @@ -1,4 +1,4 @@ -//// [isolatedModulesUnspecifiedModule.ts] +//// [file1.ts] export var x; -//// [isolatedModulesUnspecifiedModule.js] +//// [file1.js] diff --git a/tests/baselines/reference/tsxAttributeInvalidNames.errors.txt b/tests/baselines/reference/tsxAttributeInvalidNames.errors.txt index 90d0d003c28..0607a01a11c 100644 --- a/tests/baselines/reference/tsxAttributeInvalidNames.errors.txt +++ b/tests/baselines/reference/tsxAttributeInvalidNames.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,8): error TS1003: Identifier expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,10): error TS1005: ';' expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,10): error TS2304: Cannot find name 'data'. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,15): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,18): error TS1005: ':' expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,21): error TS1109: Expression expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,22): error TS1109: Expression expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,8): error TS1003: Identifier expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,9): error TS2304: Cannot find name 'data'. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,13): error TS1005: ';' expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,20): error TS1161: Unterminated regular expression literal. +tests/cases/conformance/jsx/file.tsx(10,8): error TS1003: Identifier expected. +tests/cases/conformance/jsx/file.tsx(10,10): error TS1005: ';' expected. +tests/cases/conformance/jsx/file.tsx(10,10): error TS2304: Cannot find name 'data'. +tests/cases/conformance/jsx/file.tsx(10,15): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/jsx/file.tsx(10,18): error TS1005: ':' expected. +tests/cases/conformance/jsx/file.tsx(10,21): error TS1109: Expression expected. +tests/cases/conformance/jsx/file.tsx(10,22): error TS1109: Expression expected. +tests/cases/conformance/jsx/file.tsx(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/jsx/file.tsx(11,8): error TS1003: Identifier expected. +tests/cases/conformance/jsx/file.tsx(11,9): error TS2304: Cannot find name 'data'. +tests/cases/conformance/jsx/file.tsx(11,13): error TS1005: ';' expected. +tests/cases/conformance/jsx/file.tsx(11,20): error TS1161: Unterminated regular expression literal. -==== tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx (12 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (12 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeInvalidNames.js b/tests/baselines/reference/tsxAttributeInvalidNames.js index af1de76995c..f734eb92ed5 100644 --- a/tests/baselines/reference/tsxAttributeInvalidNames.js +++ b/tests/baselines/reference/tsxAttributeInvalidNames.js @@ -1,4 +1,4 @@ -//// [tsxAttributeInvalidNames.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -11,7 +11,7 @@ declare module JSX { ; ; -//// [tsxAttributeInvalidNames.jsx] +//// [file.jsx] // Invalid names ; 32; diff --git a/tests/baselines/reference/tsxAttributeResolution1.errors.txt b/tests/baselines/reference/tsxAttributeResolution1.errors.txt index 7503c5f5969..49bb504604e 100644 --- a/tests/baselines/reference/tsxAttributeResolution1.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution1.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(23,8): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(24,8): error TS2339: Property 'y' does not exist on type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(25,8): error TS2339: Property 'y' does not exist on type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(26,8): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(27,8): error TS2339: Property 'var' does not exist on type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(29,1): error TS2324: Property 'reqd' is missing in type '{ reqd: string; }'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(30,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/jsx/file.tsx(23,8): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/jsx/file.tsx(24,8): error TS2339: Property 'y' does not exist on type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(25,8): error TS2339: Property 'y' does not exist on type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(26,8): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/jsx/file.tsx(27,8): error TS2339: Property 'var' does not exist on type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(29,1): error TS2324: Property 'reqd' is missing in type '{ reqd: string; }'. +tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution1.tsx (7 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (7 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution1.js b/tests/baselines/reference/tsxAttributeResolution1.js index 1e1efb7ea22..3bf94909c70 100644 --- a/tests/baselines/reference/tsxAttributeResolution1.js +++ b/tests/baselines/reference/tsxAttributeResolution1.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -34,7 +34,7 @@ interface Attribs1 { ; -//// [tsxAttributeResolution1.jsx] +//// [file.jsx] // OK ; // OK ; // OK diff --git a/tests/baselines/reference/tsxAttributeResolution2.errors.txt b/tests/baselines/reference/tsxAttributeResolution2.errors.txt index d213ccaf54e..84fe8fb20f2 100644 --- a/tests/baselines/reference/tsxAttributeResolution2.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxAttributeResolution2.tsx(17,21): error TS2339: Property 'leng' does not exist on type 'string'. +tests/cases/conformance/jsx/file.tsx(17,21): error TS2339: Property 'leng' does not exist on type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution2.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution2.js b/tests/baselines/reference/tsxAttributeResolution2.js index 564767e6169..f91f268f385 100644 --- a/tests/baselines/reference/tsxAttributeResolution2.js +++ b/tests/baselines/reference/tsxAttributeResolution2.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -18,7 +18,7 @@ interface Attribs1 { x.leng} />; // Error, no leng on 'string' -//// [tsxAttributeResolution2.jsx] +//// [file.jsx] // OK ; // OK ; // OK diff --git a/tests/baselines/reference/tsxAttributeResolution3.errors.txt b/tests/baselines/reference/tsxAttributeResolution3.errors.txt index c797362e8d7..6513b9879dc 100644 --- a/tests/baselines/reference/tsxAttributeResolution3.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution3.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(19,8): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. +tests/cases/conformance/jsx/file.tsx(19,8): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(23,1): error TS2324: Property 'x' is missing in type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(31,15): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. +tests/cases/conformance/jsx/file.tsx(23,1): error TS2324: Property 'x' is missing in type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(31,15): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(39,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/jsx/file.tsx(39,8): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution3.tsx (4 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution3.js b/tests/baselines/reference/tsxAttributeResolution3.js index 8cf853820e1..2898a6bc251 100644 --- a/tests/baselines/reference/tsxAttributeResolution3.js +++ b/tests/baselines/reference/tsxAttributeResolution3.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution3.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -40,7 +40,7 @@ var obj7 = { x: 'foo' }; -//// [tsxAttributeResolution3.jsx] +//// [file.jsx] // OK var obj1 = { x: 'foo' }; ; diff --git a/tests/baselines/reference/tsxAttributeResolution4.errors.txt b/tests/baselines/reference/tsxAttributeResolution4.errors.txt index 211a349b304..0a54dc32c46 100644 --- a/tests/baselines/reference/tsxAttributeResolution4.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxAttributeResolution4.tsx(15,26): error TS2339: Property 'len' does not exist on type 'string'. +tests/cases/conformance/jsx/file.tsx(15,26): error TS2339: Property 'len' does not exist on type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution4.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution4.js b/tests/baselines/reference/tsxAttributeResolution4.js index d56cb4cc2e8..ccd1ba8157c 100644 --- a/tests/baselines/reference/tsxAttributeResolution4.js +++ b/tests/baselines/reference/tsxAttributeResolution4.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution4.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -16,7 +16,7 @@ interface Attribs1 { n.len} } />; -//// [tsxAttributeResolution4.jsx] +//// [file.jsx] // OK ; // Error, no member 'len' on 'string' diff --git a/tests/baselines/reference/tsxAttributeResolution5.errors.txt b/tests/baselines/reference/tsxAttributeResolution5.errors.txt index 1b42dd01465..d7aa46bc05a 100644 --- a/tests/baselines/reference/tsxAttributeResolution5.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution5.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(21,16): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. +tests/cases/conformance/jsx/file.tsx(21,16): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(25,9): error TS2324: Property 'x' is missing in type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(29,1): error TS2324: Property 'x' is missing in type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(25,9): error TS2324: Property 'x' is missing in type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(29,1): error TS2324: Property 'x' is missing in type 'Attribs1'. -==== tests/cases/conformance/jsx/tsxAttributeResolution5.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution5.js b/tests/baselines/reference/tsxAttributeResolution5.js index 34fe9a3bfb6..abfb54e000c 100644 --- a/tests/baselines/reference/tsxAttributeResolution5.js +++ b/tests/baselines/reference/tsxAttributeResolution5.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution5.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -31,7 +31,7 @@ function make3 (obj: T) { ; // OK -//// [tsxAttributeResolution5.jsx] +//// [file.jsx] function make1(obj) { return ; // OK } diff --git a/tests/baselines/reference/tsxAttributeResolution6.errors.txt b/tests/baselines/reference/tsxAttributeResolution6.errors.txt index 4f1960358a5..732ac9500a9 100644 --- a/tests/baselines/reference/tsxAttributeResolution6.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(10,8): error TS2322: Type 'boolean' is not assignable to type 'string'. -tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(11,8): error TS2322: Type 'string' is not assignable to type 'boolean'. -tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: boolean; }'. +tests/cases/conformance/jsx/file.tsx(10,8): error TS2322: Type 'boolean' is not assignable to type 'string'. +tests/cases/conformance/jsx/file.tsx(11,8): error TS2322: Type 'string' is not assignable to type 'boolean'. +tests/cases/conformance/jsx/file.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: boolean; }'. -==== tests/cases/conformance/jsx/tsxAttributeResolution6.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution6.js b/tests/baselines/reference/tsxAttributeResolution6.js index f4af0ba875a..4665c5e322f 100644 --- a/tests/baselines/reference/tsxAttributeResolution6.js +++ b/tests/baselines/reference/tsxAttributeResolution6.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution6.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -18,7 +18,7 @@ declare module JSX { ; -//// [tsxAttributeResolution6.jsx] +//// [file.jsx] // Error ; ; diff --git a/tests/baselines/reference/tsxAttributeResolution7.errors.txt b/tests/baselines/reference/tsxAttributeResolution7.errors.txt index 4d05254ace8..acbd7f407de 100644 --- a/tests/baselines/reference/tsxAttributeResolution7.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution7.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxAttributeResolution7.tsx(9,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/jsx/file.tsx(9,8): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution7.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution7.js b/tests/baselines/reference/tsxAttributeResolution7.js index 7ebd2e8f4db..d474e48b21b 100644 --- a/tests/baselines/reference/tsxAttributeResolution7.js +++ b/tests/baselines/reference/tsxAttributeResolution7.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution7.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -15,7 +15,7 @@ declare module JSX { ; -//// [tsxAttributeResolution7.jsx] +//// [file.jsx] // Error ; // OK diff --git a/tests/baselines/reference/tsxAttributeResolution8.js b/tests/baselines/reference/tsxAttributeResolution8.js index 50fff6c80fd..e1b00c6b573 100644 --- a/tests/baselines/reference/tsxAttributeResolution8.js +++ b/tests/baselines/reference/tsxAttributeResolution8.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution8.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -10,7 +10,7 @@ var x: any; // Should be OK -//// [tsxAttributeResolution8.jsx] +//// [file.jsx] var x; // Should be OK ; diff --git a/tests/baselines/reference/tsxAttributeResolution8.symbols b/tests/baselines/reference/tsxAttributeResolution8.symbols index 9bb09c6cd85..ae194978a35 100644 --- a/tests/baselines/reference/tsxAttributeResolution8.symbols +++ b/tests/baselines/reference/tsxAttributeResolution8.symbols @@ -1,23 +1,23 @@ -=== tests/cases/conformance/jsx/tsxAttributeResolution8.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxAttributeResolution8.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxAttributeResolution8.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxAttributeResolution8.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) test1: {x: string}; ->test1 : Symbol(test1, Decl(tsxAttributeResolution8.tsx, 2, 30)) ->x : Symbol(x, Decl(tsxAttributeResolution8.tsx, 3, 10)) +>test1 : Symbol(test1, Decl(file.tsx, 2, 30)) +>x : Symbol(x, Decl(file.tsx, 3, 10)) } } var x: any; ->x : Symbol(x, Decl(tsxAttributeResolution8.tsx, 7, 3)) +>x : Symbol(x, Decl(file.tsx, 7, 3)) // Should be OK ->test1 : Symbol(JSX.IntrinsicElements.test1, Decl(tsxAttributeResolution8.tsx, 2, 30)) +>test1 : Symbol(JSX.IntrinsicElements.test1, Decl(file.tsx, 2, 30)) diff --git a/tests/baselines/reference/tsxAttributeResolution8.types b/tests/baselines/reference/tsxAttributeResolution8.types index db89d6678b6..99a60c24ce2 100644 --- a/tests/baselines/reference/tsxAttributeResolution8.types +++ b/tests/baselines/reference/tsxAttributeResolution8.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxAttributeResolution8.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution1.errors.txt b/tests/baselines/reference/tsxElementResolution1.errors.txt index b54430bd106..0042c5b052c 100644 --- a/tests/baselines/reference/tsxElementResolution1.errors.txt +++ b/tests/baselines/reference/tsxElementResolution1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution1.tsx(12,1): error TS2339: Property 'span' does not exist on type 'JSX.IntrinsicElements'. +tests/cases/conformance/jsx/file.tsx(12,1): error TS2339: Property 'span' does not exist on type 'JSX.IntrinsicElements'. -==== tests/cases/conformance/jsx/tsxElementResolution1.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxElementResolution1.js b/tests/baselines/reference/tsxElementResolution1.js index c7e0536bde2..47c60fba1b3 100644 --- a/tests/baselines/reference/tsxElementResolution1.js +++ b/tests/baselines/reference/tsxElementResolution1.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -12,7 +12,7 @@ declare module JSX { // Fail ; -//// [tsxElementResolution1.jsx] +//// [file.jsx] // OK
; // Fail diff --git a/tests/baselines/reference/tsxElementResolution10.errors.txt b/tests/baselines/reference/tsxElementResolution10.errors.txt index 6dcee7d18fa..9214ffe7dbb 100644 --- a/tests/baselines/reference/tsxElementResolution10.errors.txt +++ b/tests/baselines/reference/tsxElementResolution10.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution10.tsx(13,1): error TS2605: JSX element type '{ x: number; }' is not a constructor function for JSX elements. +tests/cases/conformance/jsx/file.tsx(13,1): error TS2605: JSX element type '{ x: number; }' is not a constructor function for JSX elements. Property 'render' is missing in type '{ x: number; }'. -==== tests/cases/conformance/jsx/tsxElementResolution10.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface ElementClass { diff --git a/tests/baselines/reference/tsxElementResolution10.js b/tests/baselines/reference/tsxElementResolution10.js index 84c8619ab96..72cd1cb9f00 100644 --- a/tests/baselines/reference/tsxElementResolution10.js +++ b/tests/baselines/reference/tsxElementResolution10.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution10.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementClass { @@ -20,7 +20,7 @@ var Obj2: Obj2type; ; // OK -//// [tsxElementResolution10.jsx] +//// [file.jsx] var Obj1; ; // Error, no render member var Obj2; diff --git a/tests/baselines/reference/tsxElementResolution11.errors.txt b/tests/baselines/reference/tsxElementResolution11.errors.txt index 4f3ee00d82f..f6a4913e558 100644 --- a/tests/baselines/reference/tsxElementResolution11.errors.txt +++ b/tests/baselines/reference/tsxElementResolution11.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution11.tsx(17,7): error TS2339: Property 'x' does not exist on type '{ q?: number; }'. +tests/cases/conformance/jsx/file.tsx(17,7): error TS2339: Property 'x' does not exist on type '{ q?: number; }'. -==== tests/cases/conformance/jsx/tsxElementResolution11.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface ElementAttributesProperty { } diff --git a/tests/baselines/reference/tsxElementResolution11.js b/tests/baselines/reference/tsxElementResolution11.js index fb8572116b1..dfed67210ed 100644 --- a/tests/baselines/reference/tsxElementResolution11.js +++ b/tests/baselines/reference/tsxElementResolution11.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution11.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementAttributesProperty { } @@ -24,7 +24,7 @@ var Obj3: Obj3type; ; // OK -//// [tsxElementResolution11.jsx] +//// [file.jsx] var Obj1; ; // OK var Obj2; diff --git a/tests/baselines/reference/tsxElementResolution12.errors.txt b/tests/baselines/reference/tsxElementResolution12.errors.txt index 71a22b502aa..4a15005f6fb 100644 --- a/tests/baselines/reference/tsxElementResolution12.errors.txt +++ b/tests/baselines/reference/tsxElementResolution12.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/jsx/tsxElementResolution12.tsx(17,2): error TS2304: Cannot find name 'Obj2'. -tests/cases/conformance/jsx/tsxElementResolution12.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property -tests/cases/conformance/jsx/tsxElementResolution12.tsx(30,7): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/jsx/file.tsx(17,2): error TS2304: Cannot find name 'Obj2'. +tests/cases/conformance/jsx/file.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property +tests/cases/conformance/jsx/file.tsx(30,7): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/conformance/jsx/tsxElementResolution12.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== declare module JSX { interface Element { } interface ElementAttributesProperty { pr: any; } diff --git a/tests/baselines/reference/tsxElementResolution12.js b/tests/baselines/reference/tsxElementResolution12.js index 12973efdda7..b4dd94ef0eb 100644 --- a/tests/baselines/reference/tsxElementResolution12.js +++ b/tests/baselines/reference/tsxElementResolution12.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution12.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementAttributesProperty { pr: any; } @@ -31,7 +31,7 @@ var Obj4: Obj4type; ; // Error -//// [tsxElementResolution12.jsx] +//// [file.jsx] var Obj1; ; // OK var obj2; diff --git a/tests/baselines/reference/tsxElementResolution13.js b/tests/baselines/reference/tsxElementResolution13.js index f8631bdec0c..461c494bc58 100644 --- a/tests/baselines/reference/tsxElementResolution13.js +++ b/tests/baselines/reference/tsxElementResolution13.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution13.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementAttributesProperty { pr1: any; pr2: any; } @@ -11,6 +11,6 @@ var obj1: Obj1; ; // Error -//// [tsxElementResolution13.jsx] +//// [file.jsx] var obj1; ; // Error diff --git a/tests/baselines/reference/tsxElementResolution13.symbols b/tests/baselines/reference/tsxElementResolution13.symbols index 4022602e53a..94758b291ac 100644 --- a/tests/baselines/reference/tsxElementResolution13.symbols +++ b/tests/baselines/reference/tsxElementResolution13.symbols @@ -1,25 +1,25 @@ -=== tests/cases/conformance/jsx/tsxElementResolution13.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution13.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution13.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface ElementAttributesProperty { pr1: any; pr2: any; } ->ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(tsxElementResolution13.tsx, 1, 22)) ->pr1 : Symbol(pr1, Decl(tsxElementResolution13.tsx, 2, 38)) ->pr2 : Symbol(pr2, Decl(tsxElementResolution13.tsx, 2, 48)) +>ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(file.tsx, 1, 22)) +>pr1 : Symbol(pr1, Decl(file.tsx, 2, 38)) +>pr2 : Symbol(pr2, Decl(file.tsx, 2, 48)) } interface Obj1 { ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution13.tsx, 3, 1)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1)) new(n: string): any; ->n : Symbol(n, Decl(tsxElementResolution13.tsx, 6, 5)) +>n : Symbol(n, Decl(file.tsx, 6, 5)) } var obj1: Obj1; ->obj1 : Symbol(obj1, Decl(tsxElementResolution13.tsx, 8, 3)) ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution13.tsx, 3, 1)) +>obj1 : Symbol(obj1, Decl(file.tsx, 8, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1)) ; // Error >x : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution13.types b/tests/baselines/reference/tsxElementResolution13.types index 613835f3211..57884f86b56 100644 --- a/tests/baselines/reference/tsxElementResolution13.types +++ b/tests/baselines/reference/tsxElementResolution13.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution13.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution14.js b/tests/baselines/reference/tsxElementResolution14.js index e1e440db5f3..d594aba237b 100644 --- a/tests/baselines/reference/tsxElementResolution14.js +++ b/tests/baselines/reference/tsxElementResolution14.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution14.tsx] +//// [file.tsx] declare module JSX { interface Element { } } @@ -10,6 +10,6 @@ var obj1: Obj1; ; // OK -//// [tsxElementResolution14.jsx] +//// [file.jsx] var obj1; ; // OK diff --git a/tests/baselines/reference/tsxElementResolution14.symbols b/tests/baselines/reference/tsxElementResolution14.symbols index 58236a4e462..2400ef620eb 100644 --- a/tests/baselines/reference/tsxElementResolution14.symbols +++ b/tests/baselines/reference/tsxElementResolution14.symbols @@ -1,20 +1,20 @@ -=== tests/cases/conformance/jsx/tsxElementResolution14.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution14.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution14.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) } interface Obj1 { ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution14.tsx, 2, 1)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 2, 1)) new(n: string): {}; ->n : Symbol(n, Decl(tsxElementResolution14.tsx, 5, 5)) +>n : Symbol(n, Decl(file.tsx, 5, 5)) } var obj1: Obj1; ->obj1 : Symbol(obj1, Decl(tsxElementResolution14.tsx, 7, 3)) ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution14.tsx, 2, 1)) +>obj1 : Symbol(obj1, Decl(file.tsx, 7, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 2, 1)) ; // OK >x : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution14.types b/tests/baselines/reference/tsxElementResolution14.types index 80f9555030f..2768a6c531d 100644 --- a/tests/baselines/reference/tsxElementResolution14.types +++ b/tests/baselines/reference/tsxElementResolution14.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution14.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution15.errors.txt b/tests/baselines/reference/tsxElementResolution15.errors.txt index 24480ab7f2b..79cbd1a37af 100644 --- a/tests/baselines/reference/tsxElementResolution15.errors.txt +++ b/tests/baselines/reference/tsxElementResolution15.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution15.tsx(3,12): error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property +tests/cases/conformance/jsx/file.tsx(3,12): error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property -==== tests/cases/conformance/jsx/tsxElementResolution15.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface ElementAttributesProperty { pr1: any; pr2: any; } diff --git a/tests/baselines/reference/tsxElementResolution15.js b/tests/baselines/reference/tsxElementResolution15.js index 831b3a54b41..6c8560f225d 100644 --- a/tests/baselines/reference/tsxElementResolution15.js +++ b/tests/baselines/reference/tsxElementResolution15.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution15.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementAttributesProperty { pr1: any; pr2: any; } @@ -12,6 +12,6 @@ var Obj1: Obj1type; ; // Error -//// [tsxElementResolution15.jsx] +//// [file.jsx] var Obj1; ; // Error diff --git a/tests/baselines/reference/tsxElementResolution16.errors.txt b/tests/baselines/reference/tsxElementResolution16.errors.txt index 0e30cad9673..1a887c39995 100644 --- a/tests/baselines/reference/tsxElementResolution16.errors.txt +++ b/tests/baselines/reference/tsxElementResolution16.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution16.tsx(8,1): error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist. -tests/cases/conformance/jsx/tsxElementResolution16.tsx(8,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists +tests/cases/conformance/jsx/file.tsx(8,1): error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist. +tests/cases/conformance/jsx/file.tsx(8,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists -==== tests/cases/conformance/jsx/tsxElementResolution16.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { } diff --git a/tests/baselines/reference/tsxElementResolution16.js b/tests/baselines/reference/tsxElementResolution16.js index 1961215fa05..a5abea6717f 100644 --- a/tests/baselines/reference/tsxElementResolution16.js +++ b/tests/baselines/reference/tsxElementResolution16.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution16.tsx] +//// [file.tsx] declare module JSX { } @@ -9,6 +9,6 @@ var obj1: Obj1; ; // Error (JSX.Element is implicit any) -//// [tsxElementResolution16.jsx] +//// [file.jsx] var obj1; ; // Error (JSX.Element is implicit any) diff --git a/tests/baselines/reference/tsxElementResolution18.errors.txt b/tests/baselines/reference/tsxElementResolution18.errors.txt index a4728b2f749..5b8468696c0 100644 --- a/tests/baselines/reference/tsxElementResolution18.errors.txt +++ b/tests/baselines/reference/tsxElementResolution18.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution18.tsx(6,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists +tests/cases/conformance/jsx/file1.tsx(6,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists -==== tests/cases/conformance/jsx/tsxElementResolution18.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file1.tsx (1 errors) ==== declare module JSX { interface Element { } } diff --git a/tests/baselines/reference/tsxElementResolution18.js b/tests/baselines/reference/tsxElementResolution18.js index 0b5138b7b49..4481b9033f4 100644 --- a/tests/baselines/reference/tsxElementResolution18.js +++ b/tests/baselines/reference/tsxElementResolution18.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution18.tsx] +//// [file1.tsx] declare module JSX { interface Element { } } @@ -7,6 +7,6 @@ declare module JSX {
; -//// [tsxElementResolution18.jsx] +//// [file1.jsx] // Error under implicit any
; diff --git a/tests/baselines/reference/tsxElementResolution2.js b/tests/baselines/reference/tsxElementResolution2.js index 1d06656d529..c6934e9df89 100644 --- a/tests/baselines/reference/tsxElementResolution2.js +++ b/tests/baselines/reference/tsxElementResolution2.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -12,7 +12,7 @@ declare module JSX { // OK ; -//// [tsxElementResolution2.jsx] +//// [file.jsx] // OK
; // OK diff --git a/tests/baselines/reference/tsxElementResolution2.symbols b/tests/baselines/reference/tsxElementResolution2.symbols index 2935bcd4f63..efb1d9ae5dc 100644 --- a/tests/baselines/reference/tsxElementResolution2.symbols +++ b/tests/baselines/reference/tsxElementResolution2.symbols @@ -1,23 +1,23 @@ -=== tests/cases/conformance/jsx/tsxElementResolution2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [x: string]: any; ->x : Symbol(x, Decl(tsxElementResolution2.tsx, 3, 6)) +>x : Symbol(x, Decl(file.tsx, 3, 6)) } } // OK
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // OK ; ->span : Symbol(JSX.IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22)) +>span : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxElementResolution2.types b/tests/baselines/reference/tsxElementResolution2.types index 56ea5158253..4fd87304a72 100644 --- a/tests/baselines/reference/tsxElementResolution2.types +++ b/tests/baselines/reference/tsxElementResolution2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution3.errors.txt b/tests/baselines/reference/tsxElementResolution3.errors.txt index bc3c7c5ebfc..1b8b6c5834c 100644 --- a/tests/baselines/reference/tsxElementResolution3.errors.txt +++ b/tests/baselines/reference/tsxElementResolution3.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution3.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: string; }'. -tests/cases/conformance/jsx/tsxElementResolution3.tsx(12,7): error TS2339: Property 'w' does not exist on type '{ n: string; }'. +tests/cases/conformance/jsx/file.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: string; }'. +tests/cases/conformance/jsx/file.tsx(12,7): error TS2339: Property 'w' does not exist on type '{ n: string; }'. -==== tests/cases/conformance/jsx/tsxElementResolution3.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxElementResolution3.js b/tests/baselines/reference/tsxElementResolution3.js index 607d1c5ec66..75b23db761e 100644 --- a/tests/baselines/reference/tsxElementResolution3.js +++ b/tests/baselines/reference/tsxElementResolution3.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution3.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -12,7 +12,7 @@ declare module JSX { // Error ; -//// [tsxElementResolution3.jsx] +//// [file.jsx] // OK
; // Error diff --git a/tests/baselines/reference/tsxElementResolution4.errors.txt b/tests/baselines/reference/tsxElementResolution4.errors.txt index 0e383af5e7b..e6dd599defc 100644 --- a/tests/baselines/reference/tsxElementResolution4.errors.txt +++ b/tests/baselines/reference/tsxElementResolution4.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution4.tsx(16,1): error TS2324: Property 'm' is missing in type '{ m: string; }'. -tests/cases/conformance/jsx/tsxElementResolution4.tsx(16,7): error TS2339: Property 'q' does not exist on type '{ m: string; }'. +tests/cases/conformance/jsx/file.tsx(16,1): error TS2324: Property 'm' is missing in type '{ m: string; }'. +tests/cases/conformance/jsx/file.tsx(16,7): error TS2339: Property 'q' does not exist on type '{ m: string; }'. -==== tests/cases/conformance/jsx/tsxElementResolution4.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxElementResolution4.js b/tests/baselines/reference/tsxElementResolution4.js index ea395cb5077..40d86816f76 100644 --- a/tests/baselines/reference/tsxElementResolution4.js +++ b/tests/baselines/reference/tsxElementResolution4.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution4.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -17,7 +17,7 @@ declare module JSX { ; -//// [tsxElementResolution4.jsx] +//// [file.jsx] // OK
; // OK diff --git a/tests/baselines/reference/tsxElementResolution5.js b/tests/baselines/reference/tsxElementResolution5.js index 8aadfec0f78..4dcd644e471 100644 --- a/tests/baselines/reference/tsxElementResolution5.js +++ b/tests/baselines/reference/tsxElementResolution5.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution5.tsx] +//// [file1.tsx] declare module JSX { interface Element { } } @@ -7,6 +7,6 @@ declare module JSX {
; -//// [tsxElementResolution5.jsx] +//// [file1.jsx] // OK, but implicit any
; diff --git a/tests/baselines/reference/tsxElementResolution5.symbols b/tests/baselines/reference/tsxElementResolution5.symbols index 8bbbfaaeb68..461ffd78aaa 100644 --- a/tests/baselines/reference/tsxElementResolution5.symbols +++ b/tests/baselines/reference/tsxElementResolution5.symbols @@ -1,9 +1,9 @@ -=== tests/cases/conformance/jsx/tsxElementResolution5.tsx === +=== tests/cases/conformance/jsx/file1.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution5.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file1.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution5.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file1.tsx, 0, 20)) } // OK, but implicit any diff --git a/tests/baselines/reference/tsxElementResolution5.types b/tests/baselines/reference/tsxElementResolution5.types index ba3509f4fa1..cdfb91c7067 100644 --- a/tests/baselines/reference/tsxElementResolution5.types +++ b/tests/baselines/reference/tsxElementResolution5.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution5.tsx === +=== tests/cases/conformance/jsx/file1.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution6.errors.txt b/tests/baselines/reference/tsxElementResolution6.errors.txt index 1336cc6df0c..66269efee9f 100644 --- a/tests/baselines/reference/tsxElementResolution6.errors.txt +++ b/tests/baselines/reference/tsxElementResolution6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution6.tsx(8,1): error TS2339: Property 'div' does not exist on type 'JSX.IntrinsicElements'. +tests/cases/conformance/jsx/file.tsx(8,1): error TS2339: Property 'div' does not exist on type 'JSX.IntrinsicElements'. -==== tests/cases/conformance/jsx/tsxElementResolution6.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { } diff --git a/tests/baselines/reference/tsxElementResolution6.js b/tests/baselines/reference/tsxElementResolution6.js index 1b6d174fea8..43d0512c893 100644 --- a/tests/baselines/reference/tsxElementResolution6.js +++ b/tests/baselines/reference/tsxElementResolution6.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution6.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { } @@ -9,7 +9,7 @@ var div: any;
; -//// [tsxElementResolution6.jsx] +//// [file.jsx] var div; // Still an error
; diff --git a/tests/baselines/reference/tsxElementResolution7.errors.txt b/tests/baselines/reference/tsxElementResolution7.errors.txt index b8549e19535..20b5b730d4c 100644 --- a/tests/baselines/reference/tsxElementResolution7.errors.txt +++ b/tests/baselines/reference/tsxElementResolution7.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution7.tsx(12,5): error TS2339: Property 'other' does not exist on type 'typeof my'. -tests/cases/conformance/jsx/tsxElementResolution7.tsx(19,11): error TS2339: Property 'non' does not exist on type 'typeof my'. +tests/cases/conformance/jsx/file.tsx(12,5): error TS2339: Property 'other' does not exist on type 'typeof my'. +tests/cases/conformance/jsx/file.tsx(19,11): error TS2339: Property 'non' does not exist on type 'typeof my'. -==== tests/cases/conformance/jsx/tsxElementResolution7.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { } diff --git a/tests/baselines/reference/tsxElementResolution7.js b/tests/baselines/reference/tsxElementResolution7.js index 7df44b052a2..06daf11ceac 100644 --- a/tests/baselines/reference/tsxElementResolution7.js +++ b/tests/baselines/reference/tsxElementResolution7.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution7.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { } @@ -21,7 +21,7 @@ module q { } -//// [tsxElementResolution7.jsx] +//// [file.jsx] var my; (function (my) { })(my || (my = {})); diff --git a/tests/baselines/reference/tsxElementResolution8.errors.txt b/tests/baselines/reference/tsxElementResolution8.errors.txt index 92ff05d1aed..5f54bc23cd0 100644 --- a/tests/baselines/reference/tsxElementResolution8.errors.txt +++ b/tests/baselines/reference/tsxElementResolution8.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution8.tsx(8,2): error TS2604: JSX element type 'Div' does not have any construct or call signatures. -tests/cases/conformance/jsx/tsxElementResolution8.tsx(34,2): error TS2604: JSX element type 'Obj3' does not have any construct or call signatures. +tests/cases/conformance/jsx/file.tsx(8,2): error TS2604: JSX element type 'Div' does not have any construct or call signatures. +tests/cases/conformance/jsx/file.tsx(34,2): error TS2604: JSX element type 'Obj3' does not have any construct or call signatures. -==== tests/cases/conformance/jsx/tsxElementResolution8.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { } diff --git a/tests/baselines/reference/tsxElementResolution8.js b/tests/baselines/reference/tsxElementResolution8.js index 4217761c402..d82f26ee8b5 100644 --- a/tests/baselines/reference/tsxElementResolution8.js +++ b/tests/baselines/reference/tsxElementResolution8.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution8.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { } @@ -35,7 +35,7 @@ var Obj3: Obj3; ; // Error -//// [tsxElementResolution8.jsx] +//// [file.jsx] // Error var Div = 3;
; diff --git a/tests/baselines/reference/tsxElementResolution9.js b/tests/baselines/reference/tsxElementResolution9.js index c897a51eaeb..bc65bb0bb02 100644 --- a/tests/baselines/reference/tsxElementResolution9.js +++ b/tests/baselines/reference/tsxElementResolution9.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution9.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { } @@ -26,7 +26,7 @@ var Obj3: Obj3; ; // OK -//// [tsxElementResolution9.jsx] +//// [file.jsx] var Obj1; ; // Error, return type is not an object type var Obj2; diff --git a/tests/baselines/reference/tsxElementResolution9.symbols b/tests/baselines/reference/tsxElementResolution9.symbols index bfa04219ef9..e38c64d0847 100644 --- a/tests/baselines/reference/tsxElementResolution9.symbols +++ b/tests/baselines/reference/tsxElementResolution9.symbols @@ -1,67 +1,67 @@ -=== tests/cases/conformance/jsx/tsxElementResolution9.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution9.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution9.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { } ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxElementResolution9.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) } interface Obj1 { ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution9.tsx, 3, 1), Decl(tsxElementResolution9.tsx, 9, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1), Decl(file.tsx, 9, 3)) new(n: string): { x: number }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 6, 5)) ->x : Symbol(x, Decl(tsxElementResolution9.tsx, 6, 18)) +>n : Symbol(n, Decl(file.tsx, 6, 5)) +>x : Symbol(x, Decl(file.tsx, 6, 18)) new(n: number): { y: string }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 7, 5)) ->y : Symbol(y, Decl(tsxElementResolution9.tsx, 7, 18)) +>n : Symbol(n, Decl(file.tsx, 7, 5)) +>y : Symbol(y, Decl(file.tsx, 7, 18)) } var Obj1: Obj1; ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution9.tsx, 3, 1), Decl(tsxElementResolution9.tsx, 9, 3)) ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution9.tsx, 3, 1), Decl(tsxElementResolution9.tsx, 9, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1), Decl(file.tsx, 9, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1), Decl(file.tsx, 9, 3)) ; // Error, return type is not an object type ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution9.tsx, 3, 1), Decl(tsxElementResolution9.tsx, 9, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1), Decl(file.tsx, 9, 3)) interface Obj2 { ->Obj2 : Symbol(Obj2, Decl(tsxElementResolution9.tsx, 10, 9), Decl(tsxElementResolution9.tsx, 16, 3)) +>Obj2 : Symbol(Obj2, Decl(file.tsx, 10, 9), Decl(file.tsx, 16, 3)) (n: string): { x: number }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 13, 2)) ->x : Symbol(x, Decl(tsxElementResolution9.tsx, 13, 15)) +>n : Symbol(n, Decl(file.tsx, 13, 2)) +>x : Symbol(x, Decl(file.tsx, 13, 15)) (n: number): { y: string }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 14, 2)) ->y : Symbol(y, Decl(tsxElementResolution9.tsx, 14, 15)) +>n : Symbol(n, Decl(file.tsx, 14, 2)) +>y : Symbol(y, Decl(file.tsx, 14, 15)) } var Obj2: Obj2; ->Obj2 : Symbol(Obj2, Decl(tsxElementResolution9.tsx, 10, 9), Decl(tsxElementResolution9.tsx, 16, 3)) ->Obj2 : Symbol(Obj2, Decl(tsxElementResolution9.tsx, 10, 9), Decl(tsxElementResolution9.tsx, 16, 3)) +>Obj2 : Symbol(Obj2, Decl(file.tsx, 10, 9), Decl(file.tsx, 16, 3)) +>Obj2 : Symbol(Obj2, Decl(file.tsx, 10, 9), Decl(file.tsx, 16, 3)) ; // Error, return type is not an object type ->Obj2 : Symbol(Obj2, Decl(tsxElementResolution9.tsx, 10, 9), Decl(tsxElementResolution9.tsx, 16, 3)) +>Obj2 : Symbol(Obj2, Decl(file.tsx, 10, 9), Decl(file.tsx, 16, 3)) interface Obj3 { ->Obj3 : Symbol(Obj3, Decl(tsxElementResolution9.tsx, 17, 9), Decl(tsxElementResolution9.tsx, 23, 3)) +>Obj3 : Symbol(Obj3, Decl(file.tsx, 17, 9), Decl(file.tsx, 23, 3)) (n: string): { x: number }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 20, 2)) ->x : Symbol(x, Decl(tsxElementResolution9.tsx, 20, 15)) +>n : Symbol(n, Decl(file.tsx, 20, 2)) +>x : Symbol(x, Decl(file.tsx, 20, 15)) (n: number): { x: number; y: string }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 21, 2)) ->x : Symbol(x, Decl(tsxElementResolution9.tsx, 21, 15)) ->y : Symbol(y, Decl(tsxElementResolution9.tsx, 21, 26)) +>n : Symbol(n, Decl(file.tsx, 21, 2)) +>x : Symbol(x, Decl(file.tsx, 21, 15)) +>y : Symbol(y, Decl(file.tsx, 21, 26)) } var Obj3: Obj3; ->Obj3 : Symbol(Obj3, Decl(tsxElementResolution9.tsx, 17, 9), Decl(tsxElementResolution9.tsx, 23, 3)) ->Obj3 : Symbol(Obj3, Decl(tsxElementResolution9.tsx, 17, 9), Decl(tsxElementResolution9.tsx, 23, 3)) +>Obj3 : Symbol(Obj3, Decl(file.tsx, 17, 9), Decl(file.tsx, 23, 3)) +>Obj3 : Symbol(Obj3, Decl(file.tsx, 17, 9), Decl(file.tsx, 23, 3)) ; // OK ->Obj3 : Symbol(Obj3, Decl(tsxElementResolution9.tsx, 17, 9), Decl(tsxElementResolution9.tsx, 23, 3)) +>Obj3 : Symbol(Obj3, Decl(file.tsx, 17, 9), Decl(file.tsx, 23, 3)) >x : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution9.types b/tests/baselines/reference/tsxElementResolution9.types index 6725bd216bd..dd84e6f07b5 100644 --- a/tests/baselines/reference/tsxElementResolution9.types +++ b/tests/baselines/reference/tsxElementResolution9.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution9.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxEmit1.js b/tests/baselines/reference/tsxEmit1.js index baa75526dd7..bfa78a3e96c 100644 --- a/tests/baselines/reference/tsxEmit1.js +++ b/tests/baselines/reference/tsxEmit1.js @@ -1,4 +1,4 @@ -//// [tsxEmit1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -40,7 +40,7 @@ var whitespace3 =
; -//// [tsxEmit1.jsx] +//// [file.jsx] var p; var selfClosed1 =
; var selfClosed2 =
; diff --git a/tests/baselines/reference/tsxEmit1.symbols b/tests/baselines/reference/tsxEmit1.symbols index aaca98ae9db..9d373bc62be 100644 --- a/tests/baselines/reference/tsxEmit1.symbols +++ b/tests/baselines/reference/tsxEmit1.symbols @@ -1,163 +1,163 @@ -=== tests/cases/conformance/jsx/tsxEmit1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxEmit1.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxEmit1.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxEmit1.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } var p; ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) var selfClosed1 =
; ->selfClosed1 : Symbol(selfClosed1, Decl(tsxEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed1 : Symbol(selfClosed1, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var selfClosed2 =
; ->selfClosed2 : Symbol(selfClosed2, Decl(tsxEmit1.tsx, 9, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed2 : Symbol(selfClosed2, Decl(file.tsx, 9, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) var selfClosed3 =
; ->selfClosed3 : Symbol(selfClosed3, Decl(tsxEmit1.tsx, 10, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed3 : Symbol(selfClosed3, Decl(file.tsx, 10, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) var selfClosed4 =
; ->selfClosed4 : Symbol(selfClosed4, Decl(tsxEmit1.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed4 : Symbol(selfClosed4, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed5 =
; ->selfClosed5 : Symbol(selfClosed5, Decl(tsxEmit1.tsx, 12, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed5 : Symbol(selfClosed5, Decl(file.tsx, 12, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed6 =
; ->selfClosed6 : Symbol(selfClosed6, Decl(tsxEmit1.tsx, 13, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed6 : Symbol(selfClosed6, Decl(file.tsx, 13, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed7 =
; ->selfClosed7 : Symbol(selfClosed7, Decl(tsxEmit1.tsx, 14, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed7 : Symbol(selfClosed7, Decl(file.tsx, 14, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) >y : Symbol(unknown) var openClosed1 =
; ->openClosed1 : Symbol(openClosed1, Decl(tsxEmit1.tsx, 16, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed1 : Symbol(openClosed1, Decl(file.tsx, 16, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed2 =
foo
; ->openClosed2 : Symbol(openClosed2, Decl(tsxEmit1.tsx, 17, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed2 : Symbol(openClosed2, Decl(file.tsx, 17, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed3 =
{p}
; ->openClosed3 : Symbol(openClosed3, Decl(tsxEmit1.tsx, 18, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed3 : Symbol(openClosed3, Decl(file.tsx, 18, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed4 =
{p < p}
; ->openClosed4 : Symbol(openClosed4, Decl(tsxEmit1.tsx, 19, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed4 : Symbol(openClosed4, Decl(file.tsx, 19, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed5 =
{p > p}
; ->openClosed5 : Symbol(openClosed5, Decl(tsxEmit1.tsx, 20, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed5 : Symbol(openClosed5, Decl(file.tsx, 20, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) class SomeClass { ->SomeClass : Symbol(SomeClass, Decl(tsxEmit1.tsx, 20, 43)) +>SomeClass : Symbol(SomeClass, Decl(file.tsx, 20, 43)) f() { ->f : Symbol(f, Decl(tsxEmit1.tsx, 22, 17)) +>f : Symbol(f, Decl(file.tsx, 22, 17)) var rewrites1 =
{() => this}
; ->rewrites1 : Symbol(rewrites1, Decl(tsxEmit1.tsx, 24, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->this : Symbol(SomeClass, Decl(tsxEmit1.tsx, 20, 43)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites1 : Symbol(rewrites1, Decl(file.tsx, 24, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>this : Symbol(SomeClass, Decl(file.tsx, 20, 43)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites2 =
{[p, ...p, p]}
; ->rewrites2 : Symbol(rewrites2, Decl(tsxEmit1.tsx, 25, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites2 : Symbol(rewrites2, Decl(file.tsx, 25, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites3 =
{{p}}
; ->rewrites3 : Symbol(rewrites3, Decl(tsxEmit1.tsx, 26, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 26, 25)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites3 : Symbol(rewrites3, Decl(file.tsx, 26, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 26, 25)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites4 =
this}>
; ->rewrites4 : Symbol(rewrites4, Decl(tsxEmit1.tsx, 28, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites4 : Symbol(rewrites4, Decl(file.tsx, 28, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->this : Symbol(SomeClass, Decl(tsxEmit1.tsx, 20, 43)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>this : Symbol(SomeClass, Decl(file.tsx, 20, 43)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites5 =
; ->rewrites5 : Symbol(rewrites5, Decl(tsxEmit1.tsx, 29, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites5 : Symbol(rewrites5, Decl(file.tsx, 29, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites6 =
; ->rewrites6 : Symbol(rewrites6, Decl(tsxEmit1.tsx, 30, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites6 : Symbol(rewrites6, Decl(file.tsx, 30, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 30, 27)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 30, 27)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) } } var whitespace1 =
; ->whitespace1 : Symbol(whitespace1, Decl(tsxEmit1.tsx, 34, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>whitespace1 : Symbol(whitespace1, Decl(file.tsx, 34, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var whitespace2 =
{p}
; ->whitespace2 : Symbol(whitespace2, Decl(tsxEmit1.tsx, 35, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>whitespace2 : Symbol(whitespace2, Decl(file.tsx, 35, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var whitespace3 =
->whitespace3 : Symbol(whitespace3, Decl(tsxEmit1.tsx, 36, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>whitespace3 : Symbol(whitespace3, Decl(file.tsx, 36, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) {p} ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxEmit1.types b/tests/baselines/reference/tsxEmit1.types index a427270354e..64ad0420baf 100644 --- a/tests/baselines/reference/tsxEmit1.types +++ b/tests/baselines/reference/tsxEmit1.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxEmit1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxEmit2.js b/tests/baselines/reference/tsxEmit2.js index 1101df49a1c..66b1494e825 100644 --- a/tests/baselines/reference/tsxEmit2.js +++ b/tests/baselines/reference/tsxEmit2.js @@ -1,4 +1,4 @@ -//// [tsxEmit2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -14,7 +14,7 @@ var spreads4 =
{p2}
; var spreads5 =
{p2}
; -//// [tsxEmit2.jsx] +//// [file.jsx] var p1, p2, p3; var spreads1 =
{p2}
; var spreads2 =
{p2}
; diff --git a/tests/baselines/reference/tsxEmit2.symbols b/tests/baselines/reference/tsxEmit2.symbols index 5eefc31710d..5e070bc83a9 100644 --- a/tests/baselines/reference/tsxEmit2.symbols +++ b/tests/baselines/reference/tsxEmit2.symbols @@ -1,58 +1,58 @@ -=== tests/cases/conformance/jsx/tsxEmit2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxEmit2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxEmit2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxEmit2.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } var p1, p2, p3; ->p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11)) +>p1 : Symbol(p1, Decl(file.tsx, 7, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>p3 : Symbol(p3, Decl(file.tsx, 7, 11)) var spreads1 =
{p2}
; ->spreads1 : Symbol(spreads1, Decl(tsxEmit2.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads1 : Symbol(spreads1, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads2 =
{p2}
; ->spreads2 : Symbol(spreads2, Decl(tsxEmit2.tsx, 9, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads2 : Symbol(spreads2, Decl(file.tsx, 9, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads3 =
{p2}
; ->spreads3 : Symbol(spreads3, Decl(tsxEmit2.tsx, 10, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads3 : Symbol(spreads3, Decl(file.tsx, 10, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 7, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads4 =
{p2}
; ->spreads4 : Symbol(spreads4, Decl(tsxEmit2.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads4 : Symbol(spreads4, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 7, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads5 =
{p2}
; ->spreads5 : Symbol(spreads5, Decl(tsxEmit2.tsx, 12, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads5 : Symbol(spreads5, Decl(file.tsx, 12, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) >y : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 7, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxEmit2.types b/tests/baselines/reference/tsxEmit2.types index f5633b739e3..5b267d8b802 100644 --- a/tests/baselines/reference/tsxEmit2.types +++ b/tests/baselines/reference/tsxEmit2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxEmit2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxEmit3.js b/tests/baselines/reference/tsxEmit3.js index aa958a0c79b..ccb9041e931 100644 --- a/tests/baselines/reference/tsxEmit3.js +++ b/tests/baselines/reference/tsxEmit3.js @@ -1,4 +1,4 @@ -//// [tsxEmit3.tsx] +//// [file.tsx] declare module JSX { interface Element { } @@ -41,7 +41,7 @@ module M { } -//// [tsxEmit3.jsx] +//// [file.jsx] var M; (function (M) { var Foo = (function () { @@ -83,4 +83,4 @@ var M; // Emit M_1.Foo M_1.Foo, ; })(M || (M = {})); -//# sourceMappingURL=tsxEmit3.jsx.map \ No newline at end of file +//# sourceMappingURL=file.jsx.map \ No newline at end of file diff --git a/tests/baselines/reference/tsxEmit3.js.map b/tests/baselines/reference/tsxEmit3.js.map index 1f1ba0926a0..b53526b5d11 100644 --- a/tests/baselines/reference/tsxEmit3.js.map +++ b/tests/baselines/reference/tsxEmit3.js.map @@ -1,2 +1,2 @@ -//// [tsxEmit3.jsx.map] -{"version":3,"file":"tsxEmit3.jsx","sourceRoot":"","sources":["tsxEmit3.tsx"],"names":["M","M.Foo","M.Foo.constructor","M.S","M.S.Bar","M.S.Bar.constructor"],"mappings":"AAMA,IAAO,CAAC,CAQP;AARD,WAAO,CAAC,EAAC,CAAC;IACTA;QAAmBC;QAAgBC,CAACA;QAACD,UAACA;IAADA,CAACA,AAAtCD,IAAsCA;IAAzBA,KAAGA,MAAsBA,CAAAA;IACtCA,IAAcA,CAACA,CAKdA;IALDA,WAAcA,CAACA,EAACA,CAACA;QAChBG;YAAAC;YAAmBC,CAACA;YAADD,UAACA;QAADA,CAACA,AAApBD,IAAoBA;QAAPA,KAAGA,MAAIA,CAAAA;IAIrBA,CAACA,EALaH,CAACA,GAADA,GAACA,KAADA,GAACA,QAKdA;AACFA,CAACA,EARM,CAAC,KAAD,CAAC,QAQP;AAED,IAAO,CAAC,CAYP;AAZD,WAAO,CAAC,EAAC,CAAC;IACTA,aAAaA;IACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;IAEbA,IAAcA,CAACA,CAMdA;IANDA,WAAcA,CAACA,EAACA,CAACA;QAChBG,aAAaA;QACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;QAEbA,aAAaA;QACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;IACdA,CAACA,EANaH,CAACA,GAADA,GAACA,KAADA,GAACA,QAMdA;AAEFA,CAACA,EAZM,CAAC,KAAD,CAAC,QAYP;AAED,IAAO,CAAC,CAGP;AAHD,WAAO,CAAC,EAAC,CAAC;IACTA,eAAeA;IACfA,GAACA,CAACA,GAAGA,EAAEA,CAACA,GAACA,CAACA,GAAGA,GAAGA,CAACA;AAClBA,CAACA,EAHM,CAAC,KAAD,CAAC,QAGP;AAED,IAAO,CAAC,CAIP;AAJD,WAAO,GAAC,EAAC,CAAC;IACTA,IAAIA,CAACA,GAAGA,GAAGA,CAACA;IACZA,eAAeA;IACfA,OAAGA,EAAEA,CAACA,OAAGA,GAAGA,CAACA;AACdA,CAACA,EAJM,CAAC,KAAD,CAAC,QAIP"} \ No newline at end of file +//// [file.jsx.map] +{"version":3,"file":"file.jsx","sourceRoot":"","sources":["file.tsx"],"names":["M","M.Foo","M.Foo.constructor","M.S","M.S.Bar","M.S.Bar.constructor"],"mappings":"AAMA,IAAO,CAAC,CAQP;AARD,WAAO,CAAC,EAAC,CAAC;IACTA;QAAmBC;QAAgBC,CAACA;QAACD,UAACA;IAADA,CAACA,AAAtCD,IAAsCA;IAAzBA,KAAGA,MAAsBA,CAAAA;IACtCA,IAAcA,CAACA,CAKdA;IALDA,WAAcA,CAACA,EAACA,CAACA;QAChBG;YAAAC;YAAmBC,CAACA;YAADD,UAACA;QAADA,CAACA,AAApBD,IAAoBA;QAAPA,KAAGA,MAAIA,CAAAA;IAIrBA,CAACA,EALaH,CAACA,GAADA,GAACA,KAADA,GAACA,QAKdA;AACFA,CAACA,EARM,CAAC,KAAD,CAAC,QAQP;AAED,IAAO,CAAC,CAYP;AAZD,WAAO,CAAC,EAAC,CAAC;IACTA,aAAaA;IACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;IAEbA,IAAcA,CAACA,CAMdA;IANDA,WAAcA,CAACA,EAACA,CAACA;QAChBG,aAAaA;QACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;QAEbA,aAAaA;QACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;IACdA,CAACA,EANaH,CAACA,GAADA,GAACA,KAADA,GAACA,QAMdA;AAEFA,CAACA,EAZM,CAAC,KAAD,CAAC,QAYP;AAED,IAAO,CAAC,CAGP;AAHD,WAAO,CAAC,EAAC,CAAC;IACTA,eAAeA;IACfA,GAACA,CAACA,GAAGA,EAAEA,CAACA,GAACA,CAACA,GAAGA,GAAGA,CAACA;AAClBA,CAACA,EAHM,CAAC,KAAD,CAAC,QAGP;AAED,IAAO,CAAC,CAIP;AAJD,WAAO,GAAC,EAAC,CAAC;IACTA,IAAIA,CAACA,GAAGA,GAAGA,CAACA;IACZA,eAAeA;IACfA,OAAGA,EAAEA,CAACA,OAAGA,GAAGA,CAACA;AACdA,CAACA,EAJM,CAAC,KAAD,CAAC,QAIP"} \ No newline at end of file diff --git a/tests/baselines/reference/tsxEmit3.sourcemap.txt b/tests/baselines/reference/tsxEmit3.sourcemap.txt index 514be1e532d..770221ebcb5 100644 --- a/tests/baselines/reference/tsxEmit3.sourcemap.txt +++ b/tests/baselines/reference/tsxEmit3.sourcemap.txt @@ -1,12 +1,12 @@ =================================================================== -JsFile: tsxEmit3.jsx -mapUrl: tsxEmit3.jsx.map +JsFile: file.jsx +mapUrl: file.jsx.map sourceRoot: -sources: tsxEmit3.tsx +sources: file.tsx =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/jsx/tsxEmit3.jsx -sourceFile:tsxEmit3.tsx +emittedFile:tests/cases/conformance/jsx/file.jsx +sourceFile:file.tsx ------------------------------------------------------------------- >>>var M; 1 > @@ -761,7 +761,7 @@ sourceFile:tsxEmit3.tsx 5 > ^^^^^ 6 > ^ 7 > ^^^^^^^^ -8 > ^^^^^^^^^^^^^^^^^^-> +8 > ^^^^^^^^^^^^^^-> 1 > > 2 >} @@ -782,4 +782,4 @@ sourceFile:tsxEmit3.tsx 6 >Emitted(41, 11) Source(36, 9) + SourceIndex(0) 7 >Emitted(41, 19) Source(40, 2) + SourceIndex(0) --- ->>>//# sourceMappingURL=tsxEmit3.jsx.map \ No newline at end of file +>>>//# sourceMappingURL=file.jsx.map \ No newline at end of file diff --git a/tests/baselines/reference/tsxEmit3.symbols b/tests/baselines/reference/tsxEmit3.symbols index 64542d125b9..3b88d4e0371 100644 --- a/tests/baselines/reference/tsxEmit3.symbols +++ b/tests/baselines/reference/tsxEmit3.symbols @@ -1,26 +1,26 @@ -=== tests/cases/conformance/jsx/tsxEmit3.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxEmit3.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxEmit3.tsx, 1, 20)) +>Element : Symbol(Element, Decl(file.tsx, 1, 20)) interface IntrinsicElements { } ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxEmit3.tsx, 2, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 2, 22)) } module M { ->M : Symbol(M, Decl(tsxEmit3.tsx, 4, 1), Decl(tsxEmit3.tsx, 14, 1), Decl(tsxEmit3.tsx, 28, 1), Decl(tsxEmit3.tsx, 33, 1)) +>M : Symbol(M, Decl(file.tsx, 4, 1), Decl(file.tsx, 14, 1), Decl(file.tsx, 28, 1), Decl(file.tsx, 33, 1)) export class Foo { constructor() { } } ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) export module S { ->S : Symbol(S, Decl(tsxEmit3.tsx, 7, 39), Decl(tsxEmit3.tsx, 18, 14)) +>S : Symbol(S, Decl(file.tsx, 7, 39), Decl(file.tsx, 18, 14)) export class Bar { } ->Bar : Symbol(Bar, Decl(tsxEmit3.tsx, 8, 18)) +>Bar : Symbol(Bar, Decl(file.tsx, 8, 18)) // Emit Foo // Foo, ; @@ -28,49 +28,49 @@ module M { } module M { ->M : Symbol(M, Decl(tsxEmit3.tsx, 4, 1), Decl(tsxEmit3.tsx, 14, 1), Decl(tsxEmit3.tsx, 28, 1), Decl(tsxEmit3.tsx, 33, 1)) +>M : Symbol(M, Decl(file.tsx, 4, 1), Decl(file.tsx, 14, 1), Decl(file.tsx, 28, 1), Decl(file.tsx, 33, 1)) // Emit M.Foo Foo, ; ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) export module S { ->S : Symbol(S, Decl(tsxEmit3.tsx, 7, 39), Decl(tsxEmit3.tsx, 18, 14)) +>S : Symbol(S, Decl(file.tsx, 7, 39), Decl(file.tsx, 18, 14)) // Emit M.Foo Foo, ; ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) // Emit S.Bar Bar, ; ->Bar : Symbol(Bar, Decl(tsxEmit3.tsx, 8, 18)) ->Bar : Symbol(Bar, Decl(tsxEmit3.tsx, 8, 18)) +>Bar : Symbol(Bar, Decl(file.tsx, 8, 18)) +>Bar : Symbol(Bar, Decl(file.tsx, 8, 18)) } } module M { ->M : Symbol(M, Decl(tsxEmit3.tsx, 4, 1), Decl(tsxEmit3.tsx, 14, 1), Decl(tsxEmit3.tsx, 28, 1), Decl(tsxEmit3.tsx, 33, 1)) +>M : Symbol(M, Decl(file.tsx, 4, 1), Decl(file.tsx, 14, 1), Decl(file.tsx, 28, 1), Decl(file.tsx, 33, 1)) // Emit M.S.Bar S.Bar, ; ->S.Bar : Symbol(S.Bar, Decl(tsxEmit3.tsx, 8, 18)) ->S : Symbol(S, Decl(tsxEmit3.tsx, 7, 39), Decl(tsxEmit3.tsx, 18, 14)) ->Bar : Symbol(S.Bar, Decl(tsxEmit3.tsx, 8, 18)) ->Bar : Symbol(S.Bar, Decl(tsxEmit3.tsx, 8, 18)) +>S.Bar : Symbol(S.Bar, Decl(file.tsx, 8, 18)) +>S : Symbol(S, Decl(file.tsx, 7, 39), Decl(file.tsx, 18, 14)) +>Bar : Symbol(S.Bar, Decl(file.tsx, 8, 18)) +>Bar : Symbol(S.Bar, Decl(file.tsx, 8, 18)) } module M { ->M : Symbol(M, Decl(tsxEmit3.tsx, 4, 1), Decl(tsxEmit3.tsx, 14, 1), Decl(tsxEmit3.tsx, 28, 1), Decl(tsxEmit3.tsx, 33, 1)) +>M : Symbol(M, Decl(file.tsx, 4, 1), Decl(file.tsx, 14, 1), Decl(file.tsx, 28, 1), Decl(file.tsx, 33, 1)) var M = 100; ->M : Symbol(M, Decl(tsxEmit3.tsx, 36, 4)) +>M : Symbol(M, Decl(file.tsx, 36, 4)) // Emit M_1.Foo Foo, ; ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) } diff --git a/tests/baselines/reference/tsxEmit3.types b/tests/baselines/reference/tsxEmit3.types index f4db9a3f36f..49a5cf8a51b 100644 --- a/tests/baselines/reference/tsxEmit3.types +++ b/tests/baselines/reference/tsxEmit3.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxEmit3.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxErrorRecovery1.errors.txt b/tests/baselines/reference/tsxErrorRecovery1.errors.txt index 7aea986526b..0937b0d37ac 100644 --- a/tests/baselines/reference/tsxErrorRecovery1.errors.txt +++ b/tests/baselines/reference/tsxErrorRecovery1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/jsx/tsxErrorRecovery1.tsx(5,19): error TS1109: Expression expected. -tests/cases/conformance/jsx/tsxErrorRecovery1.tsx(8,11): error TS2304: Cannot find name 'a'. -tests/cases/conformance/jsx/tsxErrorRecovery1.tsx(8,12): error TS1005: '}' expected. -tests/cases/conformance/jsx/tsxErrorRecovery1.tsx(9,1): error TS17002: Expected corresponding JSX closing tag for 'div'. +tests/cases/conformance/jsx/file.tsx(5,19): error TS1109: Expression expected. +tests/cases/conformance/jsx/file.tsx(8,11): error TS2304: Cannot find name 'a'. +tests/cases/conformance/jsx/file.tsx(8,12): error TS1005: '}' expected. +tests/cases/conformance/jsx/file.tsx(9,1): error TS17002: Expected corresponding JSX closing tag for 'div'. -==== tests/cases/conformance/jsx/tsxErrorRecovery1.tsx (4 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== declare namespace JSX { interface Element { } } diff --git a/tests/baselines/reference/tsxErrorRecovery1.js b/tests/baselines/reference/tsxErrorRecovery1.js index 62db6b0f012..6b9d2d5de47 100644 --- a/tests/baselines/reference/tsxErrorRecovery1.js +++ b/tests/baselines/reference/tsxErrorRecovery1.js @@ -1,4 +1,4 @@ -//// [tsxErrorRecovery1.tsx] +//// [file.tsx] declare namespace JSX { interface Element { } } @@ -9,7 +9,7 @@ function foo() { var y = { a: 1 }; -//// [tsxErrorRecovery1.jsx] +//// [file.jsx] function foo() { var x =
{}div> } diff --git a/tests/baselines/reference/tsxGenericArrowFunctionParsing.js b/tests/baselines/reference/tsxGenericArrowFunctionParsing.js index f493347ca9c..3478923f9ee 100644 --- a/tests/baselines/reference/tsxGenericArrowFunctionParsing.js +++ b/tests/baselines/reference/tsxGenericArrowFunctionParsing.js @@ -1,4 +1,4 @@ -//// [tsxGenericArrowFunctionParsing.tsx] +//// [file.tsx] declare module JSX { interface Element { isElement; } } @@ -27,7 +27,7 @@ x5.isElement; -//// [tsxGenericArrowFunctionParsing.jsx] +//// [file.jsx] var T, T1, T2; // This is an element var x1 = () => ; diff --git a/tests/baselines/reference/tsxGenericArrowFunctionParsing.symbols b/tests/baselines/reference/tsxGenericArrowFunctionParsing.symbols index 3bfd5505e76..85dec56b2f8 100644 --- a/tests/baselines/reference/tsxGenericArrowFunctionParsing.symbols +++ b/tests/baselines/reference/tsxGenericArrowFunctionParsing.symbols @@ -1,67 +1,67 @@ -=== tests/cases/conformance/jsx/tsxGenericArrowFunctionParsing.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxGenericArrowFunctionParsing.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { isElement; } ->Element : Symbol(Element, Decl(tsxGenericArrowFunctionParsing.tsx, 0, 20)) ->isElement : Symbol(isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) +>isElement : Symbol(isElement, Decl(file.tsx, 1, 20)) } var T, T1, T2; ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) ->T1 : Symbol(T1, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 6)) ->T2 : Symbol(T2, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 10)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) +>T1 : Symbol(T1, Decl(file.tsx, 4, 6)) +>T2 : Symbol(T2, Decl(file.tsx, 4, 10)) // This is an element var x1 = () => {}; ->x1 : Symbol(x1, Decl(tsxGenericArrowFunctionParsing.tsx, 7, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>x1 : Symbol(x1, Decl(file.tsx, 7, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) x1.isElement; ->x1.isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) ->x1 : Symbol(x1, Decl(tsxGenericArrowFunctionParsing.tsx, 7, 3)) ->isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) +>x1.isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) +>x1 : Symbol(x1, Decl(file.tsx, 7, 3)) +>isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) // This is a generic function var x2 = () => {}; ->x2 : Symbol(x2, Decl(tsxGenericArrowFunctionParsing.tsx, 11, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 11, 10)) +>x2 : Symbol(x2, Decl(file.tsx, 11, 3)) +>T : Symbol(T, Decl(file.tsx, 11, 10)) x2(); ->x2 : Symbol(x2, Decl(tsxGenericArrowFunctionParsing.tsx, 11, 3)) +>x2 : Symbol(x2, Decl(file.tsx, 11, 3)) // This is a generic function var x3 = () => {}; ->x3 : Symbol(x3, Decl(tsxGenericArrowFunctionParsing.tsx, 15, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 15, 10)) ->T1 : Symbol(T1, Decl(tsxGenericArrowFunctionParsing.tsx, 15, 12)) +>x3 : Symbol(x3, Decl(file.tsx, 15, 3)) +>T : Symbol(T, Decl(file.tsx, 15, 10)) +>T1 : Symbol(T1, Decl(file.tsx, 15, 12)) x3(); ->x3 : Symbol(x3, Decl(tsxGenericArrowFunctionParsing.tsx, 15, 3)) +>x3 : Symbol(x3, Decl(file.tsx, 15, 3)) // This is an element var x4 = () => {}; ->x4 : Symbol(x4, Decl(tsxGenericArrowFunctionParsing.tsx, 19, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>x4 : Symbol(x4, Decl(file.tsx, 19, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) >extends : Symbol(unknown) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) x4.isElement; ->x4.isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) ->x4 : Symbol(x4, Decl(tsxGenericArrowFunctionParsing.tsx, 19, 3)) ->isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) +>x4.isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) +>x4 : Symbol(x4, Decl(file.tsx, 19, 3)) +>isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) // This is an element var x5 = () => {}; ->x5 : Symbol(x5, Decl(tsxGenericArrowFunctionParsing.tsx, 23, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>x5 : Symbol(x5, Decl(file.tsx, 23, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) >extends : Symbol(unknown) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) x5.isElement; ->x5.isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) ->x5 : Symbol(x5, Decl(tsxGenericArrowFunctionParsing.tsx, 23, 3)) ->isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) +>x5.isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) +>x5 : Symbol(x5, Decl(file.tsx, 23, 3)) +>isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) diff --git a/tests/baselines/reference/tsxGenericArrowFunctionParsing.types b/tests/baselines/reference/tsxGenericArrowFunctionParsing.types index a7d98d35b64..d5a9436872a 100644 --- a/tests/baselines/reference/tsxGenericArrowFunctionParsing.types +++ b/tests/baselines/reference/tsxGenericArrowFunctionParsing.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxGenericArrowFunctionParsing.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxOpeningClosingNames.js b/tests/baselines/reference/tsxOpeningClosingNames.js index 80adad0f406..d704d43b5ba 100644 --- a/tests/baselines/reference/tsxOpeningClosingNames.js +++ b/tests/baselines/reference/tsxOpeningClosingNames.js @@ -1,4 +1,4 @@ -//// [tsxOpeningClosingNames.tsx] +//// [file.tsx] declare module JSX { interface Element { } } @@ -10,5 +10,5 @@ declare module A.B.C { foo -//// [tsxOpeningClosingNames.jsx] +//// [file.jsx] foo; diff --git a/tests/baselines/reference/tsxOpeningClosingNames.symbols b/tests/baselines/reference/tsxOpeningClosingNames.symbols index e9734fb5ee1..08da0bf05fb 100644 --- a/tests/baselines/reference/tsxOpeningClosingNames.symbols +++ b/tests/baselines/reference/tsxOpeningClosingNames.symbols @@ -1,18 +1,18 @@ -=== tests/cases/conformance/jsx/tsxOpeningClosingNames.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxOpeningClosingNames.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxOpeningClosingNames.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) } declare module A.B.C { ->A : Symbol(A, Decl(tsxOpeningClosingNames.tsx, 2, 1)) ->B : Symbol(B, Decl(tsxOpeningClosingNames.tsx, 4, 17)) ->C : Symbol(C, Decl(tsxOpeningClosingNames.tsx, 4, 19)) +>A : Symbol(A, Decl(file.tsx, 2, 1)) +>B : Symbol(B, Decl(file.tsx, 4, 17)) +>C : Symbol(C, Decl(file.tsx, 4, 19)) var D: any; ->D : Symbol(D, Decl(tsxOpeningClosingNames.tsx, 5, 5)) +>D : Symbol(D, Decl(file.tsx, 5, 5)) } foo diff --git a/tests/baselines/reference/tsxOpeningClosingNames.types b/tests/baselines/reference/tsxOpeningClosingNames.types index b02564ae104..ac36205029e 100644 --- a/tests/baselines/reference/tsxOpeningClosingNames.types +++ b/tests/baselines/reference/tsxOpeningClosingNames.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxOpeningClosingNames.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxParseTests1.js b/tests/baselines/reference/tsxParseTests1.js index 7ab98cab314..c427a49cb0c 100644 --- a/tests/baselines/reference/tsxParseTests1.js +++ b/tests/baselines/reference/tsxParseTests1.js @@ -1,4 +1,4 @@ -//// [tsxParseTests1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { div; span; } @@ -7,5 +7,5 @@ declare module JSX { var x =
; -//// [tsxParseTests1.jsx] +//// [file.jsx] var x =
; diff --git a/tests/baselines/reference/tsxParseTests1.symbols b/tests/baselines/reference/tsxParseTests1.symbols index f7b179f254f..0ee595a9a3d 100644 --- a/tests/baselines/reference/tsxParseTests1.symbols +++ b/tests/baselines/reference/tsxParseTests1.symbols @@ -1,24 +1,24 @@ -=== tests/cases/conformance/jsx/tsxParseTests1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxParseTests1.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxParseTests1.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { div; span; } ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxParseTests1.tsx, 1, 22)) ->div : Symbol(div, Decl(tsxParseTests1.tsx, 2, 30)) ->span : Symbol(span, Decl(tsxParseTests1.tsx, 2, 35)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(div, Decl(file.tsx, 2, 30)) +>span : Symbol(span, Decl(file.tsx, 2, 35)) } var x =
; ->x : Symbol(x, Decl(tsxParseTests1.tsx, 5, 3)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->span : Symbol(JSX.IntrinsicElements.span, Decl(tsxParseTests1.tsx, 2, 35)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->span : Symbol(JSX.IntrinsicElements.span, Decl(tsxParseTests1.tsx, 2, 35)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) +>x : Symbol(x, Decl(file.tsx, 5, 3)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>span : Symbol(JSX.IntrinsicElements.span, Decl(file.tsx, 2, 35)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>span : Symbol(JSX.IntrinsicElements.span, Decl(file.tsx, 2, 35)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) diff --git a/tests/baselines/reference/tsxParseTests1.types b/tests/baselines/reference/tsxParseTests1.types index 78e49a227e2..375791fe4bb 100644 --- a/tests/baselines/reference/tsxParseTests1.types +++ b/tests/baselines/reference/tsxParseTests1.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxParseTests1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmit1.js b/tests/baselines/reference/tsxReactEmit1.js index 260bd9cd228..5b13c463bd6 100644 --- a/tests/baselines/reference/tsxReactEmit1.js +++ b/tests/baselines/reference/tsxReactEmit1.js @@ -1,4 +1,4 @@ -//// [tsxReactEmit1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -41,7 +41,7 @@ var whitespace3 =
; -//// [tsxReactEmit1.js] +//// [file.js] var p; var selfClosed1 = React.createElement("div", null); var selfClosed2 = React.createElement("div", {x: "1"}); diff --git a/tests/baselines/reference/tsxReactEmit1.symbols b/tests/baselines/reference/tsxReactEmit1.symbols index 4149142dd82..640f666c0d8 100644 --- a/tests/baselines/reference/tsxReactEmit1.symbols +++ b/tests/baselines/reference/tsxReactEmit1.symbols @@ -1,167 +1,167 @@ -=== tests/cases/conformance/jsx/tsxReactEmit1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmit1.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmit1.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmit1.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmit1.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11)) var p; ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) var selfClosed1 =
; ->selfClosed1 : Symbol(selfClosed1, Decl(tsxReactEmit1.tsx, 9, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed1 : Symbol(selfClosed1, Decl(file.tsx, 9, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var selfClosed2 =
; ->selfClosed2 : Symbol(selfClosed2, Decl(tsxReactEmit1.tsx, 10, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed2 : Symbol(selfClosed2, Decl(file.tsx, 10, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) var selfClosed3 =
; ->selfClosed3 : Symbol(selfClosed3, Decl(tsxReactEmit1.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed3 : Symbol(selfClosed3, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) var selfClosed4 =
; ->selfClosed4 : Symbol(selfClosed4, Decl(tsxReactEmit1.tsx, 12, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed4 : Symbol(selfClosed4, Decl(file.tsx, 12, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed5 =
; ->selfClosed5 : Symbol(selfClosed5, Decl(tsxReactEmit1.tsx, 13, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed5 : Symbol(selfClosed5, Decl(file.tsx, 13, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed6 =
; ->selfClosed6 : Symbol(selfClosed6, Decl(tsxReactEmit1.tsx, 14, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed6 : Symbol(selfClosed6, Decl(file.tsx, 14, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed7 =
; ->selfClosed7 : Symbol(selfClosed7, Decl(tsxReactEmit1.tsx, 15, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed7 : Symbol(selfClosed7, Decl(file.tsx, 15, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) >y : Symbol(unknown) >b : Symbol(unknown) var openClosed1 =
; ->openClosed1 : Symbol(openClosed1, Decl(tsxReactEmit1.tsx, 17, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed1 : Symbol(openClosed1, Decl(file.tsx, 17, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed2 =
foo
; ->openClosed2 : Symbol(openClosed2, Decl(tsxReactEmit1.tsx, 18, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed2 : Symbol(openClosed2, Decl(file.tsx, 18, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed3 =
{p}
; ->openClosed3 : Symbol(openClosed3, Decl(tsxReactEmit1.tsx, 19, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed3 : Symbol(openClosed3, Decl(file.tsx, 19, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed4 =
{p < p}
; ->openClosed4 : Symbol(openClosed4, Decl(tsxReactEmit1.tsx, 20, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed4 : Symbol(openClosed4, Decl(file.tsx, 20, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed5 =
{p > p}
; ->openClosed5 : Symbol(openClosed5, Decl(tsxReactEmit1.tsx, 21, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed5 : Symbol(openClosed5, Decl(file.tsx, 21, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) >b : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) class SomeClass { ->SomeClass : Symbol(SomeClass, Decl(tsxReactEmit1.tsx, 21, 45)) +>SomeClass : Symbol(SomeClass, Decl(file.tsx, 21, 45)) f() { ->f : Symbol(f, Decl(tsxReactEmit1.tsx, 23, 17)) +>f : Symbol(f, Decl(file.tsx, 23, 17)) var rewrites1 =
{() => this}
; ->rewrites1 : Symbol(rewrites1, Decl(tsxReactEmit1.tsx, 25, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->this : Symbol(SomeClass, Decl(tsxReactEmit1.tsx, 21, 45)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites1 : Symbol(rewrites1, Decl(file.tsx, 25, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>this : Symbol(SomeClass, Decl(file.tsx, 21, 45)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites2 =
{[p, ...p, p]}
; ->rewrites2 : Symbol(rewrites2, Decl(tsxReactEmit1.tsx, 26, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites2 : Symbol(rewrites2, Decl(file.tsx, 26, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites3 =
{{p}}
; ->rewrites3 : Symbol(rewrites3, Decl(tsxReactEmit1.tsx, 27, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 27, 25)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites3 : Symbol(rewrites3, Decl(file.tsx, 27, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 27, 25)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites4 =
this}>
; ->rewrites4 : Symbol(rewrites4, Decl(tsxReactEmit1.tsx, 29, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites4 : Symbol(rewrites4, Decl(file.tsx, 29, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->this : Symbol(SomeClass, Decl(tsxReactEmit1.tsx, 21, 45)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>this : Symbol(SomeClass, Decl(file.tsx, 21, 45)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites5 =
; ->rewrites5 : Symbol(rewrites5, Decl(tsxReactEmit1.tsx, 30, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites5 : Symbol(rewrites5, Decl(file.tsx, 30, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites6 =
; ->rewrites6 : Symbol(rewrites6, Decl(tsxReactEmit1.tsx, 31, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites6 : Symbol(rewrites6, Decl(file.tsx, 31, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 31, 27)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 31, 27)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) } } var whitespace1 =
; ->whitespace1 : Symbol(whitespace1, Decl(tsxReactEmit1.tsx, 35, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>whitespace1 : Symbol(whitespace1, Decl(file.tsx, 35, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var whitespace2 =
{p}
; ->whitespace2 : Symbol(whitespace2, Decl(tsxReactEmit1.tsx, 36, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>whitespace2 : Symbol(whitespace2, Decl(file.tsx, 36, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var whitespace3 =
->whitespace3 : Symbol(whitespace3, Decl(tsxReactEmit1.tsx, 37, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>whitespace3 : Symbol(whitespace3, Decl(file.tsx, 37, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) {p} ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmit1.types b/tests/baselines/reference/tsxReactEmit1.types index e180d2b6b70..9173fde2ccc 100644 --- a/tests/baselines/reference/tsxReactEmit1.types +++ b/tests/baselines/reference/tsxReactEmit1.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmit1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmit2.js b/tests/baselines/reference/tsxReactEmit2.js index 4b2b4695561..fd7fff16976 100644 --- a/tests/baselines/reference/tsxReactEmit2.js +++ b/tests/baselines/reference/tsxReactEmit2.js @@ -1,4 +1,4 @@ -//// [tsxReactEmit2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -15,7 +15,7 @@ var spreads4 =
{p2}
; var spreads5 =
{p2}
; -//// [tsxReactEmit2.js] +//// [file.js] var p1, p2, p3; var spreads1 = React.createElement("div", React.__spread({}, p1), p2); var spreads2 = React.createElement("div", React.__spread({}, p1), p2); diff --git a/tests/baselines/reference/tsxReactEmit2.symbols b/tests/baselines/reference/tsxReactEmit2.symbols index 049fdb1819b..6262b94aa41 100644 --- a/tests/baselines/reference/tsxReactEmit2.symbols +++ b/tests/baselines/reference/tsxReactEmit2.symbols @@ -1,60 +1,60 @@ -=== tests/cases/conformance/jsx/tsxReactEmit2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmit2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmit2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmit2.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmit2.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11)) var p1, p2, p3; ->p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11)) +>p1 : Symbol(p1, Decl(file.tsx, 8, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>p3 : Symbol(p3, Decl(file.tsx, 8, 11)) var spreads1 =
{p2}
; ->spreads1 : Symbol(spreads1, Decl(tsxReactEmit2.tsx, 9, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads1 : Symbol(spreads1, Decl(file.tsx, 9, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads2 =
{p2}
; ->spreads2 : Symbol(spreads2, Decl(tsxReactEmit2.tsx, 10, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads2 : Symbol(spreads2, Decl(file.tsx, 10, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads3 =
{p2}
; ->spreads3 : Symbol(spreads3, Decl(tsxReactEmit2.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads3 : Symbol(spreads3, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 8, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads4 =
{p2}
; ->spreads4 : Symbol(spreads4, Decl(tsxReactEmit2.tsx, 12, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads4 : Symbol(spreads4, Decl(file.tsx, 12, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 8, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads5 =
{p2}
; ->spreads5 : Symbol(spreads5, Decl(tsxReactEmit2.tsx, 13, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads5 : Symbol(spreads5, Decl(file.tsx, 13, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) >y : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 8, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmit2.types b/tests/baselines/reference/tsxReactEmit2.types index e28910b62c7..928eeecadfa 100644 --- a/tests/baselines/reference/tsxReactEmit2.types +++ b/tests/baselines/reference/tsxReactEmit2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmit2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmit3.js b/tests/baselines/reference/tsxReactEmit3.js index 23910548534..bd42177e187 100644 --- a/tests/baselines/reference/tsxReactEmit3.js +++ b/tests/baselines/reference/tsxReactEmit3.js @@ -1,4 +1,4 @@ -//// [tsxReactEmit3.tsx] +//// [test.tsx] declare module JSX { interface Element { } } declare var React: any; @@ -7,5 +7,5 @@ declare var Foo, Bar, baz; q s ; -//// [tsxReactEmit3.js] +//// [test.js] React.createElement(Foo, null, " ", React.createElement(Bar, null, " q "), " ", React.createElement(Bar, null), " s ", React.createElement(Bar, null), React.createElement(Bar, null)); diff --git a/tests/baselines/reference/tsxReactEmit3.symbols b/tests/baselines/reference/tsxReactEmit3.symbols index 042488cf04c..cec45805c1e 100644 --- a/tests/baselines/reference/tsxReactEmit3.symbols +++ b/tests/baselines/reference/tsxReactEmit3.symbols @@ -1,23 +1,23 @@ -=== tests/cases/conformance/jsx/tsxReactEmit3.tsx === +=== tests/cases/conformance/jsx/test.tsx === declare module JSX { interface Element { } } ->JSX : Symbol(JSX, Decl(tsxReactEmit3.tsx, 0, 0)) ->Element : Symbol(Element, Decl(tsxReactEmit3.tsx, 1, 20)) +>JSX : Symbol(JSX, Decl(test.tsx, 0, 0)) +>Element : Symbol(Element, Decl(test.tsx, 1, 20)) declare var React: any; ->React : Symbol(React, Decl(tsxReactEmit3.tsx, 2, 11)) +>React : Symbol(React, Decl(test.tsx, 2, 11)) declare var Foo, Bar, baz; ->Foo : Symbol(Foo, Decl(tsxReactEmit3.tsx, 4, 11)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->baz : Symbol(baz, Decl(tsxReactEmit3.tsx, 4, 21)) +>Foo : Symbol(Foo, Decl(test.tsx, 4, 11)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>baz : Symbol(baz, Decl(test.tsx, 4, 21)) q s ; ->Foo : Symbol(Foo, Decl(tsxReactEmit3.tsx, 4, 11)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Foo : Symbol(Foo, Decl(tsxReactEmit3.tsx, 4, 11)) +>Foo : Symbol(Foo, Decl(test.tsx, 4, 11)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Foo : Symbol(Foo, Decl(test.tsx, 4, 11)) diff --git a/tests/baselines/reference/tsxReactEmit3.types b/tests/baselines/reference/tsxReactEmit3.types index 8babe724fa1..8416ec015b2 100644 --- a/tests/baselines/reference/tsxReactEmit3.types +++ b/tests/baselines/reference/tsxReactEmit3.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmit3.tsx === +=== tests/cases/conformance/jsx/test.tsx === declare module JSX { interface Element { } } >JSX : any diff --git a/tests/baselines/reference/tsxReactEmit4.errors.txt b/tests/baselines/reference/tsxReactEmit4.errors.txt index fca2b028237..23578d4ed91 100644 --- a/tests/baselines/reference/tsxReactEmit4.errors.txt +++ b/tests/baselines/reference/tsxReactEmit4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxReactEmit4.tsx(12,5): error TS2304: Cannot find name 'blah'. +tests/cases/conformance/jsx/file.tsx(12,5): error TS2304: Cannot find name 'blah'. -==== tests/cases/conformance/jsx/tsxReactEmit4.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxReactEmit4.js b/tests/baselines/reference/tsxReactEmit4.js index dcbfafcef2f..d61cea24d2c 100644 --- a/tests/baselines/reference/tsxReactEmit4.js +++ b/tests/baselines/reference/tsxReactEmit4.js @@ -1,4 +1,4 @@ -//// [tsxReactEmit4.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -17,7 +17,7 @@ var openClosed1 =
// Should emit React.__spread({}, p, {x: 0}) var spread1 =
; -//// [tsxReactEmit4.js] +//// [file.js] var p; var openClosed1 = React.createElement("div", null, blah); // Should emit React.__spread({}, p, {x: 0}) diff --git a/tests/baselines/reference/tsxReactEmitEntities.js b/tests/baselines/reference/tsxReactEmitEntities.js index 7517c85fc73..c1fba50fd8f 100644 --- a/tests/baselines/reference/tsxReactEmitEntities.js +++ b/tests/baselines/reference/tsxReactEmitEntities.js @@ -1,4 +1,4 @@ -//// [tsxReactEmitEntities.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -10,5 +10,5 @@ declare var React: any;
Dot goes here: · ¬AnEntity;
; -//// [tsxReactEmitEntities.js] +//// [file.js] React.createElement("div", null, "Dot goes here: · ¬AnEntity; "); diff --git a/tests/baselines/reference/tsxReactEmitEntities.symbols b/tests/baselines/reference/tsxReactEmitEntities.symbols index 7de35241a3a..b633f57ec13 100644 --- a/tests/baselines/reference/tsxReactEmitEntities.symbols +++ b/tests/baselines/reference/tsxReactEmitEntities.symbols @@ -1,21 +1,21 @@ -=== tests/cases/conformance/jsx/tsxReactEmitEntities.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmitEntities.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmitEntities.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmitEntities.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmitEntities.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11))
Dot goes here: · ¬AnEntity;
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmitEntities.types b/tests/baselines/reference/tsxReactEmitEntities.types index e1c9cb6e6bf..d6d6c285d79 100644 --- a/tests/baselines/reference/tsxReactEmitEntities.types +++ b/tests/baselines/reference/tsxReactEmitEntities.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmitEntities.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmitWhitespace.js b/tests/baselines/reference/tsxReactEmitWhitespace.js index a1b5894106f..9614cbf2f2c 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace.js +++ b/tests/baselines/reference/tsxReactEmitWhitespace.js @@ -1,4 +1,4 @@ -//// [tsxReactEmitWhitespace.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -52,7 +52,7 @@ var p = 0; -//// [tsxReactEmitWhitespace.js] +//// [file.js] // THIS FILE HAS TEST-SIGNIFICANT LEADING/TRAILING // WHITESPACE, DO NOT RUN 'FORMAT DOCUMENT' ON IT var p = 0; diff --git a/tests/baselines/reference/tsxReactEmitWhitespace.symbols b/tests/baselines/reference/tsxReactEmitWhitespace.symbols index 3aa3f0d0f8a..a0d8266faa0 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace.symbols +++ b/tests/baselines/reference/tsxReactEmitWhitespace.symbols @@ -1,93 +1,93 @@ -=== tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmitWhitespace.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmitWhitespace.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmitWhitespace.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmitWhitespace.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11)) // THIS FILE HAS TEST-SIGNIFICANT LEADING/TRAILING // WHITESPACE, DO NOT RUN 'FORMAT DOCUMENT' ON IT var p = 0; ->p : Symbol(p, Decl(tsxReactEmitWhitespace.tsx, 11, 3)) +>p : Symbol(p, Decl(file.tsx, 11, 3)) // Emit " "
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit " ", p, " "
{p}
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxReactEmitWhitespace.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit only p
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) {p} ->p : Symbol(p, Decl(tsxReactEmitWhitespace.tsx, 11, 3)) +>p : Symbol(p, Decl(file.tsx, 11, 3))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit only p
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) {p} ->p : Symbol(p, Decl(tsxReactEmitWhitespace.tsx, 11, 3)) +>p : Symbol(p, Decl(file.tsx, 11, 3))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit " 3"
3 ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit " 3 "
3
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit "3"
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) 3
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit no args
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit "foo" + ' ' + "bar"
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) foo bar
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmitWhitespace.types b/tests/baselines/reference/tsxReactEmitWhitespace.types index 4622aef1991..824aa5cfdae 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace.types +++ b/tests/baselines/reference/tsxReactEmitWhitespace.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmitWhitespace2.js b/tests/baselines/reference/tsxReactEmitWhitespace2.js index 091a193cdc5..f649ca43ebd 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace2.js +++ b/tests/baselines/reference/tsxReactEmitWhitespace2.js @@ -1,4 +1,4 @@ -//// [tsxReactEmitWhitespace2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -16,7 +16,7 @@ declare var React: any; -//// [tsxReactEmitWhitespace2.js] +//// [file.js] // Emit ' word' in the last string React.createElement("div", null, "word ", React.createElement("code", null, "code"), " word"); // Same here diff --git a/tests/baselines/reference/tsxReactEmitWhitespace2.symbols b/tests/baselines/reference/tsxReactEmitWhitespace2.symbols index 44ff4cba292..a79445c28af 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace2.symbols +++ b/tests/baselines/reference/tsxReactEmitWhitespace2.symbols @@ -1,38 +1,38 @@ -=== tests/cases/conformance/jsx/tsxReactEmitWhitespace2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmitWhitespace2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmitWhitespace2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmitWhitespace2.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmitWhitespace2.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11)) // Emit ' word' in the last string
word code word
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Same here
code word
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // And here
word
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmitWhitespace2.types b/tests/baselines/reference/tsxReactEmitWhitespace2.types index 7287e59b9b1..73c65f50aca 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace2.types +++ b/tests/baselines/reference/tsxReactEmitWhitespace2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmitWhitespace2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any From 57e17d26639483e756c459e752fc35e8cb2e9723 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Sep 2015 14:06:54 -0700 Subject: [PATCH 09/89] Test cases for different typescript syntax not supported errors during js files compilation --- ...CompilationAmbientVarDeclarationSyntax.errors.txt | 9 +++++++++ .../jsFileCompilationDecoratorSyntax.errors.txt | 9 +++++++++ .../reference/jsFileCompilationEnumSyntax.errors.txt | 9 +++++++++ ...sFileCompilationExportAssignmentSyntax.errors.txt | 9 +++++++++ ...CompilationHeritageClauseSyntaxOfClass.errors.txt | 9 +++++++++ .../jsFileCompilationImportEqualsSyntax.errors.txt | 9 +++++++++ .../jsFileCompilationInterfaceSyntax.errors.txt | 9 +++++++++ .../jsFileCompilationModuleSyntax.errors.txt | 9 +++++++++ .../jsFileCompilationOptionalParameter.errors.txt | 9 +++++++++ ...jsFileCompilationPropertySyntaxOfClass.errors.txt | 9 +++++++++ ...leCompilationPublicMethodSyntaxOfClass.errors.txt | 12 ++++++++++++ ...FileCompilationPublicParameterModifier.errors.txt | 9 +++++++++ ...eCompilationReturnTypeSyntaxOfFunction.errors.txt | 9 +++++++++ .../jsFileCompilationTypeAliasSyntax.errors.txt | 9 +++++++++ ...ileCompilationTypeArgumentSyntaxOfCall.errors.txt | 9 +++++++++ .../jsFileCompilationTypeAssertions.errors.txt | 9 +++++++++ .../jsFileCompilationTypeOfParameter.errors.txt | 9 +++++++++ ...eCompilationTypeParameterSyntaxOfClass.errors.txt | 9 +++++++++ ...mpilationTypeParameterSyntaxOfFunction.errors.txt | 9 +++++++++ .../jsFileCompilationTypeSyntaxOfVar.errors.txt | 9 +++++++++ .../jsFileCompilationAmbientVarDeclarationSyntax.ts | 2 ++ .../compiler/jsFileCompilationDecoratorSyntax.ts | 2 ++ tests/cases/compiler/jsFileCompilationEnumSyntax.ts | 2 ++ .../jsFileCompilationExportAssignmentSyntax.ts | 2 ++ .../jsFileCompilationHeritageClauseSyntaxOfClass.ts | 2 ++ .../compiler/jsFileCompilationImportEqualsSyntax.ts | 2 ++ .../compiler/jsFileCompilationInterfaceSyntax.ts | 2 ++ .../cases/compiler/jsFileCompilationModuleSyntax.ts | 2 ++ .../compiler/jsFileCompilationOptionalParameter.ts | 2 ++ .../jsFileCompilationPropertySyntaxOfClass.ts | 2 ++ .../jsFileCompilationPublicMethodSyntaxOfClass.ts | 5 +++++ .../jsFileCompilationPublicParameterModifier.ts | 2 ++ .../jsFileCompilationReturnTypeSyntaxOfFunction.ts | 2 ++ .../compiler/jsFileCompilationTypeAliasSyntax.ts | 2 ++ .../jsFileCompilationTypeArgumentSyntaxOfCall.ts | 2 ++ .../compiler/jsFileCompilationTypeAssertions.ts | 2 ++ .../compiler/jsFileCompilationTypeOfParameter.ts | 2 ++ .../jsFileCompilationTypeParameterSyntaxOfClass.ts | 2 ++ ...jsFileCompilationTypeParameterSyntaxOfFunction.ts | 2 ++ .../compiler/jsFileCompilationTypeSyntaxOfVar.ts | 2 ++ 40 files changed, 226 insertions(+) create mode 100644 tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt create mode 100644 tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts create mode 100644 tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts create mode 100644 tests/cases/compiler/jsFileCompilationEnumSyntax.ts create mode 100644 tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts create mode 100644 tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts create mode 100644 tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts create mode 100644 tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts create mode 100644 tests/cases/compiler/jsFileCompilationModuleSyntax.ts create mode 100644 tests/cases/compiler/jsFileCompilationOptionalParameter.ts create mode 100644 tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts create mode 100644 tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts create mode 100644 tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts create mode 100644 tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts create mode 100644 tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts create mode 100644 tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts create mode 100644 tests/cases/compiler/jsFileCompilationTypeAssertions.ts create mode 100644 tests/cases/compiler/jsFileCompilationTypeOfParameter.ts create mode 100644 tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts create mode 100644 tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts create mode 100644 tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts diff --git a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt new file mode 100644 index 00000000000..d3175d9f116 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + declare var v; + ~~~~~~~ +!!! error TS8009: 'declare' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt new file mode 100644 index 00000000000..80fb4ded96d --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,1): error TS8017: 'decorators' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + @internal class C { } + ~~~~~~~~~ +!!! error TS8017: 'decorators' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt new file mode 100644 index 00000000000..bc0bb189c95 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + enum E { } + ~ +!!! error TS8015: 'enum declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt new file mode 100644 index 00000000000..f64628d3bc9 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + export = b; + ~~~~~~~~~~~ +!!! error TS8003: 'export=' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt new file mode 100644 index 00000000000..cf030d3c4f2 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + class C implements D { } + ~~~~~~~~~~~~ +!!! error TS8005: 'implements clauses' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt new file mode 100644 index 00000000000..54314ef431e --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + import a = b; + ~~~~~~~~~~~~~ +!!! error TS8002: 'import ... =' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt new file mode 100644 index 00000000000..07fc015fc72 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + interface I { } + ~ +!!! error TS8006: 'interface declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt new file mode 100644 index 00000000000..e63eede29bd --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + module M { } + ~ +!!! error TS8007: 'module declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt new file mode 100644 index 00000000000..1eefd3b8eae --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + function F(p?) { } + ~ +!!! error TS8009: '?' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt new file mode 100644 index 00000000000..613dc7a51a3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,11): error TS8014: 'property declarations' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + class C { v } + ~ +!!! error TS8014: 'property declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt new file mode 100644 index 00000000000..8585285c1ed --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -0,0 +1,12 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + class C { + public foo() { + ~~~~~~ +!!! error TS8009: 'public' can only be used in a .ts file. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt new file mode 100644 index 00000000000..aac386f2dd1 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + class C { constructor(public x) { }} + ~~~~~~ +!!! error TS8012: 'parameter modifiers' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt new file mode 100644 index 00000000000..48528b14531 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + function F(): number { } + ~~~~~~ +!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt new file mode 100644 index 00000000000..3afd84da9be --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,1): error TS8008: 'type aliases' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + type a = b; + ~~~~~~~~~~~ +!!! error TS8008: 'type aliases' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt new file mode 100644 index 00000000000..78a92e9460a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,5): error TS8011: 'type arguments' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + Foo(); + ~~~~~~ +!!! error TS8011: 'type arguments' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt new file mode 100644 index 00000000000..d7c8faab8dc --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + var v = undefined; + ~~~~~~ +!!! error TS8016: 'type assertion expressions' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt new file mode 100644 index 00000000000..41638f51077 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + function F(a: number) { } + ~~~~~~ +!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt new file mode 100644 index 00000000000..6267d2f37fe --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + class C { } + ~ +!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt new file mode 100644 index 00000000000..4a5e222058b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + function F() { } + ~ +!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt new file mode 100644 index 00000000000..ceef95023df --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -0,0 +1,9 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts file. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + var v: () => number; + ~~~~~~~~~~~~ +!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts b/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts new file mode 100644 index 00000000000..636866e7eeb --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts @@ -0,0 +1,2 @@ +// @filename: a.js +declare var v; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts b/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts new file mode 100644 index 00000000000..2670e1503a9 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts @@ -0,0 +1,2 @@ +// @filename: a.js +@internal class C { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationEnumSyntax.ts b/tests/cases/compiler/jsFileCompilationEnumSyntax.ts new file mode 100644 index 00000000000..ad1126ebf27 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationEnumSyntax.ts @@ -0,0 +1,2 @@ +// @filename: a.js +enum E { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts b/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts new file mode 100644 index 00000000000..42a6e36efc8 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts @@ -0,0 +1,2 @@ +// @filename: a.js +export = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts new file mode 100644 index 00000000000..0a289515cb3 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts @@ -0,0 +1,2 @@ +// @filename: a.js +class C implements D { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts b/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts new file mode 100644 index 00000000000..85e9a7efb6d --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts @@ -0,0 +1,2 @@ +// @filename: a.js +import a = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts b/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts new file mode 100644 index 00000000000..014edddc341 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts @@ -0,0 +1,2 @@ +// @filename: a.js +interface I { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationModuleSyntax.ts b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts new file mode 100644 index 00000000000..4de8f393a93 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts @@ -0,0 +1,2 @@ +// @filename: a.js +module M { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationOptionalParameter.ts b/tests/cases/compiler/jsFileCompilationOptionalParameter.ts new file mode 100644 index 00000000000..47b445e38ac --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationOptionalParameter.ts @@ -0,0 +1,2 @@ +// @filename: a.js +function F(p?) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts new file mode 100644 index 00000000000..209efc3e12e --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts @@ -0,0 +1,2 @@ +// @filename: a.js +class C { v } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts new file mode 100644 index 00000000000..cd59f862ac8 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts @@ -0,0 +1,5 @@ +// @filename: a.js +class C { + public foo() { + } +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts b/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts new file mode 100644 index 00000000000..cb7a051016d --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts @@ -0,0 +1,2 @@ +// @filename: a.js +class C { constructor(public x) { }} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts b/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts new file mode 100644 index 00000000000..01080ef8556 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts @@ -0,0 +1,2 @@ +// @filename: a.js +function F(): number { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts b/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts new file mode 100644 index 00000000000..d4b9aeb0b81 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts @@ -0,0 +1,2 @@ +// @filename: a.js +type a = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts b/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts new file mode 100644 index 00000000000..2a8d892c80d --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts @@ -0,0 +1,2 @@ +// @filename: a.js +Foo(); \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeAssertions.ts b/tests/cases/compiler/jsFileCompilationTypeAssertions.ts new file mode 100644 index 00000000000..29f0c18c81b --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeAssertions.ts @@ -0,0 +1,2 @@ +// @filename: a.js +var v = undefined; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts b/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts new file mode 100644 index 00000000000..f7c98808ad5 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts @@ -0,0 +1,2 @@ +// @filename: a.js +function F(a: number) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts new file mode 100644 index 00000000000..6b340a63dda --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts @@ -0,0 +1,2 @@ +// @filename: a.js +class C { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts new file mode 100644 index 00000000000..5e2581676b8 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts @@ -0,0 +1,2 @@ +// @filename: a.js +function F() { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts b/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts new file mode 100644 index 00000000000..e6289fd6eb0 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts @@ -0,0 +1,2 @@ +// @filename: a.js +var v: () => number; \ No newline at end of file From 7e30827ebe029f534738734ab8fc4c8b6825c610 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Sep 2015 14:09:29 -0700 Subject: [PATCH 10/89] Test for rest parameters(copied from language service tests) --- tests/baselines/reference/jsFileCompilationRestParameter.js | 5 +++++ .../reference/jsFileCompilationRestParameter.symbols | 5 +++++ .../baselines/reference/jsFileCompilationRestParameter.types | 5 +++++ tests/cases/compiler/jsFileCompilationRestParameter.ts | 4 ++++ 4 files changed, 19 insertions(+) create mode 100644 tests/baselines/reference/jsFileCompilationRestParameter.js create mode 100644 tests/baselines/reference/jsFileCompilationRestParameter.symbols create mode 100644 tests/baselines/reference/jsFileCompilationRestParameter.types create mode 100644 tests/cases/compiler/jsFileCompilationRestParameter.ts diff --git a/tests/baselines/reference/jsFileCompilationRestParameter.js b/tests/baselines/reference/jsFileCompilationRestParameter.js new file mode 100644 index 00000000000..bcba97af024 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationRestParameter.js @@ -0,0 +1,5 @@ +//// [a.js] +function foo(...a) { } + +//// [b.js] +function foo(...a) { } diff --git a/tests/baselines/reference/jsFileCompilationRestParameter.symbols b/tests/baselines/reference/jsFileCompilationRestParameter.symbols new file mode 100644 index 00000000000..4ce7529b83d --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationRestParameter.symbols @@ -0,0 +1,5 @@ +=== tests/cases/compiler/a.js === +function foo(...a) { } +>foo : Symbol(foo, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 0, 13)) + diff --git a/tests/baselines/reference/jsFileCompilationRestParameter.types b/tests/baselines/reference/jsFileCompilationRestParameter.types new file mode 100644 index 00000000000..54d0ec8631f --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationRestParameter.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/a.js === +function foo(...a) { } +>foo : (...a: any[]) => void +>a : any[] + diff --git a/tests/cases/compiler/jsFileCompilationRestParameter.ts b/tests/cases/compiler/jsFileCompilationRestParameter.ts new file mode 100644 index 00000000000..71d04eec64e --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationRestParameter.ts @@ -0,0 +1,4 @@ +// @filename: a.js +// @target: es6 +// @out: b.js +function foo(...a) { } \ No newline at end of file From 225235427a49a08225cfddf5568278b11878044d Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Sep 2015 14:25:44 -0700 Subject: [PATCH 11/89] Verify syntax error in js file are reported --- src/harness/harness.ts | 4 +++- .../jsFileCompilationSyntaxError.errors.txt | 14 ++++++++++++++ .../cases/compiler/jsFileCompilationSyntaxError.ts | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt create mode 100644 tests/cases/compiler/jsFileCompilationSyntaxError.ts diff --git a/src/harness/harness.ts b/src/harness/harness.ts index ad2648ef208..be924fe6ae9 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -173,7 +173,9 @@ module Utils { ts.forEachChild(node, child => { childNodesAndArrays.push(child); }, array => { childNodesAndArrays.push(array); }); for (let childName in node) { - if (childName === "parent" || childName === "nextContainer" || childName === "modifiers" || childName === "externalModuleIndicator") { + if (childName === "parent" || childName === "nextContainer" || childName === "modifiers" || childName === "externalModuleIndicator" || + // for now ignore jsdoc comments + childName === "jsDocComment") { continue; } let child = (node)[childName]; diff --git a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt new file mode 100644 index 00000000000..d742e68dbdc --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt @@ -0,0 +1,14 @@ +error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +tests/cases/compiler/a.js(3,6): error TS1223: 'type' tag already specified. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.js (1 errors) ==== + /** + * @type {number} + * @type {string} + ~~~~ +!!! error TS1223: 'type' tag already specified. + */ + var v; + \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationSyntaxError.ts b/tests/cases/compiler/jsFileCompilationSyntaxError.ts new file mode 100644 index 00000000000..e6d379e0e3b --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationSyntaxError.ts @@ -0,0 +1,6 @@ +// @filename: a.js +/** + * @type {number} + * @type {string} + */ +var v; From 3107bbb4a11fb04289fd6ea5d75f43061fbec784 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Sep 2015 14:59:40 -0700 Subject: [PATCH 12/89] Let tsconfig to pick up js files --- src/compiler/commandLineParser.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index d22bc986688..1bc2c49e75d 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -476,7 +476,13 @@ namespace ts { let sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)); for (let i = 0; i < sysFiles.length; i++) { let name = sysFiles[i]; - if (fileExtensionIs(name, ".d.ts")) { + if (fileExtensionIs(name, ".js")) { + let baseName = name.substr(0, name.length - ".js".length); + if (!contains(sysFiles, baseName + ".tsx") && !contains(sysFiles, baseName + ".ts") && !contains(sysFiles, baseName + ".d.ts")) { + fileNames.push(name); + } + } + else if (fileExtensionIs(name, ".d.ts")) { let baseName = name.substr(0, name.length - ".d.ts".length); if (!contains(sysFiles, baseName + ".tsx") && !contains(sysFiles, baseName + ".ts")) { fileNames.push(name); From 60f295f27a1224dd184a0c5a49d97ae453a65470 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 14 Sep 2015 15:33:49 -0700 Subject: [PATCH 13/89] Cleanup of options of project runner --- src/harness/projectsRunner.ts | 66 ++++++++----------- ...ootAbsolutePathMixedSubfolderNoOutdir.json | 4 +- ...ootAbsolutePathMixedSubfolderNoOutdir.json | 4 +- ...hMixedSubfolderSpecifyOutputDirectory.json | 4 +- ...hMixedSubfolderSpecifyOutputDirectory.json | 4 +- ...tePathMixedSubfolderSpecifyOutputFile.json | 4 +- ...tePathMixedSubfolderSpecifyOutputFile.json | 4 +- ...erSpecifyOutputFileAndOutputDirectory.json | 4 +- ...erSpecifyOutputFileAndOutputDirectory.json | 4 +- ...AbsolutePathModuleMultifolderNoOutdir.json | 4 +- ...AbsolutePathModuleMultifolderNoOutdir.json | 4 +- ...duleMultifolderSpecifyOutputDirectory.json | 4 +- ...duleMultifolderSpecifyOutputDirectory.json | 4 +- ...athModuleMultifolderSpecifyOutputFile.json | 4 +- ...athModuleMultifolderSpecifyOutputFile.json | 4 +- ...pRootAbsolutePathModuleSimpleNoOutdir.json | 4 +- ...pRootAbsolutePathModuleSimpleNoOutdir.json | 4 +- ...athModuleSimpleSpecifyOutputDirectory.json | 4 +- ...athModuleSimpleSpecifyOutputDirectory.json | 4 +- ...lutePathModuleSimpleSpecifyOutputFile.json | 4 +- ...lutePathModuleSimpleSpecifyOutputFile.json | 4 +- ...otAbsolutePathModuleSubfolderNoOutdir.json | 4 +- ...otAbsolutePathModuleSubfolderNoOutdir.json | 4 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 4 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 4 +- ...ePathModuleSubfolderSpecifyOutputFile.json | 4 +- ...ePathModuleSubfolderSpecifyOutputFile.json | 4 +- ...apRootAbsolutePathMultifolderNoOutdir.json | 4 +- ...apRootAbsolutePathMultifolderNoOutdir.json | 4 +- ...PathMultifolderSpecifyOutputDirectory.json | 4 +- ...PathMultifolderSpecifyOutputDirectory.json | 4 +- ...olutePathMultifolderSpecifyOutputFile.json | 4 +- ...olutePathMultifolderSpecifyOutputFile.json | 4 +- .../mapRootAbsolutePathSimpleNoOutdir.json | 4 +- .../mapRootAbsolutePathSimpleNoOutdir.json | 4 +- ...olutePathSimpleSpecifyOutputDirectory.json | 4 +- ...olutePathSimpleSpecifyOutputDirectory.json | 4 +- ...otAbsolutePathSimpleSpecifyOutputFile.json | 4 +- ...otAbsolutePathSimpleSpecifyOutputFile.json | 4 +- ...mapRootAbsolutePathSingleFileNoOutdir.json | 4 +- ...mapRootAbsolutePathSingleFileNoOutdir.json | 4 +- ...ePathSingleFileSpecifyOutputDirectory.json | 4 +- ...ePathSingleFileSpecifyOutputDirectory.json | 4 +- ...solutePathSingleFileSpecifyOutputFile.json | 4 +- ...solutePathSingleFileSpecifyOutputFile.json | 4 +- .../mapRootAbsolutePathSubfolderNoOutdir.json | 4 +- .../mapRootAbsolutePathSubfolderNoOutdir.json | 4 +- ...tePathSubfolderSpecifyOutputDirectory.json | 4 +- ...tePathSubfolderSpecifyOutputDirectory.json | 4 +- ...bsolutePathSubfolderSpecifyOutputFile.json | 4 +- ...bsolutePathSubfolderSpecifyOutputFile.json | 4 +- ...ootRelativePathMixedSubfolderNoOutdir.json | 2 +- ...ootRelativePathMixedSubfolderNoOutdir.json | 2 +- ...hMixedSubfolderSpecifyOutputDirectory.json | 2 +- ...hMixedSubfolderSpecifyOutputDirectory.json | 2 +- ...vePathMixedSubfolderSpecifyOutputFile.json | 2 +- ...vePathMixedSubfolderSpecifyOutputFile.json | 2 +- ...erSpecifyOutputFileAndOutputDirectory.json | 2 +- ...erSpecifyOutputFileAndOutputDirectory.json | 2 +- ...RelativePathModuleMultifolderNoOutdir.json | 2 +- ...RelativePathModuleMultifolderNoOutdir.json | 2 +- ...duleMultifolderSpecifyOutputDirectory.json | 2 +- ...duleMultifolderSpecifyOutputDirectory.json | 2 +- ...athModuleMultifolderSpecifyOutputFile.json | 2 +- ...athModuleMultifolderSpecifyOutputFile.json | 2 +- ...pRootRelativePathModuleSimpleNoOutdir.json | 2 +- ...pRootRelativePathModuleSimpleNoOutdir.json | 2 +- ...athModuleSimpleSpecifyOutputDirectory.json | 2 +- ...athModuleSimpleSpecifyOutputDirectory.json | 2 +- ...tivePathModuleSimpleSpecifyOutputFile.json | 2 +- ...tivePathModuleSimpleSpecifyOutputFile.json | 2 +- ...otRelativePathModuleSubfolderNoOutdir.json | 2 +- ...otRelativePathModuleSubfolderNoOutdir.json | 2 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 2 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 2 +- ...ePathModuleSubfolderSpecifyOutputFile.json | 2 +- ...ePathModuleSubfolderSpecifyOutputFile.json | 2 +- ...apRootRelativePathMultifolderNoOutdir.json | 2 +- ...apRootRelativePathMultifolderNoOutdir.json | 2 +- ...PathMultifolderSpecifyOutputDirectory.json | 2 +- ...PathMultifolderSpecifyOutputDirectory.json | 2 +- ...ativePathMultifolderSpecifyOutputFile.json | 2 +- ...ativePathMultifolderSpecifyOutputFile.json | 2 +- .../mapRootRelativePathSimpleNoOutdir.json | 2 +- .../mapRootRelativePathSimpleNoOutdir.json | 2 +- ...ativePathSimpleSpecifyOutputDirectory.json | 2 +- ...ativePathSimpleSpecifyOutputDirectory.json | 2 +- ...otRelativePathSimpleSpecifyOutputFile.json | 2 +- ...otRelativePathSimpleSpecifyOutputFile.json | 2 +- ...mapRootRelativePathSingleFileNoOutdir.json | 2 +- ...mapRootRelativePathSingleFileNoOutdir.json | 2 +- ...ePathSingleFileSpecifyOutputDirectory.json | 2 +- ...ePathSingleFileSpecifyOutputDirectory.json | 2 +- ...lativePathSingleFileSpecifyOutputFile.json | 2 +- ...lativePathSingleFileSpecifyOutputFile.json | 2 +- .../mapRootRelativePathSubfolderNoOutdir.json | 2 +- .../mapRootRelativePathSubfolderNoOutdir.json | 2 +- ...vePathSubfolderSpecifyOutputDirectory.json | 2 +- ...vePathSubfolderSpecifyOutputDirectory.json | 2 +- ...elativePathSubfolderSpecifyOutputFile.json | 2 +- ...elativePathSubfolderSpecifyOutputFile.json | 2 +- .../amd/maprootUrlMixedSubfolderNoOutdir.json | 2 +- .../maprootUrlMixedSubfolderNoOutdir.json | 2 +- ...lMixedSubfolderSpecifyOutputDirectory.json | 2 +- ...lMixedSubfolderSpecifyOutputDirectory.json | 2 +- ...ootUrlMixedSubfolderSpecifyOutputFile.json | 2 +- ...ootUrlMixedSubfolderSpecifyOutputFile.json | 2 +- ...erSpecifyOutputFileAndOutputDirectory.json | 2 +- ...erSpecifyOutputFileAndOutputDirectory.json | 2 +- .../maprootUrlModuleMultifolderNoOutdir.json | 2 +- .../maprootUrlModuleMultifolderNoOutdir.json | 2 +- ...duleMultifolderSpecifyOutputDirectory.json | 2 +- ...duleMultifolderSpecifyOutputDirectory.json | 2 +- ...UrlModuleMultifolderSpecifyOutputFile.json | 2 +- ...UrlModuleMultifolderSpecifyOutputFile.json | 2 +- .../amd/maprootUrlModuleSimpleNoOutdir.json | 2 +- .../node/maprootUrlModuleSimpleNoOutdir.json | 2 +- ...UrlModuleSimpleSpecifyOutputDirectory.json | 2 +- ...UrlModuleSimpleSpecifyOutputDirectory.json | 2 +- ...prootUrlModuleSimpleSpecifyOutputFile.json | 2 +- ...prootUrlModuleSimpleSpecifyOutputFile.json | 2 +- .../maprootUrlModuleSubfolderNoOutdir.json | 2 +- .../maprootUrlModuleSubfolderNoOutdir.json | 2 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 2 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 2 +- ...otUrlModuleSubfolderSpecifyOutputFile.json | 2 +- ...otUrlModuleSubfolderSpecifyOutputFile.json | 2 +- .../amd/maprootUrlMultifolderNoOutdir.json | 2 +- .../node/maprootUrlMultifolderNoOutdir.json | 2 +- ...tUrlMultifolderSpecifyOutputDirectory.json | 2 +- ...tUrlMultifolderSpecifyOutputDirectory.json | 2 +- ...aprootUrlMultifolderSpecifyOutputFile.json | 2 +- ...aprootUrlMultifolderSpecifyOutputFile.json | 2 +- .../amd/maprootUrlSimpleNoOutdir.json | 2 +- .../node/maprootUrlSimpleNoOutdir.json | 2 +- ...aprootUrlSimpleSpecifyOutputDirectory.json | 2 +- ...aprootUrlSimpleSpecifyOutputDirectory.json | 2 +- .../maprootUrlSimpleSpecifyOutputFile.json | 2 +- .../maprootUrlSimpleSpecifyOutputFile.json | 2 +- .../amd/maprootUrlSingleFileNoOutdir.json | 2 +- .../node/maprootUrlSingleFileNoOutdir.json | 2 +- ...otUrlSingleFileSpecifyOutputDirectory.json | 2 +- ...otUrlSingleFileSpecifyOutputDirectory.json | 2 +- ...maprootUrlSingleFileSpecifyOutputFile.json | 2 +- ...maprootUrlSingleFileSpecifyOutputFile.json | 2 +- .../amd/maprootUrlSubfolderNoOutdir.json | 2 +- .../node/maprootUrlSubfolderNoOutdir.json | 2 +- ...ootUrlSubfolderSpecifyOutputDirectory.json | 2 +- ...ootUrlSubfolderSpecifyOutputDirectory.json | 2 +- .../maprootUrlSubfolderSpecifyOutputFile.json | 2 +- .../maprootUrlSubfolderSpecifyOutputFile.json | 2 +- ...rlsourcerootUrlMixedSubfolderNoOutdir.json | 4 +- ...rlsourcerootUrlMixedSubfolderNoOutdir.json | 4 +- ...lMixedSubfolderSpecifyOutputDirectory.json | 4 +- ...lMixedSubfolderSpecifyOutputDirectory.json | 4 +- ...ootUrlMixedSubfolderSpecifyOutputFile.json | 4 +- ...ootUrlMixedSubfolderSpecifyOutputFile.json | 4 +- ...erSpecifyOutputFileAndOutputDirectory.json | 4 +- ...erSpecifyOutputFileAndOutputDirectory.json | 4 +- ...ourcerootUrlModuleMultifolderNoOutdir.json | 4 +- ...ourcerootUrlModuleMultifolderNoOutdir.json | 4 +- ...duleMultifolderSpecifyOutputDirectory.json | 4 +- ...duleMultifolderSpecifyOutputDirectory.json | 4 +- ...UrlModuleMultifolderSpecifyOutputFile.json | 4 +- ...UrlModuleMultifolderSpecifyOutputFile.json | 4 +- ...tUrlsourcerootUrlModuleSimpleNoOutdir.json | 4 +- ...tUrlsourcerootUrlModuleSimpleNoOutdir.json | 4 +- ...UrlModuleSimpleSpecifyOutputDirectory.json | 4 +- ...UrlModuleSimpleSpecifyOutputDirectory.json | 4 +- ...erootUrlModuleSimpleSpecifyOutputFile.json | 4 +- ...erootUrlModuleSimpleSpecifyOutputFile.json | 4 +- ...lsourcerootUrlModuleSubfolderNoOutdir.json | 4 +- ...lsourcerootUrlModuleSubfolderNoOutdir.json | 4 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 4 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 4 +- ...otUrlModuleSubfolderSpecifyOutputFile.json | 4 +- ...otUrlModuleSubfolderSpecifyOutputFile.json | 4 +- ...otUrlsourcerootUrlMultifolderNoOutdir.json | 4 +- ...otUrlsourcerootUrlMultifolderNoOutdir.json | 4 +- ...tUrlMultifolderSpecifyOutputDirectory.json | 4 +- ...tUrlMultifolderSpecifyOutputDirectory.json | 4 +- ...cerootUrlMultifolderSpecifyOutputFile.json | 4 +- ...cerootUrlMultifolderSpecifyOutputFile.json | 4 +- ...maprootUrlsourcerootUrlSimpleNoOutdir.json | 4 +- ...maprootUrlsourcerootUrlSimpleNoOutdir.json | 4 +- ...cerootUrlSimpleSpecifyOutputDirectory.json | 4 +- ...cerootUrlSimpleSpecifyOutputDirectory.json | 4 +- ...lsourcerootUrlSimpleSpecifyOutputFile.json | 4 +- ...lsourcerootUrlSimpleSpecifyOutputFile.json | 4 +- ...ootUrlsourcerootUrlSingleFileNoOutdir.json | 4 +- ...ootUrlsourcerootUrlSingleFileNoOutdir.json | 4 +- ...otUrlSingleFileSpecifyOutputDirectory.json | 4 +- ...otUrlSingleFileSpecifyOutputDirectory.json | 4 +- ...rcerootUrlSingleFileSpecifyOutputFile.json | 4 +- ...rcerootUrlSingleFileSpecifyOutputFile.json | 4 +- ...rootUrlsourcerootUrlSubfolderNoOutdir.json | 4 +- ...rootUrlsourcerootUrlSubfolderNoOutdir.json | 4 +- ...ootUrlSubfolderSpecifyOutputDirectory.json | 4 +- ...ootUrlSubfolderSpecifyOutputDirectory.json | 4 +- ...urcerootUrlSubfolderSpecifyOutputFile.json | 4 +- ...urcerootUrlSubfolderSpecifyOutputFile.json | 4 +- ...renceResolutionRelativePathsNoResolve.json | 1 + ...renceResolutionRelativePathsNoResolve.json | 1 + ...renceResolutionSameFileTwiceNoResolve.json | 1 + ...renceResolutionSameFileTwiceNoResolve.json | 1 + .../rootDirectory/amd/rootDirectory.json | 2 +- .../rootDirectory/node/rootDirectory.json | 2 +- .../amd/rootDirectoryErrors.json | 2 +- .../node/rootDirectoryErrors.json | 2 +- .../amd/rootDirectoryWithSourceRoot.json | 2 +- .../node/rootDirectoryWithSourceRoot.json | 2 +- ...ootAbsolutePathMixedSubfolderNoOutdir.json | 4 +- ...ootAbsolutePathMixedSubfolderNoOutdir.json | 4 +- ...hMixedSubfolderSpecifyOutputDirectory.json | 4 +- ...hMixedSubfolderSpecifyOutputDirectory.json | 4 +- ...tePathMixedSubfolderSpecifyOutputFile.json | 4 +- ...tePathMixedSubfolderSpecifyOutputFile.json | 4 +- ...erSpecifyOutputFileAndOutputDirectory.json | 4 +- ...erSpecifyOutputFileAndOutputDirectory.json | 4 +- ...AbsolutePathModuleMultifolderNoOutdir.json | 4 +- ...AbsolutePathModuleMultifolderNoOutdir.json | 4 +- ...duleMultifolderSpecifyOutputDirectory.json | 4 +- ...duleMultifolderSpecifyOutputDirectory.json | 4 +- ...athModuleMultifolderSpecifyOutputFile.json | 4 +- ...athModuleMultifolderSpecifyOutputFile.json | 4 +- ...eRootAbsolutePathModuleSimpleNoOutdir.json | 4 +- ...eRootAbsolutePathModuleSimpleNoOutdir.json | 4 +- ...athModuleSimpleSpecifyOutputDirectory.json | 4 +- ...athModuleSimpleSpecifyOutputDirectory.json | 4 +- ...lutePathModuleSimpleSpecifyOutputFile.json | 4 +- ...lutePathModuleSimpleSpecifyOutputFile.json | 4 +- ...otAbsolutePathModuleSubfolderNoOutdir.json | 4 +- ...otAbsolutePathModuleSubfolderNoOutdir.json | 4 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 4 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 4 +- ...ePathModuleSubfolderSpecifyOutputFile.json | 4 +- ...ePathModuleSubfolderSpecifyOutputFile.json | 4 +- ...ceRootAbsolutePathMultifolderNoOutdir.json | 4 +- ...ceRootAbsolutePathMultifolderNoOutdir.json | 4 +- ...PathMultifolderSpecifyOutputDirectory.json | 4 +- ...PathMultifolderSpecifyOutputDirectory.json | 4 +- ...olutePathMultifolderSpecifyOutputFile.json | 4 +- ...olutePathMultifolderSpecifyOutputFile.json | 4 +- .../sourceRootAbsolutePathSimpleNoOutdir.json | 4 +- .../sourceRootAbsolutePathSimpleNoOutdir.json | 4 +- ...olutePathSimpleSpecifyOutputDirectory.json | 4 +- ...olutePathSimpleSpecifyOutputDirectory.json | 4 +- ...otAbsolutePathSimpleSpecifyOutputFile.json | 4 +- ...otAbsolutePathSimpleSpecifyOutputFile.json | 4 +- ...rceRootAbsolutePathSingleFileNoOutdir.json | 4 +- ...rceRootAbsolutePathSingleFileNoOutdir.json | 4 +- ...ePathSingleFileSpecifyOutputDirectory.json | 4 +- ...ePathSingleFileSpecifyOutputDirectory.json | 4 +- ...solutePathSingleFileSpecifyOutputFile.json | 4 +- ...solutePathSingleFileSpecifyOutputFile.json | 4 +- ...urceRootAbsolutePathSubfolderNoOutdir.json | 4 +- ...urceRootAbsolutePathSubfolderNoOutdir.json | 4 +- ...tePathSubfolderSpecifyOutputDirectory.json | 4 +- ...tePathSubfolderSpecifyOutputDirectory.json | 4 +- ...bsolutePathSubfolderSpecifyOutputFile.json | 4 +- ...bsolutePathSubfolderSpecifyOutputFile.json | 4 +- ...ootRelativePathMixedSubfolderNoOutdir.json | 2 +- ...ootRelativePathMixedSubfolderNoOutdir.json | 2 +- ...hMixedSubfolderSpecifyOutputDirectory.json | 2 +- ...hMixedSubfolderSpecifyOutputDirectory.json | 2 +- ...vePathMixedSubfolderSpecifyOutputFile.json | 2 +- ...vePathMixedSubfolderSpecifyOutputFile.json | 2 +- ...erSpecifyOutputFileAndOutputDirectory.json | 2 +- ...erSpecifyOutputFileAndOutputDirectory.json | 2 +- ...RelativePathModuleMultifolderNoOutdir.json | 2 +- ...RelativePathModuleMultifolderNoOutdir.json | 2 +- ...duleMultifolderSpecifyOutputDirectory.json | 2 +- ...duleMultifolderSpecifyOutputDirectory.json | 2 +- ...athModuleMultifolderSpecifyOutputFile.json | 2 +- ...athModuleMultifolderSpecifyOutputFile.json | 2 +- ...eRootRelativePathModuleSimpleNoOutdir.json | 2 +- ...eRootRelativePathModuleSimpleNoOutdir.json | 2 +- ...athModuleSimpleSpecifyOutputDirectory.json | 2 +- ...athModuleSimpleSpecifyOutputDirectory.json | 2 +- ...tivePathModuleSimpleSpecifyOutputFile.json | 2 +- ...tivePathModuleSimpleSpecifyOutputFile.json | 2 +- ...otRelativePathModuleSubfolderNoOutdir.json | 2 +- ...otRelativePathModuleSubfolderNoOutdir.json | 2 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 2 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 2 +- ...ePathModuleSubfolderSpecifyOutputFile.json | 2 +- ...ePathModuleSubfolderSpecifyOutputFile.json | 2 +- ...ceRootRelativePathMultifolderNoOutdir.json | 2 +- ...ceRootRelativePathMultifolderNoOutdir.json | 2 +- ...PathMultifolderSpecifyOutputDirectory.json | 2 +- ...PathMultifolderSpecifyOutputDirectory.json | 2 +- ...ativePathMultifolderSpecifyOutputFile.json | 2 +- ...ativePathMultifolderSpecifyOutputFile.json | 2 +- .../sourceRootRelativePathSimpleNoOutdir.json | 2 +- .../sourceRootRelativePathSimpleNoOutdir.json | 2 +- ...ativePathSimpleSpecifyOutputDirectory.json | 2 +- ...ativePathSimpleSpecifyOutputDirectory.json | 2 +- ...otRelativePathSimpleSpecifyOutputFile.json | 2 +- ...otRelativePathSimpleSpecifyOutputFile.json | 2 +- ...rceRootRelativePathSingleFileNoOutdir.json | 2 +- ...rceRootRelativePathSingleFileNoOutdir.json | 2 +- ...ePathSingleFileSpecifyOutputDirectory.json | 2 +- ...ePathSingleFileSpecifyOutputDirectory.json | 2 +- ...lativePathSingleFileSpecifyOutputFile.json | 2 +- ...lativePathSingleFileSpecifyOutputFile.json | 2 +- ...urceRootRelativePathSubfolderNoOutdir.json | 2 +- ...urceRootRelativePathSubfolderNoOutdir.json | 2 +- ...vePathSubfolderSpecifyOutputDirectory.json | 2 +- ...vePathSubfolderSpecifyOutputDirectory.json | 2 +- ...elativePathSubfolderSpecifyOutputFile.json | 2 +- ...elativePathSubfolderSpecifyOutputFile.json | 2 +- .../sourcerootUrlMixedSubfolderNoOutdir.json | 2 +- .../sourcerootUrlMixedSubfolderNoOutdir.json | 2 +- ...lMixedSubfolderSpecifyOutputDirectory.json | 2 +- ...lMixedSubfolderSpecifyOutputDirectory.json | 2 +- ...ootUrlMixedSubfolderSpecifyOutputFile.json | 2 +- ...ootUrlMixedSubfolderSpecifyOutputFile.json | 2 +- ...erSpecifyOutputFileAndOutputDirectory.json | 2 +- ...erSpecifyOutputFileAndOutputDirectory.json | 2 +- ...ourcerootUrlModuleMultifolderNoOutdir.json | 2 +- ...ourcerootUrlModuleMultifolderNoOutdir.json | 2 +- ...duleMultifolderSpecifyOutputDirectory.json | 2 +- ...duleMultifolderSpecifyOutputDirectory.json | 2 +- ...UrlModuleMultifolderSpecifyOutputFile.json | 2 +- ...UrlModuleMultifolderSpecifyOutputFile.json | 2 +- .../sourcerootUrlModuleSimpleNoOutdir.json | 2 +- .../sourcerootUrlModuleSimpleNoOutdir.json | 2 +- ...UrlModuleSimpleSpecifyOutputDirectory.json | 2 +- ...UrlModuleSimpleSpecifyOutputDirectory.json | 2 +- ...erootUrlModuleSimpleSpecifyOutputFile.json | 2 +- ...erootUrlModuleSimpleSpecifyOutputFile.json | 2 +- .../sourcerootUrlModuleSubfolderNoOutdir.json | 2 +- .../sourcerootUrlModuleSubfolderNoOutdir.json | 2 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 2 +- ...ModuleSubfolderSpecifyOutputDirectory.json | 2 +- ...otUrlModuleSubfolderSpecifyOutputFile.json | 2 +- ...otUrlModuleSubfolderSpecifyOutputFile.json | 2 +- .../amd/sourcerootUrlMultifolderNoOutdir.json | 2 +- .../sourcerootUrlMultifolderNoOutdir.json | 2 +- ...tUrlMultifolderSpecifyOutputDirectory.json | 2 +- ...tUrlMultifolderSpecifyOutputDirectory.json | 2 +- ...cerootUrlMultifolderSpecifyOutputFile.json | 2 +- ...cerootUrlMultifolderSpecifyOutputFile.json | 2 +- .../amd/sourcerootUrlSimpleNoOutdir.json | 2 +- .../node/sourcerootUrlSimpleNoOutdir.json | 2 +- ...cerootUrlSimpleSpecifyOutputDirectory.json | 2 +- ...cerootUrlSimpleSpecifyOutputDirectory.json | 2 +- .../sourcerootUrlSimpleSpecifyOutputFile.json | 2 +- .../sourcerootUrlSimpleSpecifyOutputFile.json | 2 +- .../amd/sourcerootUrlSingleFileNoOutdir.json | 2 +- .../node/sourcerootUrlSingleFileNoOutdir.json | 2 +- ...otUrlSingleFileSpecifyOutputDirectory.json | 2 +- ...otUrlSingleFileSpecifyOutputDirectory.json | 2 +- ...rcerootUrlSingleFileSpecifyOutputFile.json | 2 +- ...rcerootUrlSingleFileSpecifyOutputFile.json | 2 +- .../amd/sourcerootUrlSubfolderNoOutdir.json | 2 +- .../node/sourcerootUrlSubfolderNoOutdir.json | 2 +- ...ootUrlSubfolderSpecifyOutputDirectory.json | 2 +- ...ootUrlSubfolderSpecifyOutputDirectory.json | 2 +- ...urcerootUrlSubfolderSpecifyOutputFile.json | 2 +- ...urcerootUrlSubfolderSpecifyOutputFile.json | 2 +- 361 files changed, 539 insertions(+), 543 deletions(-) diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index fe4ab8ea8ea..12e3222a541 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -6,19 +6,11 @@ interface ProjectRunnerTestCase { scenario: string; projectRoot: string; // project where it lives - this also is the current directory when compiling inputFiles: string[]; // list of input files to be given to program - out?: string; // --out - outDir?: string; // --outDir - sourceMap?: boolean; // --map - mapRoot?: string; // --mapRoot resolveMapRoot?: boolean; // should we resolve this map root and give compiler the absolute disk path as map root? - sourceRoot?: string; // --sourceRoot resolveSourceRoot?: boolean; // should we resolve this source root and give compiler the absolute disk path as map root? - declaration?: boolean; // --d baselineCheck?: boolean; // Verify the baselines of output files, if this is false, we will write to output to the disk but there is no verification of baselines runTest?: boolean; // Run the resulting test bug?: string; // If there is any bug associated with this test case - noResolve?: boolean; - rootDir?: string; // --rootDir } interface ProjectRunnerTestCaseResolutionInfo extends ProjectRunnerTestCase { @@ -58,7 +50,7 @@ class ProjectRunner extends RunnerBase { } private runProjectTestCase(testCaseFileName: string) { - let testCase: ProjectRunnerTestCase; + let testCase: ProjectRunnerTestCase & ts.CompilerOptions; let testFileText: string = null; try { @@ -69,7 +61,7 @@ class ProjectRunner extends RunnerBase { } try { - testCase = JSON.parse(testFileText); + testCase = JSON.parse(testFileText); } catch (e) { assert(false, "Testcase: " + testCaseFileName + " does not contain valid json format: " + e.message); @@ -155,18 +147,35 @@ class ProjectRunner extends RunnerBase { }; function createCompilerOptions(): ts.CompilerOptions { - return { - declaration: !!testCase.declaration, - sourceMap: !!testCase.sourceMap, - outFile: testCase.out, - outDir: testCase.outDir, + // Set the special options that depend on other testcase options + let compilerOptions: ts.CompilerOptions = { mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? Harness.IO.resolvePath(testCase.mapRoot) : testCase.mapRoot, sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? Harness.IO.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, module: moduleKind, moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future - noResolve: testCase.noResolve, - rootDir: testCase.rootDir }; + + // Set the values specified using json + let optionNameMap: ts.Map = {}; + ts.forEach(ts.optionDeclarations, option => { + optionNameMap[option.name] = option; + }); + for (let name in testCase) { + if (name !== "mapRoot" && name !== "sourceRoot" && ts.hasProperty(optionNameMap, name)) { + let option = optionNameMap[name]; + let optType = option.type; + let value = testCase[name]; + if (typeof optType !== "string") { + let key = value.toLowerCase(); + if (ts.hasProperty(optType, key)) { + value = optType[key]; + } + } + compilerOptions[option.name] = value; + } + } + + return compilerOptions; } function getSourceFile(fileName: string, languageVersion: ts.ScriptTarget): ts.SourceFile { @@ -342,26 +351,9 @@ class ProjectRunner extends RunnerBase { let compilerResult: BatchCompileProjectTestCaseResult; function getCompilerResolutionInfo() { - let resolutionInfo: ProjectRunnerTestCaseResolutionInfo = { - scenario: testCase.scenario, - projectRoot: testCase.projectRoot, - inputFiles: testCase.inputFiles, - out: testCase.out, - outDir: testCase.outDir, - sourceMap: testCase.sourceMap, - mapRoot: testCase.mapRoot, - resolveMapRoot: testCase.resolveMapRoot, - sourceRoot: testCase.sourceRoot, - resolveSourceRoot: testCase.resolveSourceRoot, - declaration: testCase.declaration, - baselineCheck: testCase.baselineCheck, - runTest: testCase.runTest, - bug: testCase.bug, - rootDir: testCase.rootDir, - resolvedInputFiles: ts.map(compilerResult.program.getSourceFiles(), inputFile => inputFile.fileName), - emittedFiles: ts.map(compilerResult.outputFiles, outputFile => outputFile.emittedFileName) - }; - + let resolutionInfo: ProjectRunnerTestCaseResolutionInfo & ts.CompilerOptions = JSON.parse(JSON.stringify(testCase)); + resolutionInfo.resolvedInputFiles = ts.map(compilerResult.program.getSourceFiles(), inputFile => inputFile.fileName); + resolutionInfo.emittedFiles = ts.map(compilerResult.outputFiles, outputFile => outputFile.emittedFileName); return resolutionInfo; } diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.json index fa9e0b566a9..8a96d681f24 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.json index fa9e0b566a9..8a96d681f24 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json index ebaec46d1e3..997c2ed46c0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json index ebaec46d1e3..997c2ed46c0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json index ee020b0ff80..40f9da3afbf 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json index ee020b0ff80..40f9da3afbf 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index ed7bcd289e7..d23b5b2408f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index ed7bcd289e7..d23b5b2408f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.json index 8f512dcc98c..7474a34ec8c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.json index 8f512dcc98c..7474a34ec8c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json index 4f65daf7560..b0c91671012 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json index 4f65daf7560..b0c91671012 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index 6432d5ae91e..588d2404ef8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index 6432d5ae91e..588d2404ef8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.json index 31a0fb89c50..ff1b014410e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.json index 31a0fb89c50..ff1b014410e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json index 355458526bc..a1559326528 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json index 355458526bc..a1559326528 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json index f703a63b71f..971d1a2aaab 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json index f703a63b71f..971d1a2aaab 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.json index a6bc71dd664..27d5d010b40 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.json index a6bc71dd664..27d5d010b40 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json index e873c8fc472..8e16e5d165d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json index e873c8fc472..8e16e5d165d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index d8f4cc74008..86f3cf5c9a9 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index d8f4cc74008..86f3cf5c9a9 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.json index 49018ee5973..f511365c917 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.json index 49018ee5973..f511365c917 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json index 097c9bbf209..b3c5617dffa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json index 097c9bbf209..b3c5617dffa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.json index bcf3a4400aa..81f0ad78eb3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.json index bcf3a4400aa..81f0ad78eb3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.json index d5914d92950..8a32acd12e1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.json index d5914d92950..8a32acd12e1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json index 2c5e1dae38a..23cc45f9645 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json index 2c5e1dae38a..23cc45f9645 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.json index 8431a99c800..72a0dce3007 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.json index 8431a99c800..72a0dce3007 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.json index 4a180368e20..d26b77e4675 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.json index 4a180368e20..d26b77e4675 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json index a44a569a0a6..e712eab1a75 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json index a44a569a0a6..e712eab1a75 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.json index 7c0069605da..c66cea7fd44 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.json index 7c0069605da..c66cea7fd44 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.json index 1b09decc58d..a3c1bede2a1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.json index 1b09decc58d..a3c1bede2a1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json index a02eb484aa2..ddd2bdee5a8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json index a02eb484aa2..ddd2bdee5a8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.json index ec516baecfe..d452a55784f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.json index ec516baecfe..d452a55784f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.json index 5352fd8a988..af9fb8ba53b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.json index 5352fd8a988..af9fb8ba53b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json index 0a0d68e300a..9faeb47e4c8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json index 0a0d68e300a..9faeb47e4c8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json index 8e87f61b8df..4dc8fc45037 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json index 8e87f61b8df..4dc8fc45037 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 4ed441e2552..bf282177afd 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 4ed441e2552..bf282177afd 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.json index 8ec143b2dce..42354ecded5 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.json index 8ec143b2dce..42354ecded5 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json index 96777b6f502..969b730a251 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json index 96777b6f502..969b730a251 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json index f3c86f22eb7..3a1983f88d9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json index f3c86f22eb7..3a1983f88d9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.json index a4e8c09b004..162bcbaa749 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.json index a4e8c09b004..162bcbaa749 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json index f4a8884b58e..440dbb0972e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json index f4a8884b58e..440dbb0972e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json index fe0b8045a5c..0dfc88c1aa5 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json index fe0b8045a5c..0dfc88c1aa5 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.json index a2779060068..5abb8eec3da 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.json index a2779060068..5abb8eec3da 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json index 120bb5afbb6..d587558fbaf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json index 120bb5afbb6..d587558fbaf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json index a87c7d36d8e..0eb8315ff9b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json index a87c7d36d8e..0eb8315ff9b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.json index 718cfdabf0f..89fc00cb3ec 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.json index 718cfdabf0f..89fc00cb3ec 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.json index f51e53f02f6..d0034c920bc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.json index f51e53f02f6..d0034c920bc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.json index 0d3f3ad02d5..17fc8719be6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.json index 0d3f3ad02d5..17fc8719be6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.json index d4d500a397e..ee2758b4e87 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.json index d4d500a397e..ee2758b4e87 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.json index 12801537d2b..de85b187e28 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.json index 12801537d2b..de85b187e28 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.json index d6bbe96a7e0..0e7a2f759bc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.json index d6bbe96a7e0..0e7a2f759bc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.json index bb7ccbf453b..f8b9e1b96c2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.json index bb7ccbf453b..f8b9e1b96c2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.json index f654dbc3fac..4960088c269 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.json index f654dbc3fac..4960088c269 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.json index fc285030e8f..e14165a2094 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.json index fc285030e8f..e14165a2094 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.json index b5b1dfba62e..f47e52efaae 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.json index b5b1dfba62e..f47e52efaae 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.json index a06e2f34d5a..d54421a13ac 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.json index a06e2f34d5a..d54421a13ac 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.json index 77243118702..da673bae82c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.json index 77243118702..da673bae82c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.json index c6612841210..24e51c87f59 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.json index c6612841210..24e51c87f59 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.json index b225c4e408f..9ad38e70ea2 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.json index b225c4e408f..9ad38e70ea2 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.json index f987aa49ffe..155d2931181 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.json index f987aa49ffe..155d2931181 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 2bb23cdc610..f749081c10c 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 2bb23cdc610..f749081c10c 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.json index 6ecdc26ccd4..e63320ddb6a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.json index 6ecdc26ccd4..e63320ddb6a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.json index 9884550745c..8bedb002041 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.json index 9884550745c..8bedb002041 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json index e061982b32f..de091e6dd28 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json index e061982b32f..de091e6dd28 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.json index f9f02dcf789..f8a6fa3cd59 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.json index f9f02dcf789..f8a6fa3cd59 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.json index db2995acf69..c307775e549 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.json index db2995acf69..c307775e549 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json index e636ce61f7e..f0c01727957 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json index e636ce61f7e..f0c01727957 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.json index 2c7699ff0fa..91546861e01 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.json index 2c7699ff0fa..91546861e01 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.json index a61a50a760d..80247e1b009 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.json index a61a50a760d..80247e1b009 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json index 05da8c15292..00ba79cee26 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json index 05da8c15292..00ba79cee26 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.json index 5ea7aa80665..078c565dee6 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.json index 5ea7aa80665..078c565dee6 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.json index 0d16b53af66..dfd35e2a11e 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.json index 0d16b53af66..dfd35e2a11e 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.json index 8fb63eb43b0..e515573b4d8 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.json index 8fb63eb43b0..e515573b4d8 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.json index 6f141f81511..6ea29c1e036 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.json index 6f141f81511..6ea29c1e036 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.json index 1f73a2a33d6..999d4c5c3cb 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.json index 1f73a2a33d6..999d4c5c3cb 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.json index dcd18f3e946..85527f93f24 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.json index dcd18f3e946..85527f93f24 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.json index 689739aedce..9cdafc48766 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.json index 689739aedce..9cdafc48766 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.json index bbd1c10f320..7ee5dedd0de 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.json index bbd1c10f320..7ee5dedd0de 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.json index 634d80d7ff0..d48c8114927 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.json index 634d80d7ff0..d48c8114927 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.json index edd08fbfe10..eb0a847c3cb 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.json index edd08fbfe10..eb0a847c3cb 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.json index 0b2ea473029..ec6fe614b43 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.json index 0b2ea473029..ec6fe614b43 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.json index d4965ed4e74..f8d936825fd 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.json index d4965ed4e74..f8d936825fd 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json index 2f2a4280abf..25ba4998578 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json index 2f2a4280abf..25ba4998578 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json index 006720b1cc3..4978c9691b4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json index 006720b1cc3..4978c9691b4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json index c36f3ade5e0..b1eff624a4b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json index c36f3ade5e0..b1eff624a4b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 4741b9cf9e1..f0c3ddab2a5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 4741b9cf9e1..f0c3ddab2a5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json index ec6313ac50c..ce844561c41 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json index ec6313ac50c..ce844561c41 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json index 9a0d0258ca4..a73eb85b5c4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json index 9a0d0258ca4..a73eb85b5c4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json index 3ecf4bc4cc4..713487cc8d0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json index 3ecf4bc4cc4..713487cc8d0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json index d901eb0a790..7b1ffa340c5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json index d901eb0a790..7b1ffa340c5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json index 278bc2c86e5..bf1e9882756 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json index 278bc2c86e5..bf1e9882756 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json index 2cfc9aebda2..53aa4866a41 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json index 2cfc9aebda2..53aa4866a41 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json index fc4e8b7c9db..e57d54bde3b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json index fc4e8b7c9db..e57d54bde3b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json index a20ecf2d6c9..76e138ca511 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json index a20ecf2d6c9..76e138ca511 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json index cfa0ec5cb81..46ba3b14114 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json index cfa0ec5cb81..46ba3b14114 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.json index ddfa8259401..ae04c034c8c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.json index ddfa8259401..ae04c034c8c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json index 6e6c3e73c03..5bac47f1b0b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json index 6e6c3e73c03..5bac47f1b0b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json index f6aa3055f76..b0159f72fc0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json index f6aa3055f76..b0159f72fc0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.json index c85db0226a2..601a381b6bc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.json index c85db0226a2..601a381b6bc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json index ceda4546fce..72d412d2e5c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json index ceda4546fce..72d412d2e5c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json index 2bdff3a64be..ad03221057b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json index 2bdff3a64be..ad03221057b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.json index 2c66c2dc3a3..8ad3500d926 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.json index 2c66c2dc3a3..8ad3500d926 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json index 4d7e0f659ef..82d34274776 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json index 4d7e0f659ef..82d34274776 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json index f68a658cc8b..323adcd17b9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json index f68a658cc8b..323adcd17b9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.json index 5f6d0ccd74b..f3fb4f89412 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.json index 5f6d0ccd74b..f3fb4f89412 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json index 9dca1ba6d4b..8d6923824eb 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json index 9dca1ba6d4b..8d6923824eb 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json index d3d7588f1ca..0bdb289d92d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json index d3d7588f1ca..0bdb289d92d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/amd/referenceResolutionRelativePathsNoResolve.json b/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/amd/referenceResolutionRelativePathsNoResolve.json index 16831b328e9..bb8d7b36859 100644 --- a/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/amd/referenceResolutionRelativePathsNoResolve.json +++ b/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/amd/referenceResolutionRelativePathsNoResolve.json @@ -5,6 +5,7 @@ "foo.ts", "../../../bar/bar.ts" ], + "noResolve": true, "declaration": true, "baselineCheck": true, "resolvedInputFiles": [ diff --git a/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/node/referenceResolutionRelativePathsNoResolve.json b/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/node/referenceResolutionRelativePathsNoResolve.json index 16831b328e9..bb8d7b36859 100644 --- a/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/node/referenceResolutionRelativePathsNoResolve.json +++ b/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/node/referenceResolutionRelativePathsNoResolve.json @@ -5,6 +5,7 @@ "foo.ts", "../../../bar/bar.ts" ], + "noResolve": true, "declaration": true, "baselineCheck": true, "resolvedInputFiles": [ diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/referenceResolutionSameFileTwiceNoResolve.json b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/referenceResolutionSameFileTwiceNoResolve.json index b22aefac3ef..482cfcd40b4 100644 --- a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/referenceResolutionSameFileTwiceNoResolve.json +++ b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/referenceResolutionSameFileTwiceNoResolve.json @@ -5,6 +5,7 @@ "test.ts", "../ReferenceResolution/test.ts" ], + "noResolve": true, "declaration": true, "baselineCheck": true, "resolvedInputFiles": [ diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/referenceResolutionSameFileTwiceNoResolve.json b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/referenceResolutionSameFileTwiceNoResolve.json index b22aefac3ef..482cfcd40b4 100644 --- a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/referenceResolutionSameFileTwiceNoResolve.json +++ b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/referenceResolutionSameFileTwiceNoResolve.json @@ -5,6 +5,7 @@ "test.ts", "../ReferenceResolution/test.ts" ], + "noResolve": true, "declaration": true, "baselineCheck": true, "resolvedInputFiles": [ diff --git a/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.json b/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.json index 2ec18b3ac5a..bb79b1a7911 100644 --- a/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.json +++ b/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.json @@ -5,10 +5,10 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA", "sourceMap": true, "declaration": true, "baselineCheck": true, - "rootDir": "FolderA", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectory/node/rootDirectory.json b/tests/baselines/reference/project/rootDirectory/node/rootDirectory.json index 2ec18b3ac5a..bb79b1a7911 100644 --- a/tests/baselines/reference/project/rootDirectory/node/rootDirectory.json +++ b/tests/baselines/reference/project/rootDirectory/node/rootDirectory.json @@ -5,10 +5,10 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA", "sourceMap": true, "declaration": true, "baselineCheck": true, - "rootDir": "FolderA", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json index fdde42592ca..42f348a4b56 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json +++ b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json @@ -5,9 +5,9 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA/FolderB/FolderC", "declaration": true, "baselineCheck": true, - "rootDir": "FolderA/FolderB/FolderC", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json index fdde42592ca..42f348a4b56 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json +++ b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json @@ -5,9 +5,9 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA/FolderB/FolderC", "declaration": true, "baselineCheck": true, - "rootDir": "FolderA/FolderB/FolderC", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.json b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.json index deb12150736..57e51ed359a 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.json +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.json @@ -5,10 +5,10 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA", "sourceMap": true, "sourceRoot": "SourceRootPath", "baselineCheck": true, - "rootDir": "FolderA", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.json b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.json index deb12150736..57e51ed359a 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.json +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.json @@ -5,10 +5,10 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA", "sourceMap": true, "sourceRoot": "SourceRootPath", "baselineCheck": true, - "rootDir": "FolderA", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.json index 43059eaa5c6..734abfe9f95 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.json index 43059eaa5c6..734abfe9f95 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json index 6d9cf2998a8..560eef6c490 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json index 6d9cf2998a8..560eef6c490 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json index 09c6092f164..bf155fe1fe3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json index 09c6092f164..bf155fe1fe3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 6fb17fa06b8..87f1ac0b6fc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 6fb17fa06b8..87f1ac0b6fc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.json index 9e98d46666f..2475d02eb47 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.json index 9e98d46666f..2475d02eb47 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json index d96a3e5f832..8a746a518a3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json index d96a3e5f832..8a746a518a3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index b3e80123c04..d68d0afc199 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index b3e80123c04..d68d0afc199 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.json index 6e1f133ef64..09cb6b546b3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.json index 6e1f133ef64..09cb6b546b3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json index c15e91877ae..d3ba076ef6f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json index c15e91877ae..d3ba076ef6f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json index e2621b2fa52..914b6e2d792 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json index e2621b2fa52..914b6e2d792 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.json index b65bed61979..cdd0d1b3328 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.json index b65bed61979..cdd0d1b3328 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json index a8662e09bf6..2e482f41e66 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json index a8662e09bf6..2e482f41e66 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index a43e0f69172..ba9d94f2b0c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index a43e0f69172..ba9d94f2b0c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.json index b84ccc2bc23..c955083f7f1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.json index b84ccc2bc23..c955083f7f1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json index 43d3db291ff..3fa14686a7c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json index 43d3db291ff..3fa14686a7c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json index 6bd6db427c4..ed994f82308 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json index 6bd6db427c4..ed994f82308 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.json index f57c8110827..5ee7318ed14 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.json index f57c8110827..5ee7318ed14 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json index 02981610092..a7a05e10248 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json index 02981610092..a7a05e10248 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.json index 74add9e8d7b..3a215e043c6 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.json index 74add9e8d7b..3a215e043c6 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.json index 772190b4851..369da8c6254 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.json index 772190b4851..369da8c6254 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json index 8a6eb54b789..6534ef27847 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json index 8a6eb54b789..6534ef27847 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json index ec9d13d68de..71b375b8650 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json index ec9d13d68de..71b375b8650 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.json index 03f06090742..3ec5d65f7a0 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.json index 03f06090742..3ec5d65f7a0 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json index 08bdabb1c6e..faa7592db45 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json index 08bdabb1c6e..faa7592db45 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json index a6c034775ce..73333fd4868 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json index a6c034775ce..73333fd4868 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.json index 0e73f218462..326bb4aaff6 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.json index 0e73f218462..326bb4aaff6 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json index 99815d52661..e47173aac84 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json index 99815d52661..e47173aac84 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json index 82ef1c7d882..19b2ec4e5ff 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json index 82ef1c7d882..19b2ec4e5ff 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index d5f4fd9c654..cbab94f1153 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index d5f4fd9c654..cbab94f1153 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.json index 2acbea1cc8d..79c4217ab51 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.json index 2acbea1cc8d..79c4217ab51 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json index 6603e36c281..bb4c3668735 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json index 6603e36c281..bb4c3668735 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json index 69a577baffd..dafceda24d0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json index 69a577baffd..dafceda24d0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.json index f28c784480f..910f5cd7e8f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.json index f28c784480f..910f5cd7e8f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json index 77fa77f5fb0..29a92a51eec 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json index 77fa77f5fb0..29a92a51eec 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json index a4a6698d3ca..7d87bfe98f2 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json index a4a6698d3ca..7d87bfe98f2 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.json index 8a3035f3632..6ffc10b0448 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.json index 8a3035f3632..6ffc10b0448 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json index 9f10fc5e7e0..28b99749a6e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json index 9f10fc5e7e0..28b99749a6e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json index 71896f202b2..9a897de7334 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json index 71896f202b2..9a897de7334 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.json index e7dfb0beff3..b785e8311f3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.json index e7dfb0beff3..b785e8311f3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json index bfb74003401..83a4cf9e563 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json index bfb74003401..83a4cf9e563 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.json index 1f2e577b0b3..f9f31a969c4 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.json index 1f2e577b0b3..f9f31a969c4 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.json index 4d33e85e2ba..a4fc65ac644 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.json index 4d33e85e2ba..a4fc65ac644 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.json index bf86309b59a..23096eb3267 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.json index bf86309b59a..23096eb3267 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.json index 4b371bf5924..e60785d9b57 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.json index 4b371bf5924..e60785d9b57 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.json index 06a55d4a7cc..c7799ba328c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.json index 06a55d4a7cc..c7799ba328c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json index d87b6b22829..c9eabb14024 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json index d87b6b22829..c9eabb14024 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.json index c80db3f739c..39e0e9577bb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.json index c80db3f739c..39e0e9577bb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.json index ff189067e67..28fbd41bab9 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.json index ff189067e67..28fbd41bab9 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json index 8896f911a99..d6c94f99165 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json index 8896f911a99..d6c94f99165 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.json index ddcfbd2ff9c..bc02869d35b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.json index ddcfbd2ff9c..bc02869d35b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.json index ef5cb2df633..e949da7fdbf 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.json index ef5cb2df633..e949da7fdbf 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json index a46fe845710..892bc6673b9 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json index a46fe845710..892bc6673b9 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.json index 50a4518a1b0..e19fbed25d9 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.json index 50a4518a1b0..e19fbed25d9 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index b6ef6b5bd51..7808e3d9b28 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index b6ef6b5bd51..7808e3d9b28 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.json index c2594c0093c..f33a095e60e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.json index c2594c0093c..f33a095e60e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json index d2c6956bf80..1a429c986d8 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json index d2c6956bf80..1a429c986d8 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json index cc2a6c9b1aa..dd54871f563 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json index cc2a6c9b1aa..dd54871f563 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.json index 4a7cc668a6a..0c8a05da3b1 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.json index 4a7cc668a6a..0c8a05da3b1 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json index 6766f67eab0..efb3da725dc 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json index 6766f67eab0..efb3da725dc 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json index 5419c5a8225..ecfa616be4c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json index 5419c5a8225..ecfa616be4c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.json index d7f99610bab..46f3e8aad7d 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.json index d7f99610bab..46f3e8aad7d 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json index 1e722cb852e..bfd34fb2ec0 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json index 1e722cb852e..bfd34fb2ec0 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json index d80dacb3444..fedae846317 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json index d80dacb3444..fedae846317 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.json index a68d507bdf3..b2e2f7f7b9b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.json index a68d507bdf3..b2e2f7f7b9b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.json index 1641625569c..0730753a471 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.json index 1641625569c..0730753a471 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.json index 085ef5e8f19..d1d60d81434 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.json index 085ef5e8f19..d1d60d81434 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.json index 9df1fd3922e..46d15a907a4 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.json index 9df1fd3922e..46d15a907a4 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.json index 1a472ca17ee..53336eb9a6f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.json index 1a472ca17ee..53336eb9a6f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.json index 98a2dea2484..a5cf9d7d10e 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.json index 98a2dea2484..a5cf9d7d10e 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.json index dbef889efec..edb9f68ed00 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.json index dbef889efec..edb9f68ed00 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.json index afc78006729..0091f700603 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.json index afc78006729..0091f700603 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.json index 53e86654ad1..259d1eb920a 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.json index 53e86654ad1..259d1eb920a 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.json index 77912e79790..ac0c223a65f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.json index 77912e79790..ac0c223a65f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.json index 362af3ded05..40a5e623164 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.json index 362af3ded05..40a5e623164 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.json index 7c4bb20e942..b779b692d77 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.json index 7c4bb20e942..b779b692d77 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", From 8da3bd2ffd3ee662afd8f0bb9af441cd8ec6e741 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 15 Sep 2015 15:53:44 -0700 Subject: [PATCH 14/89] Project testcase to run tsconfig file --- src/compiler/program.ts | 4 +- src/compiler/tsc.ts | 2 +- src/harness/harness.ts | 10 +- src/harness/projectsRunner.ts | 141 ++++++++++++------ .../noProjectOptionAndInputFiles/amd/a.d.ts | 1 + .../noProjectOptionAndInputFiles/amd/a.js | 1 + .../amd/noProjectOptionAndInputFiles.json | 14 ++ .../noProjectOptionAndInputFiles/node/a.d.ts | 1 + .../noProjectOptionAndInputFiles/node/a.js | 1 + .../node/noProjectOptionAndInputFiles.json | 14 ++ .../project/projectOptionTest/amd/Test/a.d.ts | 1 + .../project/projectOptionTest/amd/Test/a.js | 1 + .../amd/projectOptionTest.json | 15 ++ .../projectOptionTest/node/Test/a.d.ts | 1 + .../project/projectOptionTest/node/Test/a.js | 1 + .../node/projectOptionTest.json | 15 ++ .../project/noProjectOptionAndInputFiles.json | 6 + tests/cases/project/projectOptionTest.json | 7 + tests/cases/projects/projectOption/Test/a.ts | 1 + tests/cases/projects/projectOption/Test/b.ts | 1 + .../projects/projectOption/Test/tsconfig.json | 1 + 21 files changed, 189 insertions(+), 50 deletions(-) create mode 100644 tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.d.ts create mode 100644 tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.js create mode 100644 tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/noProjectOptionAndInputFiles.json create mode 100644 tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.d.ts create mode 100644 tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.js create mode 100644 tests/baselines/reference/project/noProjectOptionAndInputFiles/node/noProjectOptionAndInputFiles.json create mode 100644 tests/baselines/reference/project/projectOptionTest/amd/Test/a.d.ts create mode 100644 tests/baselines/reference/project/projectOptionTest/amd/Test/a.js create mode 100644 tests/baselines/reference/project/projectOptionTest/amd/projectOptionTest.json create mode 100644 tests/baselines/reference/project/projectOptionTest/node/Test/a.d.ts create mode 100644 tests/baselines/reference/project/projectOptionTest/node/Test/a.js create mode 100644 tests/baselines/reference/project/projectOptionTest/node/projectOptionTest.json create mode 100644 tests/cases/project/noProjectOptionAndInputFiles.json create mode 100644 tests/cases/project/projectOptionTest.json create mode 100644 tests/cases/projects/projectOption/Test/a.ts create mode 100644 tests/cases/projects/projectOption/Test/b.ts create mode 100644 tests/cases/projects/projectOption/Test/tsconfig.json diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 5124dccee04..3c1d3a97d16 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -14,10 +14,10 @@ namespace ts { export const version = "1.6.0"; - export function findConfigFile(searchPath: string): string { + export function findConfigFile(searchPath: string, moduleResolutionHost: ModuleResolutionHost): string { let fileName = "tsconfig.json"; while (true) { - if (sys.fileExists(fileName)) { + if (moduleResolutionHost.fileExists(fileName)) { return fileName; } let parentPath = getDirectoryPath(searchPath); diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 96759b68250..805275776ad 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -188,7 +188,7 @@ namespace ts { } else if (commandLine.fileNames.length === 0 && isJSONSupported()) { let searchPath = normalizePath(sys.getCurrentDirectory()); - configFileName = findConfigFile(searchPath); + configFileName = findConfigFile(searchPath, sys); } if (commandLine.fileNames.length === 0 && !configFileName) { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index be924fe6ae9..9eb1cd45f53 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -430,6 +430,7 @@ module Harness { args(): string[]; getExecutingFilePath(): string; exit(exitCode?: number): void; + readDirectory(path: string, extension?: string, exclude?: string[]): string[]; } export var IO: IO; @@ -466,7 +467,8 @@ module Harness { export const directoryExists: typeof IO.directoryExists = fso.FolderExists; export const fileExists: typeof IO.fileExists = fso.FileExists; export const log: typeof IO.log = global.WScript && global.WScript.StdOut.WriteLine; - + export const readDirectory: typeof IO.readDirectory = (path, extension, exclude) => ts.sys.readDirectory(path, extension, exclude); + export function createDirectory(path: string) { if (directoryExists(path)) { fso.CreateFolder(path); @@ -534,6 +536,8 @@ module Harness { export const fileExists: typeof IO.fileExists = fs.existsSync; export const log: typeof IO.log = s => console.log(s); + export const readDirectory: typeof IO.readDirectory = (path, extension, exclude) => ts.sys.readDirectory(path, extension, exclude); + export function createDirectory(path: string) { if (!directoryExists(path)) { fs.mkdirSync(path); @@ -732,6 +736,10 @@ module Harness { export function writeFile(path: string, contents: string) { Http.writeToServerSync(serverRoot + path, "WRITE", contents); } + + export function readDirectory(path: string, extension?: string, exclude?: string[]) { + return listFiles(path).filter(f => !extension || ts.fileExtensionIs(f, extension)); + } } } diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index 12e3222a541..8b30a8be37b 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -25,14 +25,14 @@ interface BatchCompileProjectTestCaseEmittedFile extends Harness.Compiler.Genera interface CompileProjectFilesResult { moduleKind: ts.ModuleKind; - program: ts.Program; + program?: ts.Program; + compilerOptions?: ts.CompilerOptions, errors: ts.Diagnostic[]; - sourceMapData: ts.SourceMapData[]; + sourceMapData?: ts.SourceMapData[]; } interface BatchCompileProjectTestCaseResult extends CompileProjectFilesResult { - outputFiles: BatchCompileProjectTestCaseEmittedFile[]; - nonSubfolderDiskFiles: number; + outputFiles?: BatchCompileProjectTestCaseEmittedFile[]; } class ProjectRunner extends RunnerBase { @@ -119,9 +119,10 @@ class ProjectRunner extends RunnerBase { function compileProjectFiles(moduleKind: ts.ModuleKind, getInputFiles: () => string[], getSourceFileText: (fileName: string) => string, - writeFile: (fileName: string, data: string, writeByteOrderMark: boolean) => void): CompileProjectFilesResult { + writeFile: (fileName: string, data: string, writeByteOrderMark: boolean) => void, + compilerOptions: ts.CompilerOptions): CompileProjectFilesResult { - let program = ts.createProgram(getInputFiles(), createCompilerOptions(), createCompilerHost()); + let program = ts.createProgram(getInputFiles(), compilerOptions, createCompilerHost()); let errors = ts.getPreEmitDiagnostics(program); let emitResult = program.emit(); @@ -146,38 +147,6 @@ class ProjectRunner extends RunnerBase { sourceMapData }; - function createCompilerOptions(): ts.CompilerOptions { - // Set the special options that depend on other testcase options - let compilerOptions: ts.CompilerOptions = { - mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? Harness.IO.resolvePath(testCase.mapRoot) : testCase.mapRoot, - sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? Harness.IO.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, - module: moduleKind, - moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future - }; - - // Set the values specified using json - let optionNameMap: ts.Map = {}; - ts.forEach(ts.optionDeclarations, option => { - optionNameMap[option.name] = option; - }); - for (let name in testCase) { - if (name !== "mapRoot" && name !== "sourceRoot" && ts.hasProperty(optionNameMap, name)) { - let option = optionNameMap[name]; - let optType = option.type; - let value = testCase[name]; - if (typeof optType !== "string") { - let key = value.toLowerCase(); - if (ts.hasProperty(optType, key)) { - value = optType[key]; - } - } - compilerOptions[option.name] = value; - } - } - - return compilerOptions; - } - function getSourceFile(fileName: string, languageVersion: ts.ScriptTarget): ts.SourceFile { let sourceFile: ts.SourceFile = undefined; if (fileName === Harness.Compiler.defaultLibFileName) { @@ -212,23 +181,99 @@ class ProjectRunner extends RunnerBase { let nonSubfolderDiskFiles = 0; let outputFiles: BatchCompileProjectTestCaseEmittedFile[] = []; + let compilerOptions = createCompilerOptions(); + let inputFiles = testCase.inputFiles; + let configFileName: string; + if (compilerOptions.project) { + // Parse project + configFileName = ts.normalizePath(ts.combinePaths(compilerOptions.project, "tsconfig.json")); + assert(!inputFiles || inputFiles.length === 0, "cannot specify input files and project option together"); + } + else if (!inputFiles || inputFiles.length === 0) { + configFileName = ts.findConfigFile("", { fileExists, readFile: getSourceFileText }); + } - let projectCompilerResult = compileProjectFiles(moduleKind, () => testCase.inputFiles, getSourceFileText, writeFile); + if (configFileName) { + let result = ts.readConfigFile(configFileName, getSourceFileText); + if (result.error) { + return { + moduleKind, + errors: [result.error] + }; + } + + let configObject = result.config; + let configParseResult = ts.parseConfigFile(configObject, { fileExists, readFile: getSourceFileText, readDirectory }, ts.getDirectoryPath(configFileName)); + if (configParseResult.errors.length > 0) { + return { + moduleKind, + errors: configParseResult.errors + }; + } + inputFiles = configParseResult.fileNames; + compilerOptions = ts.extend(compilerOptions, configParseResult.options); + } + + let projectCompilerResult = compileProjectFiles(moduleKind, () => inputFiles, getSourceFileText, writeFile, compilerOptions); return { moduleKind, program: projectCompilerResult.program, + compilerOptions, sourceMapData: projectCompilerResult.sourceMapData, outputFiles, errors: projectCompilerResult.errors, - nonSubfolderDiskFiles, }; + function createCompilerOptions(): ts.CompilerOptions { + // Set the special options that depend on other testcase options + let compilerOptions: ts.CompilerOptions = { + mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? Harness.IO.resolvePath(testCase.mapRoot) : testCase.mapRoot, + sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? Harness.IO.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, + module: moduleKind, + moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future + }; + + // Set the values specified using json + let optionNameMap: ts.Map = {}; + ts.forEach(ts.optionDeclarations, option => { + optionNameMap[option.name] = option; + }); + for (let name in testCase) { + if (name !== "mapRoot" && name !== "sourceRoot" && ts.hasProperty(optionNameMap, name)) { + let option = optionNameMap[name]; + let optType = option.type; + let value = testCase[name]; + if (typeof optType !== "string") { + let key = value.toLowerCase(); + if (ts.hasProperty(optType, key)) { + value = optType[key]; + } + } + compilerOptions[option.name] = value; + } + } + + return compilerOptions; + } + + function getFileNameInTheProjectTest(fileName: string): string { + return ts.isRootedDiskPath(fileName) + ? fileName + : ts.normalizeSlashes(testCase.projectRoot) + "/" + ts.normalizeSlashes(fileName); + } + + function readDirectory(rootDir: string, extension: string, exclude: string[]): string[] { + return Harness.IO.readDirectory(getFileNameInTheProjectTest(rootDir), extension, exclude); + } + + function fileExists(fileName: string): boolean { + return Harness.IO.fileExists(getFileNameInTheProjectTest(fileName)); + } + function getSourceFileText(fileName: string): string { let text: string = undefined; try { - text = Harness.IO.readFile(ts.isRootedDiskPath(fileName) - ? fileName - : ts.normalizeSlashes(testCase.projectRoot) + "/" + ts.normalizeSlashes(fileName)); + text = Harness.IO.readFile(getFileNameInTheProjectTest(fileName)); } catch (e) { // text doesn't get defined. @@ -288,6 +333,9 @@ class ProjectRunner extends RunnerBase { function compileCompileDTsFiles(compilerResult: BatchCompileProjectTestCaseResult) { let allInputFiles: { emittedFileName: string; code: string; }[] = []; + if (!compilerResult.program) { + return; + } let compilerOptions = compilerResult.program.getCompilerOptions(); ts.forEach(compilerResult.program.getSourceFiles(), sourceFile => { @@ -317,7 +365,8 @@ class ProjectRunner extends RunnerBase { } }); - return compileProjectFiles(compilerResult.moduleKind, getInputFiles, getSourceFileText, writeFile); + // Dont allow config files since we are compiling existing source options + return compileProjectFiles(compilerResult.moduleKind, getInputFiles, getSourceFileText, writeFile, compilerResult.compilerOptions); function findOutpuDtsFile(fileName: string) { return ts.forEach(compilerResult.outputFiles, outputFile => outputFile.emittedFileName === fileName ? outputFile : undefined); @@ -352,7 +401,7 @@ class ProjectRunner extends RunnerBase { function getCompilerResolutionInfo() { let resolutionInfo: ProjectRunnerTestCaseResolutionInfo & ts.CompilerOptions = JSON.parse(JSON.stringify(testCase)); - resolutionInfo.resolvedInputFiles = ts.map(compilerResult.program.getSourceFiles(), inputFile => inputFile.fileName); + resolutionInfo.resolvedInputFiles = ts.map(compilerResult.program ? compilerResult.program.getSourceFiles() : undefined, inputFile => inputFile.fileName); resolutionInfo.emittedFiles = ts.map(compilerResult.outputFiles, outputFile => outputFile.emittedFileName); return resolutionInfo; } @@ -409,7 +458,7 @@ class ProjectRunner extends RunnerBase { it("Errors in generated Dts files for (" + moduleNameToString(moduleKind) + "): " + testCaseFileName, () => { if (!compilerResult.errors.length && testCase.declaration) { let dTsCompileResult = compileCompileDTsFiles(compilerResult); - if (dTsCompileResult.errors.length) { + if (dTsCompileResult && dTsCompileResult.errors.length) { Harness.Baseline.runBaseline("Errors in generated Dts files for (" + moduleNameToString(compilerResult.moduleKind) + "): " + testCaseFileName, getBaselineFolder(compilerResult.moduleKind) + testCaseJustName + ".dts.errors.txt", () => { return getErrorsBaseline(dTsCompileResult); }); diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.d.ts b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.js b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/noProjectOptionAndInputFiles.json b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/noProjectOptionAndInputFiles.json new file mode 100644 index 00000000000..32b8c5a28f7 --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/noProjectOptionAndInputFiles.json @@ -0,0 +1,14 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption/Test", + "baselineCheck": true, + "declaration": true, + "resolvedInputFiles": [ + "lib.d.ts", + "a.ts" + ], + "emittedFiles": [ + "a.js", + "a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.d.ts b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.js b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/noProjectOptionAndInputFiles.json b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/noProjectOptionAndInputFiles.json new file mode 100644 index 00000000000..32b8c5a28f7 --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/noProjectOptionAndInputFiles.json @@ -0,0 +1,14 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption/Test", + "baselineCheck": true, + "declaration": true, + "resolvedInputFiles": [ + "lib.d.ts", + "a.ts" + ], + "emittedFiles": [ + "a.js", + "a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/projectOptionTest/amd/Test/a.d.ts b/tests/baselines/reference/project/projectOptionTest/amd/Test/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/amd/Test/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/projectOptionTest/amd/Test/a.js b/tests/baselines/reference/project/projectOptionTest/amd/Test/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/amd/Test/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/projectOptionTest/amd/projectOptionTest.json b/tests/baselines/reference/project/projectOptionTest/amd/projectOptionTest.json new file mode 100644 index 00000000000..e2be92cb38a --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/amd/projectOptionTest.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption", + "baselineCheck": true, + "declaration": true, + "project": "Test", + "resolvedInputFiles": [ + "lib.d.ts", + "Test/a.ts" + ], + "emittedFiles": [ + "Test/a.js", + "Test/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/projectOptionTest/node/Test/a.d.ts b/tests/baselines/reference/project/projectOptionTest/node/Test/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/node/Test/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/projectOptionTest/node/Test/a.js b/tests/baselines/reference/project/projectOptionTest/node/Test/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/node/Test/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/projectOptionTest/node/projectOptionTest.json b/tests/baselines/reference/project/projectOptionTest/node/projectOptionTest.json new file mode 100644 index 00000000000..e2be92cb38a --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/node/projectOptionTest.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption", + "baselineCheck": true, + "declaration": true, + "project": "Test", + "resolvedInputFiles": [ + "lib.d.ts", + "Test/a.ts" + ], + "emittedFiles": [ + "Test/a.js", + "Test/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/cases/project/noProjectOptionAndInputFiles.json b/tests/cases/project/noProjectOptionAndInputFiles.json new file mode 100644 index 00000000000..b391da41dc3 --- /dev/null +++ b/tests/cases/project/noProjectOptionAndInputFiles.json @@ -0,0 +1,6 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption/Test", + "baselineCheck": true, + "declaration": true +} \ No newline at end of file diff --git a/tests/cases/project/projectOptionTest.json b/tests/cases/project/projectOptionTest.json new file mode 100644 index 00000000000..70ae0435eee --- /dev/null +++ b/tests/cases/project/projectOptionTest.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption", + "baselineCheck": true, + "declaration": true, + "project": "Test" +} \ No newline at end of file diff --git a/tests/cases/projects/projectOption/Test/a.ts b/tests/cases/projects/projectOption/Test/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/projectOption/Test/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/projectOption/Test/b.ts b/tests/cases/projects/projectOption/Test/b.ts new file mode 100644 index 00000000000..a6bd8e8d430 --- /dev/null +++ b/tests/cases/projects/projectOption/Test/b.ts @@ -0,0 +1 @@ +var test = 10; // Shouldnt get compiled so shouldnt error \ No newline at end of file diff --git a/tests/cases/projects/projectOption/Test/tsconfig.json b/tests/cases/projects/projectOption/Test/tsconfig.json new file mode 100644 index 00000000000..1c0fb803356 --- /dev/null +++ b/tests/cases/projects/projectOption/Test/tsconfig.json @@ -0,0 +1 @@ +{ "files": [ "a.ts" ] } \ No newline at end of file From 8aeff929a1b50ad01b23453c0cfa88874f89fdae Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 11:21:13 -0700 Subject: [PATCH 15/89] Add tests when same named .ts and .js file exist with tsconfig file specifying .ts file --- .gitignore | 10 ---------- .../amd/SameNameTsSpecified/a.d.ts | 1 + .../amd/SameNameTsSpecified/a.js | 1 + .../jsFileCompilationSameNameFilesSpecified.json | 15 +++++++++++++++ .../node/SameNameTsSpecified/a.d.ts | 1 + .../node/SameNameTsSpecified/a.js | 1 + .../jsFileCompilationSameNameFilesSpecified.json | 15 +++++++++++++++ .../jsFileCompilationSameNameFilesSpecified.json | 7 +++++++ .../jsFileCompilation/SameNameTsSpecified/a.js | 1 + .../jsFileCompilation/SameNameTsSpecified/a.ts | 1 + .../SameNameTsSpecified/tsconfig.json | 1 + 11 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/jsFileCompilationSameNameFilesSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/jsFileCompilationSameNameFilesSpecified.json create mode 100644 tests/cases/project/jsFileCompilationSameNameFilesSpecified.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameTsSpecified/tsconfig.json diff --git a/.gitignore b/.gitignore index 58a45545939..1bdbe078001 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,5 @@ node_modules/ built/* -tests/cases/*.js -tests/cases/*/*.js -tests/cases/*/*/*.js -tests/cases/*/*/*/*.js -tests/cases/*/*/*/*/*.js -tests/cases/*.js.map -tests/cases/*/*.js.map -tests/cases/*/*/*.js.map -tests/cases/*/*/*/*.js.map -tests/cases/*/*/*/*/*.js.map tests/cases/rwc/* tests/cases/test262/* tests/cases/perf/* diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/jsFileCompilationSameNameFilesSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/jsFileCompilationSameNameFilesSpecified.json new file mode 100644 index 00000000000..ddf148ea982 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/jsFileCompilationSameNameFilesSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameTsSpecified/a.ts" + ], + "emittedFiles": [ + "SameNameTsSpecified/a.js", + "SameNameTsSpecified/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/jsFileCompilationSameNameFilesSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/jsFileCompilationSameNameFilesSpecified.json new file mode 100644 index 00000000000..ddf148ea982 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/jsFileCompilationSameNameFilesSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameTsSpecified/a.ts" + ], + "emittedFiles": [ + "SameNameTsSpecified/a.js", + "SameNameTsSpecified/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesSpecified.json b/tests/cases/project/jsFileCompilationSameNameFilesSpecified.json new file mode 100644 index 00000000000..656c973a981 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameFilesSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecified" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.ts b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/tsconfig.json new file mode 100644 index 00000000000..1c0fb803356 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/tsconfig.json @@ -0,0 +1 @@ +{ "files": [ "a.ts" ] } \ No newline at end of file From 9daf635e5e612d7b7e2d110e258e0336e23978d9 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 11:50:12 -0700 Subject: [PATCH 16/89] Verify and fix scenario when .js and .ts files with same name are present and tsconfig doesnt specify any filenames --- src/compiler/commandLineParser.ts | 2 +- src/harness/projectsRunner.ts | 8 +++++++- .../amd/SameNameFilesNotSpecified/a.d.ts | 1 + .../amd/SameNameFilesNotSpecified/a.js | 1 + ...sFileCompilationSameNameFilesNotSpecified.json | 15 +++++++++++++++ .../node/SameNameFilesNotSpecified/a.d.ts | 1 + .../node/SameNameFilesNotSpecified/a.js | 1 + ...sFileCompilationSameNameFilesNotSpecified.json | 15 +++++++++++++++ ...sFileCompilationSameNameFilesNotSpecified.json | 7 +++++++ .../SameNameFilesNotSpecified/a.js | 1 + .../SameNameFilesNotSpecified/a.ts | 1 + .../SameNameFilesNotSpecified/tsconfig.json | 0 12 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/jsFileCompilationSameNameFilesNotSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/jsFileCompilationSameNameFilesNotSpecified.json create mode 100644 tests/cases/project/jsFileCompilationSameNameFilesNotSpecified.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/tsconfig.json diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 7b776f8c6e1..9283f8d939d 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -474,7 +474,7 @@ namespace ts { } else { let exclude = json["exclude"] instanceof Array ? map(json["exclude"], normalizeSlashes) : undefined; - let sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)); + let sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)).concat(host.readDirectory(basePath, ".js", exclude)); for (let i = 0; i < sysFiles.length; i++) { let name = sysFiles[i]; if (fileExtensionIs(name, ".js")) { diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index 8b30a8be37b..32e61cb8d7b 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -263,7 +263,13 @@ class ProjectRunner extends RunnerBase { } function readDirectory(rootDir: string, extension: string, exclude: string[]): string[] { - return Harness.IO.readDirectory(getFileNameInTheProjectTest(rootDir), extension, exclude); + let harnessReadDirectoryResult = Harness.IO.readDirectory(getFileNameInTheProjectTest(rootDir), extension, exclude); + let result: string[] = []; + for (let i = 0; i < harnessReadDirectoryResult.length; i++) { + result[i] = ts.getRelativePathToDirectoryOrUrl(testCase.projectRoot, harnessReadDirectoryResult[i], + getCurrentDirectory(), Harness.Compiler.getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + } + return result; } function fileExists(fileName: string): boolean { diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/jsFileCompilationSameNameFilesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/jsFileCompilationSameNameFilesNotSpecified.json new file mode 100644 index 00000000000..2b4d6b2b35a --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/jsFileCompilationSameNameFilesNotSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecified/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecified/a.js", + "SameNameFilesNotSpecified/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/jsFileCompilationSameNameFilesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/jsFileCompilationSameNameFilesNotSpecified.json new file mode 100644 index 00000000000..2b4d6b2b35a --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/jsFileCompilationSameNameFilesNotSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecified/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecified/a.js", + "SameNameFilesNotSpecified/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesNotSpecified.json b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecified.json new file mode 100644 index 00000000000..75582ff4402 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecified" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.ts b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/tsconfig.json new file mode 100644 index 00000000000..e69de29bb2d From 70d3de466880b5ebc7664c9a95ce12e24712cf14 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 12:38:11 -0700 Subject: [PATCH 17/89] When same named .d.ts and .js files are present and tscconfig contains .d.ts file --- .../amd/jsFileCompilationSameNameDTsSpecified.json | 12 ++++++++++++ .../node/jsFileCompilationSameNameDTsSpecified.json | 12 ++++++++++++ .../jsFileCompilationSameNameDTsSpecified.json | 7 +++++++ .../jsFileCompilation/SameNameDTsSpecified/a.d.ts | 1 + .../jsFileCompilation/SameNameDTsSpecified/a.js | 1 + .../SameNameDTsSpecified/tsconfig.json | 1 + 6 files changed, 34 insertions(+) create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json create mode 100644 tests/cases/project/jsFileCompilationSameNameDTsSpecified.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.d.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/tsconfig.json diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json new file mode 100644 index 00000000000..e0f30e0ed4f --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsSpecified/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json new file mode 100644 index 00000000000..e0f30e0ed4f --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsSpecified/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json b/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json new file mode 100644 index 00000000000..9d0ec128278 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecified" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.d.ts new file mode 100644 index 00000000000..d9e24d329b7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/tsconfig.json new file mode 100644 index 00000000000..e50280fa0d3 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/tsconfig.json @@ -0,0 +1 @@ +{ "files": [ "a.d.ts" ] } \ No newline at end of file From 0f73c1618c6da31a7d451c05f3d2c97b1fd1c93d Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 12:41:44 -0700 Subject: [PATCH 18/89] When folder contains .d.ts as well as .js of same name and tsconfig doesnt contain any name --- .../jsFileCompilationSameNameDtsNotSpecified.json | 12 ++++++++++++ .../jsFileCompilationSameNameDtsNotSpecified.json | 12 ++++++++++++ .../jsFileCompilationSameNameDtsNotSpecified.json | 7 +++++++ .../jsFileCompilation/SameNameDtsNotSpecified/a.d.ts | 1 + .../jsFileCompilation/SameNameDtsNotSpecified/a.js | 1 + .../SameNameDtsNotSpecified/tsconfig.json | 0 6 files changed, 33 insertions(+) create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json create mode 100644 tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json new file mode 100644 index 00000000000..4d345f51353 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecified/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json new file mode 100644 index 00000000000..4d345f51353 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecified/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json new file mode 100644 index 00000000000..cc11c7d2625 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecified" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts new file mode 100644 index 00000000000..16cb2db6fd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts @@ -0,0 +1 @@ +declare var a: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json new file mode 100644 index 00000000000..e69de29bb2d From dbb2772ed8af81e0356a8da91f0bcf10a2fc92bc Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 12:47:45 -0700 Subject: [PATCH 19/89] Tests when the .ts and .js files are mixed in compilation with tscconfig file specifying them --- ...jsFileCompilationDifferentNamesSpecified.json | 16 ++++++++++++++++ .../amd/test.d.ts | 2 ++ .../amd/test.js | 2 ++ ...jsFileCompilationDifferentNamesSpecified.json | 16 ++++++++++++++++ .../node/test.d.ts | 2 ++ .../node/test.js | 2 ++ ...jsFileCompilationDifferentNamesSpecified.json | 7 +++++++ .../DifferentNamesSpecified/a.ts | 1 + .../DifferentNamesSpecified/b.js | 1 + .../DifferentNamesSpecified/tsconfig.json | 4 ++++ 10 files changed, 53 insertions(+) create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js create mode 100644 tests/cases/project/jsFileCompilationDifferentNamesSpecified.json create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/b.js create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/tsconfig.json diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json new file mode 100644 index 00000000000..0ba5af91d21 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesSpecified/a.ts", + "DifferentNamesSpecified/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts new file mode 100644 index 00000000000..bbae04a30bf --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts @@ -0,0 +1,2 @@ +declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js new file mode 100644 index 00000000000..f2115703462 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json new file mode 100644 index 00000000000..0ba5af91d21 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesSpecified/a.ts", + "DifferentNamesSpecified/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts new file mode 100644 index 00000000000..bbae04a30bf --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts @@ -0,0 +1,2 @@ +declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js new file mode 100644 index 00000000000..f2115703462 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json b/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json new file mode 100644 index 00000000000..d23706bab94 --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecified" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/b.js new file mode 100644 index 00000000000..9fdf6253b80 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/b.js @@ -0,0 +1 @@ +var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/tsconfig.json new file mode 100644 index 00000000000..582826bdceb --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { "out": "test.js" }, + "files": [ "a.ts", "b.js" ] +} \ No newline at end of file From 14b608241dad8212b374e7529876a6d29dba35e8 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 12:52:33 -0700 Subject: [PATCH 20/89] Tests when the .ts and .js files are mixed in compilation with tscconfig file doesnt specifying any names --- ...ileCompilationDifferentNamesNotSpecified.json | 16 ++++++++++++++++ .../amd/test.d.ts | 2 ++ .../amd/test.js | 2 ++ ...ileCompilationDifferentNamesNotSpecified.json | 16 ++++++++++++++++ .../node/test.d.ts | 2 ++ .../node/test.js | 2 ++ ...ileCompilationDifferentNamesNotSpecified.json | 7 +++++++ .../DifferentNamesNotSpecified/a.ts | 1 + .../DifferentNamesNotSpecified/b.js | 1 + .../DifferentNamesNotSpecified/tsconfig.json | 3 +++ 10 files changed, 52 insertions(+) create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js create mode 100644 tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 00000000000..7a7e0b2c453 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecified/a.ts", + "DifferentNamesNotSpecified/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts new file mode 100644 index 00000000000..bbae04a30bf --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts @@ -0,0 +1,2 @@ +declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js new file mode 100644 index 00000000000..f2115703462 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 00000000000..7a7e0b2c453 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecified/a.ts", + "DifferentNamesNotSpecified/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts new file mode 100644 index 00000000000..bbae04a30bf --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts @@ -0,0 +1,2 @@ +declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js new file mode 100644 index 00000000000..f2115703462 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 00000000000..43fe621e065 --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js new file mode 100644 index 00000000000..9fdf6253b80 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js @@ -0,0 +1 @@ +var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json new file mode 100644 index 00000000000..1b726957fdd --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json @@ -0,0 +1,3 @@ +{ + "compilerOptions": { "out": "test.js" } +} \ No newline at end of file From 2860435a2eb31e4a90fd86a2e04b8f900621aac6 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 13:18:29 -0700 Subject: [PATCH 21/89] Do not emit javascript files --- src/compiler/declarationEmitter.ts | 2 +- src/compiler/emitter.ts | 6 ++++-- src/compiler/utilities.ts | 2 +- .../getEmitOutputWithDeclarationFile3.baseline | 1 - ...CompilationAmbientVarDeclarationSyntax.errors.txt | 2 -- .../jsFileCompilationDecoratorSyntax.errors.txt | 2 -- .../reference/jsFileCompilationEmitDeclarations.js | 3 --- .../jsFileCompilationEmitTrippleSlashReference.js | 7 ------- .../reference/jsFileCompilationEnumSyntax.errors.txt | 2 -- ...sFileCompilationExportAssignmentSyntax.errors.txt | 2 -- ...CompilationHeritageClauseSyntaxOfClass.errors.txt | 2 -- .../jsFileCompilationImportEqualsSyntax.errors.txt | 2 -- .../jsFileCompilationInterfaceSyntax.errors.txt | 2 -- .../jsFileCompilationModuleSyntax.errors.txt | 2 -- .../jsFileCompilationOptionalParameter.errors.txt | 2 -- ...jsFileCompilationPropertySyntaxOfClass.errors.txt | 2 -- ...leCompilationPublicMethodSyntaxOfClass.errors.txt | 2 -- ...FileCompilationPublicParameterModifier.errors.txt | 2 -- .../reference/jsFileCompilationRestParameter.js | 1 - ...eCompilationReturnTypeSyntaxOfFunction.errors.txt | 2 -- .../jsFileCompilationSyntaxError.errors.txt | 2 -- .../jsFileCompilationTypeAliasSyntax.errors.txt | 2 -- ...ileCompilationTypeArgumentSyntaxOfCall.errors.txt | 2 -- .../jsFileCompilationTypeAssertions.errors.txt | 2 -- .../jsFileCompilationTypeOfParameter.errors.txt | 2 -- ...eCompilationTypeParameterSyntaxOfClass.errors.txt | 2 -- ...mpilationTypeParameterSyntaxOfFunction.errors.txt | 2 -- .../jsFileCompilationTypeSyntaxOfVar.errors.txt | 2 -- .../baselines/reference/jsFileCompilationWithOut.js | 2 -- .../reference/jsFileCompilationWithoutOut.errors.txt | 12 ------------ .../reference/jsFileCompilationWithoutOut.symbols | 10 ++++++++++ .../reference/jsFileCompilationWithoutOut.types | 10 ++++++++++ .../amd/test.d.ts | 1 - .../amd/test.js | 1 - .../node/test.d.ts | 1 - .../node/test.js | 1 - .../amd/test.d.ts | 1 - .../amd/test.js | 1 - .../node/test.d.ts | 1 - .../node/test.js | 1 - 40 files changed, 26 insertions(+), 80 deletions(-) delete mode 100644 tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithoutOut.symbols create mode 100644 tests/baselines/reference/jsFileCompilationWithoutOut.types diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index e5914d10060..03d2e0453b1 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -104,7 +104,7 @@ namespace ts { // Emit references corresponding to this file let emittedReferencedFiles: SourceFile[] = []; forEach(host.getSourceFiles(), sourceFile => { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { + if (!isExternalModuleOrDeclarationFile(sourceFile) && !isJavaScript(sourceFile.fileName)) { // Check what references need to be added if (!compilerOptions.noResolve) { forEach(sourceFile.referencedFiles, fileReference => { diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 56e996662c8..bb9cb0a44e5 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -88,7 +88,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, shouldEmitJsx(targetSourceFile) ? ".jsx" : ".js"); emitFile(jsFilePath, targetSourceFile); } - else if (!isDeclarationFile(targetSourceFile) && (compilerOptions.outFile || compilerOptions.out)) { + else if (!isDeclarationFile(targetSourceFile) && + !isJavaScript(targetSourceFile.fileName) && + (compilerOptions.outFile || compilerOptions.out)) { emitFile(compilerOptions.outFile || compilerOptions.out); } } @@ -199,7 +201,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else { forEach(host.getSourceFiles(), sourceFile => { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { + if (!isJavaScript(sourceFile.fileName) && !isExternalModuleOrDeclarationFile(sourceFile)) { emitSourceFile(sourceFile); } }); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index cae0923094c..696d2f481e0 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1778,7 +1778,7 @@ namespace ts { } export function shouldEmitToOwnFile(sourceFile: SourceFile, compilerOptions: CompilerOptions): boolean { - if (!isDeclarationFile(sourceFile)) { + if (!isDeclarationFile(sourceFile) && !isJavaScript(sourceFile.fileName)) { if ((isExternalModule(sourceFile) || !(compilerOptions.outFile || compilerOptions.out))) { // 1. in-browser single file compilation scenario // 2. non supported extension file diff --git a/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline b/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline index e99a1023070..1ce3d9f33c3 100644 --- a/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline +++ b/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline @@ -2,5 +2,4 @@ EmitSkipped: false FileName : declSingle.js var x = "hello"; var x1 = 1000; -var x2 = 1000; diff --git a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt index d3175d9f116..a210385d996 100644 --- a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== declare var v; ~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt index 80fb4ded96d..6017ddc7a11 100644 --- a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8017: 'decorators' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== @internal class C { } ~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.js b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js index c6711e4e85f..4c9f6802fd9 100644 --- a/tests/baselines/reference/jsFileCompilationEmitDeclarations.js +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js @@ -15,11 +15,8 @@ var c = (function () { } return c; })(); -function foo() { -} //// [out.d.ts] declare class c { } -declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js index 04f36213b1b..33077f3038f 100644 --- a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js @@ -19,15 +19,8 @@ var c = (function () { } return c; })(); -function bar() { -} -/// -function foo() { -} //// [out.d.ts] declare class c { } -declare function bar(): void; -declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt index bc0bb189c95..6b9d97e55bb 100644 --- a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== enum E { } ~ diff --git a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt index f64628d3bc9..a349e2bca13 100644 --- a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== export = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt index cf030d3c4f2..df014047b35 100644 --- a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C implements D { } ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt index 54314ef431e..e53bf2ac860 100644 --- a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== import a = b; ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt index 07fc015fc72..c46c3c05b3f 100644 --- a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== interface I { } ~ diff --git a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt index e63eede29bd..8748064cc96 100644 --- a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== module M { } ~ diff --git a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt index 1eefd3b8eae..68b131d39f9 100644 --- a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== function F(p?) { } ~ diff --git a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt index 613dc7a51a3..0ecf6f3c666 100644 --- a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,11): error TS8014: 'property declarations' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C { v } ~ diff --git a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt index 8585285c1ed..907775c7be6 100644 --- a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C { public foo() { diff --git a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt index aac386f2dd1..e5072278f4c 100644 --- a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C { constructor(public x) { }} ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationRestParameter.js b/tests/baselines/reference/jsFileCompilationRestParameter.js index bcba97af024..d28299c543a 100644 --- a/tests/baselines/reference/jsFileCompilationRestParameter.js +++ b/tests/baselines/reference/jsFileCompilationRestParameter.js @@ -2,4 +2,3 @@ function foo(...a) { } //// [b.js] -function foo(...a) { } diff --git a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt index 48528b14531..50746dcfc82 100644 --- a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== function F(): number { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt index d742e68dbdc..1ca6e251788 100644 --- a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt +++ b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(3,6): error TS1223: 'type' tag already specified. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== /** * @type {number} diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt index 3afd84da9be..6af5751ea85 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8008: 'type aliases' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== type a = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt index 78a92e9460a..cade211aa63 100644 --- a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,5): error TS8011: 'type arguments' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== Foo(); ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index d7c8faab8dc..de1e1038db6 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== var v = undefined; ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt index 41638f51077..ae3fd23c6ef 100644 --- a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== function F(a: number) { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt index 6267d2f37fe..708ff378137 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt index 4a5e222058b..391e8f476da 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== function F() { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt index ceef95023df..a4486a5d49d 100644 --- a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -1,8 +1,6 @@ -error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5054: Could not write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== var v: () => number; ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationWithOut.js b/tests/baselines/reference/jsFileCompilationWithOut.js index 32d0261061f..7bab7b973ab 100644 --- a/tests/baselines/reference/jsFileCompilationWithOut.js +++ b/tests/baselines/reference/jsFileCompilationWithOut.js @@ -15,5 +15,3 @@ var c = (function () { } return c; })(); -function foo() { -} diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt deleted file mode 100644 index 32a60df0996..00000000000 --- a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5054: Could not write file 'tests/cases/compiler/b.js' which is one of the input files. - - -!!! error TS5054: Could not write file 'tests/cases/compiler/b.js' which is one of the input files. -==== tests/cases/compiler/a.ts (0 errors) ==== - class c { - } - -==== tests/cases/compiler/b.js (0 errors) ==== - function foo() { - } - \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.symbols b/tests/baselines/reference/jsFileCompilationWithoutOut.symbols new file mode 100644 index 00000000000..5260b8d6cf3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.js === +function foo() { +>foo : Symbol(foo, Decl(b.js, 0, 0)) +} + diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.types b/tests/baselines/reference/jsFileCompilationWithoutOut.types new file mode 100644 index 00000000000..dce83eeb8eb --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.js === +function foo() { +>foo : () => void +} + diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts index bbae04a30bf..4c0b8989316 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts @@ -1,2 +1 @@ declare var test: number; -declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js index f2115703462..e757934f20c 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js @@ -1,2 +1 @@ var test = 10; -var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts index bbae04a30bf..4c0b8989316 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts @@ -1,2 +1 @@ declare var test: number; -declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js index f2115703462..e757934f20c 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js @@ -1,2 +1 @@ var test = 10; -var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts index bbae04a30bf..4c0b8989316 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts @@ -1,2 +1 @@ declare var test: number; -declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js index f2115703462..e757934f20c 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js @@ -1,2 +1 @@ var test = 10; -var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts index bbae04a30bf..4c0b8989316 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts @@ -1,2 +1 @@ declare var test: number; -declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js index f2115703462..e757934f20c 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js @@ -1,2 +1 @@ var test = 10; -var test2 = 10; // Should get compiled From 68c65cd29e658a9c24e096dbe3f8df0e1b0894ed Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 13:22:10 -0700 Subject: [PATCH 22/89] Test case when one of the input file is output file name --- ...lationWithOutFileNameSameAsInputJsFile.errors.txt | 12 ++++++++++++ ...ileCompilationWithOutFileNameSameAsInputJsFile.ts | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt create mode 100644 tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt new file mode 100644 index 00000000000..32a60df0996 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@ -0,0 +1,12 @@ +error TS5054: Could not write file 'tests/cases/compiler/b.js' which is one of the input files. + + +!!! error TS5054: Could not write file 'tests/cases/compiler/b.js' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts new file mode 100644 index 00000000000..da7d99dc5e7 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts @@ -0,0 +1,8 @@ +// @out: tests/cases/compiler/b.js +// @filename: a.ts +class c { +} + +// @filename: b.js +function foo() { +} From fce9f32bd452f6e3ccd9345c367512a5b36e4fb1 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 13:57:51 -0700 Subject: [PATCH 23/89] When tsconfig file doesnt contain file names, consume .js files of directory only if specified in the options --- src/compiler/commandLineParser.ts | 12 ++++++++++-- src/compiler/types.ts | 3 ++- ...ileCompilationDifferentNamesNotSpecified.json | 3 +-- ...ileCompilationDifferentNamesNotSpecified.json | 3 +-- ...erentNamesNotSpecifiedWithConsumeJsFiles.json | 16 ++++++++++++++++ .../amd/test.d.ts | 1 + .../amd/test.js | 1 + ...erentNamesNotSpecifiedWithConsumeJsFiles.json | 16 ++++++++++++++++ .../node/test.d.ts | 1 + .../node/test.js | 1 + ...ameNameDtsNotSpecifiedWithConsumeJsFiles.json | 12 ++++++++++++ ...ameNameDtsNotSpecifiedWithConsumeJsFiles.json | 12 ++++++++++++ .../a.d.ts | 1 + .../a.js | 1 + ...eNameFilesNotSpecifiedWithConsumeJsFiles.json | 15 +++++++++++++++ .../a.d.ts | 1 + .../a.js | 1 + ...eNameFilesNotSpecifiedWithConsumeJsFiles.json | 15 +++++++++++++++ ...erentNamesNotSpecifiedWithConsumeJsFiles.json | 7 +++++++ ...ameNameDtsNotSpecifiedWithConsumeJsFiles.json | 7 +++++++ ...eNameFilesNotSpecifiedWithConsumeJsFiles.json | 7 +++++++ .../DifferentNamesNotSpecified/b.js | 2 +- .../a.ts | 1 + .../b.js | 1 + .../tsconfig.json | 6 ++++++ .../a.d.ts | 1 + .../a.js | 1 + .../tsconfig.json | 1 + .../a.js | 1 + .../a.ts | 1 + .../tsconfig.json | 1 + 31 files changed, 144 insertions(+), 8 deletions(-) create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.js create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/tsconfig.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.d.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/tsconfig.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/tsconfig.json diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 9283f8d939d..09dea3cc844 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -245,6 +245,10 @@ namespace ts { }, description: Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6, error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic, + }, + { + name: "consumeJsFiles", + type: "boolean", } ]; @@ -414,8 +418,9 @@ namespace ts { export function parseConfigFile(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine { let errors: Diagnostic[] = []; + let options = getCompilerOptions(); return { - options: getCompilerOptions(), + options, fileNames: getFileNames(), errors }; @@ -474,7 +479,10 @@ namespace ts { } else { let exclude = json["exclude"] instanceof Array ? map(json["exclude"], normalizeSlashes) : undefined; - let sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)).concat(host.readDirectory(basePath, ".js", exclude)); + let sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)); + if (options.consumeJsFiles) { + sysFiles = sysFiles.concat(host.readDirectory(basePath, ".js", exclude)); + } for (let i = 0; i < sysFiles.length; i++) { let name = sysFiles[i]; if (fileExtensionIs(name, ".js")) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d2757bb7937..9cd00247593 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2061,7 +2061,8 @@ namespace ts { experimentalDecorators?: boolean; experimentalAsyncFunctions?: boolean; emitDecoratorMetadata?: boolean; - moduleResolution?: ModuleResolutionKind + moduleResolution?: ModuleResolutionKind; + consumeJsFiles?: boolean; /* @internal */ stripInternal?: boolean; // Skip checking lib.d.ts to help speed up tests. diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json index 7a7e0b2c453..6d04c74fa38 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json @@ -6,8 +6,7 @@ "project": "DifferentNamesNotSpecified", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesNotSpecified/a.ts", - "DifferentNamesNotSpecified/b.js" + "DifferentNamesNotSpecified/a.ts" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json index 7a7e0b2c453..6d04c74fa38 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json @@ -6,8 +6,7 @@ "project": "DifferentNamesNotSpecified", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesNotSpecified/a.ts", - "DifferentNamesNotSpecified/b.js" + "DifferentNamesNotSpecified/a.ts" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..c2cd78e8118 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecifiedWithConsumeJsFiles", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts", + "DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..c2cd78e8118 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecifiedWithConsumeJsFiles", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts", + "DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..99a11e4722c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithConsumeJsFiles", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecifiedWithConsumeJsFiles/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..99a11e4722c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithConsumeJsFiles", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecifiedWithConsumeJsFiles/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..0970535d97a --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecifiedWithConsumeJsFiles", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js", + "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..0970535d97a --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecifiedWithConsumeJsFiles", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js", + "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..0571c55820f --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecifiedWithConsumeJsFiles" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..a938517114c --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithConsumeJsFiles" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json new file mode 100644 index 00000000000..d8cb3f952ba --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecifiedWithConsumeJsFiles" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js index 9fdf6253b80..7ba71c35654 100644 --- a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js @@ -1 +1 @@ -var test2 = 10; // Should get compiled \ No newline at end of file +var test2 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js new file mode 100644 index 00000000000..9fdf6253b80 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js @@ -0,0 +1 @@ +var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/tsconfig.json new file mode 100644 index 00000000000..9be9952dd2b --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "out": "test.js", + "consumeJsFiles": true + } +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.d.ts new file mode 100644 index 00000000000..16cb2db6fd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.d.ts @@ -0,0 +1 @@ +declare var a: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.js b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/tsconfig.json new file mode 100644 index 00000000000..df05c5d4d52 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "consumeJsFiles": true } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/tsconfig.json new file mode 100644 index 00000000000..df05c5d4d52 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "consumeJsFiles": true } } \ No newline at end of file From e32c920cc2f7c00736007c952616491eabb10117 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 14:02:20 -0700 Subject: [PATCH 24/89] Corrected scenario names in the test cases --- .../amd/jsFileCompilationDifferentNamesNotSpecified.json | 2 +- .../node/jsFileCompilationDifferentNamesNotSpecified.json | 2 +- .../amd/jsFileCompilationDifferentNamesSpecified.json | 2 +- .../node/jsFileCompilationDifferentNamesSpecified.json | 2 +- .../amd/jsFileCompilationSameNameDTsSpecified.json | 2 +- .../node/jsFileCompilationSameNameDTsSpecified.json | 2 +- .../amd/jsFileCompilationSameNameDtsNotSpecified.json | 2 +- .../node/jsFileCompilationSameNameDtsNotSpecified.json | 2 +- ...ileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json | 2 +- ...ileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json | 2 +- .../project/jsFileCompilationDifferentNamesNotSpecified.json | 2 +- .../cases/project/jsFileCompilationDifferentNamesSpecified.json | 2 +- tests/cases/project/jsFileCompilationSameNameDTsSpecified.json | 2 +- .../cases/project/jsFileCompilationSameNameDtsNotSpecified.json | 2 +- ...ileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json index 6d04c74fa38..0729dbedfae 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json index 6d04c74fa38..0729dbedfae 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json index 0ba5af91d21..555acda2cd6 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json index 0ba5af91d21..555acda2cd6 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json index e0f30e0ed4f..d0ffac121e4 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json index e0f30e0ed4f..d0ffac121e4 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json index 4d345f51353..a619f0e1e22 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json index 4d345f51353..a619f0e1e22 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json index 99a11e4722c..4a3803ead63 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json index 99a11e4722c..4a3803ead63 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json index 43fe621e065..253d6f0f1d4 100644 --- a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json +++ b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json b/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json index d23706bab94..a8b00875214 100644 --- a/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json b/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json index 9d0ec128278..5f484c20e30 100644 --- a/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json +++ b/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json index cc11c7d2625..7b4a7efc042 100644 --- a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json +++ b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json index a938517114c..41a19f64c5c 100644 --- a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json +++ b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json @@ -1,5 +1,5 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, From 60e15b267dba291107a4200120ef7eda3ca4ab39 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 15:11:11 -0700 Subject: [PATCH 25/89] Report error when emitting declarations if the reference is to .js file --- src/compiler/declarationEmitter.ts | 40 ++++++++++++------- .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 ++ ...onsWithJsFileReferenceWithNoOut.errors.txt | 18 +++++++++ ...eclarationsWithJsFileReferenceWithNoOut.js | 32 +++++++++++++++ ...tionsWithJsFileReferenceWithOut.errors.txt | 18 +++++++++ ...nDeclarationsWithJsFileReferenceWithOut.js | 26 ++++++++++++ ...eclarationsWithJsFileReferenceWithNoOut.js | 27 +++++++++++++ ...ationsWithJsFileReferenceWithNoOut.symbols | 16 ++++++++ ...arationsWithJsFileReferenceWithNoOut.types | 16 ++++++++ ...tDeclarationsWithJsFileReferenceWithOut.js | 26 ++++++++++++ ...arationsWithJsFileReferenceWithOut.symbols | 16 ++++++++ ...clarationsWithJsFileReferenceWithOut.types | 16 ++++++++ ...eclarationsWithJsFileReferenceWithNoOut.ts | 14 +++++++ ...nDeclarationsWithJsFileReferenceWithOut.ts | 15 +++++++ ...eclarationsWithJsFileReferenceWithNoOut.ts | 13 ++++++ ...tDeclarationsWithJsFileReferenceWithOut.ts | 14 +++++++ 17 files changed, 298 insertions(+), 14 deletions(-) create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js create mode 100644 tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js create mode 100644 tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.symbols create mode 100644 tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.types create mode 100644 tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js create mode 100644 tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.symbols create mode 100644 tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.types create mode 100644 tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts create mode 100644 tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts create mode 100644 tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts create mode 100644 tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 03d2e0453b1..9ebca239758 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -68,16 +68,22 @@ namespace ts { if (!compilerOptions.noResolve) { let addedGlobalFileReference = false; forEach(root.referencedFiles, fileReference => { - let referencedFile = tryResolveScriptReference(host, root, fileReference); + if (isJavaScript(fileReference.fileName)) { + reportedDeclarationError = true; + diagnostics.push(createFileDiagnostic(root, fileReference.pos, fileReference.end - fileReference.pos, Diagnostics.js_file_cannot_be_referenced_in_ts_file_when_emitting_declarations)); + } + else { + let referencedFile = tryResolveScriptReference(host, root, fileReference); - // All the references that are not going to be part of same file - if (referencedFile && ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference - shouldEmitToOwnFile(referencedFile, compilerOptions) || // This is referenced file is emitting its own js file - !addedGlobalFileReference)) { // Or the global out file corresponding to this reference was not added + // All the references that are not going to be part of same file + if (referencedFile && ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference + shouldEmitToOwnFile(referencedFile, compilerOptions) || // This is referenced file is emitting its own js file + !addedGlobalFileReference)) { // Or the global out file corresponding to this reference was not added - writeReferencePath(referencedFile); - if (!isExternalModuleOrDeclarationFile(referencedFile)) { - addedGlobalFileReference = true; + writeReferencePath(referencedFile); + if (!isExternalModuleOrDeclarationFile(referencedFile)) { + addedGlobalFileReference = true; + } } } }); @@ -108,14 +114,20 @@ namespace ts { // Check what references need to be added if (!compilerOptions.noResolve) { forEach(sourceFile.referencedFiles, fileReference => { - let referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); + if (isJavaScript(fileReference.fileName)) { + reportedDeclarationError = true; + diagnostics.push(createFileDiagnostic(sourceFile, fileReference.pos, fileReference.end - fileReference.pos, Diagnostics.js_file_cannot_be_referenced_in_ts_file_when_emitting_declarations)); + } + else { + let referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); - // If the reference file is a declaration file or an external module, emit that reference - if (referencedFile && (isExternalModuleOrDeclarationFile(referencedFile) && - !contains(emittedReferencedFiles, referencedFile))) { // If the file reference was not already emitted + // If the reference file is a declaration file or an external module, emit that reference + if (referencedFile && (isExternalModuleOrDeclarationFile(referencedFile) && + !contains(emittedReferencedFiles, referencedFile))) { // If the file reference was not already emitted - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); + writeReferencePath(referencedFile); + emittedReferencedFiles.push(referencedFile); + } } }); } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index ced0dd6d87c..610ee7e1125 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -611,6 +611,7 @@ namespace ts { enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: DiagnosticCategory.Error, key: "'enum declarations' can only be used in a .ts file." }, type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: DiagnosticCategory.Error, key: "'type assertion expressions' can only be used in a .ts file." }, decorators_can_only_be_used_in_a_ts_file: { code: 8017, category: DiagnosticCategory.Error, key: "'decorators' can only be used in a .ts file." }, + js_file_cannot_be_referenced_in_ts_file_when_emitting_declarations: { code: 8018, category: DiagnosticCategory.Error, key: ".js file cannot be referenced in .ts file when emitting declarations." }, Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: DiagnosticCategory.Error, key: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." }, class_expressions_are_not_currently_supported: { code: 9003, category: DiagnosticCategory.Error, key: "'class' expressions are not currently supported." }, JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: DiagnosticCategory.Error, key: "JSX attributes must only be assigned a non-empty 'expression'." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index aaac6284f7d..5d40a1e5ab2 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2438,6 +2438,10 @@ "category": "Error", "code": 8017 }, + ".js file cannot be referenced in .ts file when emitting declarations.": { + "category": "Error", + "code": 8018 + }, "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.": { "category": "Error", diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt new file mode 100644 index 00000000000..1d6ddb3ed30 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -0,0 +1,18 @@ +tests/cases/compiler/b.ts(1,1): error TS8018: .js file cannot be referenced in .ts file when emitting declarations. + + +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (1 errors) ==== + /// + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS8018: .js file cannot be referenced in .ts file when emitting declarations. + // error on above reference path when emitting declarations + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js new file mode 100644 index 00000000000..6bd76de881b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +// error on above reference path when emitting declarations +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//// [b.js] +/// +// error on above reference path when emitting declarations +function foo() { +} + + +//// [a.d.ts] +declare class c { +} diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt new file mode 100644 index 00000000000..a658130e10a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt @@ -0,0 +1,18 @@ +tests/cases/compiler/b.ts(1,1): error TS8018: .js file cannot be referenced in .ts file when emitting declarations. + + +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (1 errors) ==== + /// + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS8018: .js file cannot be referenced in .ts file when emitting declarations. + // error on above reference when emitting declarations + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js new file mode 100644 index 00000000000..99dd961db4c --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +// error on above reference when emitting declarations +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +/// +// error on above reference when emitting declarations +function foo() { +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js new file mode 100644 index 00000000000..2d844207986 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +// no error on above reference path since not emitting declarations +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//// [b.js] +/// +// no error on above reference path since not emitting declarations +function foo() { +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.symbols b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.symbols new file mode 100644 index 00000000000..06b80b144a4 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.ts === +/// +// no error on above reference path since not emitting declarations +function foo() { +>foo : Symbol(foo, Decl(b.ts, 0, 0)) +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : Symbol(bar, Decl(c.js, 0, 0)) +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.types b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.types new file mode 100644 index 00000000000..ea9b48061c3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.types @@ -0,0 +1,16 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.ts === +/// +// no error on above reference path since not emitting declarations +function foo() { +>foo : () => void +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : () => void +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js new file mode 100644 index 00000000000..55412253441 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +//no error on above reference since not emitting declarations +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +/// +//no error on above reference since not emitting declarations +function foo() { +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.symbols b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.symbols new file mode 100644 index 00000000000..2f3cf3e0785 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.ts === +/// +//no error on above reference since not emitting declarations +function foo() { +>foo : Symbol(foo, Decl(b.ts, 0, 0)) +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : Symbol(bar, Decl(c.js, 0, 0)) +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.types b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.types new file mode 100644 index 00000000000..cd9a6dfafba --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.types @@ -0,0 +1,16 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.ts === +/// +//no error on above reference since not emitting declarations +function foo() { +>foo : () => void +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : () => void +} diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts new file mode 100644 index 00000000000..f02035c3f65 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts @@ -0,0 +1,14 @@ +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +// error on above reference path when emitting declarations +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts new file mode 100644 index 00000000000..04945af8205 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts @@ -0,0 +1,15 @@ +// @out: out.js +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +// error on above reference when emitting declarations +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts new file mode 100644 index 00000000000..fc6acef20ee --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts @@ -0,0 +1,13 @@ +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +// no error on above reference path since not emitting declarations +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts new file mode 100644 index 00000000000..3ed1ca1039d --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts @@ -0,0 +1,14 @@ +// @out: out.js +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +//no error on above reference since not emitting declarations +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file From c30104e3b6e19a902d977ce19f0f58a5770e6fa1 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 21 Sep 2015 15:39:53 -0700 Subject: [PATCH 26/89] Add option --jsExtensions to handle extensions to treat as javascript - Command line now takes --jsExtension multiple times or comma separated list of extensions - tsconfig accepts array of extension strings --- src/compiler/commandLineParser.ts | 217 ++++++++++++------ src/compiler/core.ts | 10 +- .../diagnosticInformationMap.generated.ts | 3 + src/compiler/diagnosticMessages.json | 12 + src/compiler/parser.ts | 2 +- src/compiler/program.ts | 79 +++---- src/compiler/tsc.ts | 12 +- src/compiler/types.ts | 8 +- src/compiler/utilities.ts | 15 +- src/harness/compilerRunner.ts | 2 +- src/harness/harness.ts | 28 +-- src/harness/projectsRunner.ts | 38 +-- src/services/services.ts | 2 +- ...eCompilationWithoutJsExtensions.errors.txt | 6 + .../amd/invalidRootFile.errors.txt | 4 +- .../node/invalidRootFile.errors.txt | 4 +- ...entNamesNotSpecifiedWithJsExtensions.json} | 8 +- .../amd/test.d.ts | 0 .../amd/test.js | 0 ...entNamesNotSpecifiedWithJsExtensions.json} | 8 +- .../node/test.d.ts | 0 .../node/test.js | 0 ...pilationDifferentNamesSpecified.errors.txt | 6 + ...ileCompilationDifferentNamesSpecified.json | 3 +- ...pilationDifferentNamesSpecified.errors.txt | 6 + ...ileCompilationDifferentNamesSpecified.json | 3 +- ...fferentNamesSpecifiedWithJsExtensions.json | 16 ++ .../amd/test.d.ts} | 0 .../amd/test.js} | 0 ...fferentNamesSpecifiedWithJsExtensions.json | 16 ++ .../node/test.d.ts} | 0 .../node/test.js} | 0 ...SameNameDTsSpecifiedWithJsExtensions.json} | 6 +- ...SameNameDTsSpecifiedWithJsExtensions.json} | 6 +- ...meNameDtsNotSpecifiedWithJsExtensions.json | 12 + ...meNameDtsNotSpecifiedWithJsExtensions.json | 12 + ...meFilesNotSpecifiedWithConsumeJsFiles.json | 15 -- ...meFilesNotSpecifiedWithConsumeJsFiles.json | 15 -- .../a.d.ts | 1 + .../a.js | 1 + ...NameFilesNotSpecifiedWithJsExtensions.json | 15 ++ .../a.d.ts | 1 + .../a.js | 1 + ...NameFilesNotSpecifiedWithJsExtensions.json | 15 ++ .../a.d.ts | 1 + .../SameNameTsSpecifiedWithJsExtensions/a.js | 1 + ...ameNameFilesSpecifiedWithJsExtensions.json | 15 ++ .../a.d.ts | 1 + .../SameNameTsSpecifiedWithJsExtensions/a.js | 1 + ...ameNameFilesSpecifiedWithJsExtensions.json | 15 ++ ...eCompilationAmbientVarDeclarationSyntax.ts | 1 + .../jsFileCompilationDecoratorSyntax.ts | 1 + .../jsFileCompilationEmitDeclarations.ts | 1 + ...ileCompilationEmitTrippleSlashReference.ts | 1 + .../compiler/jsFileCompilationEnumSyntax.ts | 1 + ...eclarationsWithJsFileReferenceWithNoOut.ts | 1 + ...nDeclarationsWithJsFileReferenceWithOut.ts | 1 + ...jsFileCompilationExportAssignmentSyntax.ts | 1 + ...eCompilationHeritageClauseSyntaxOfClass.ts | 1 + .../jsFileCompilationImportEqualsSyntax.ts | 1 + .../jsFileCompilationInterfaceSyntax.ts | 1 + .../compiler/jsFileCompilationModuleSyntax.ts | 1 + ...eclarationsWithJsFileReferenceWithNoOut.ts | 1 + ...tDeclarationsWithJsFileReferenceWithOut.ts | 1 + .../jsFileCompilationOptionalParameter.ts | 1 + .../jsFileCompilationPropertySyntaxOfClass.ts | 1 + ...ileCompilationPublicMethodSyntaxOfClass.ts | 1 + ...sFileCompilationPublicParameterModifier.ts | 1 + .../jsFileCompilationRestParameter.ts | 1 + ...leCompilationReturnTypeSyntaxOfFunction.ts | 1 + .../compiler/jsFileCompilationSyntaxError.ts | 1 + .../jsFileCompilationTypeAliasSyntax.ts | 1 + ...FileCompilationTypeArgumentSyntaxOfCall.ts | 1 + .../jsFileCompilationTypeAssertions.ts | 1 + .../jsFileCompilationTypeOfParameter.ts | 1 + ...leCompilationTypeParameterSyntaxOfClass.ts | 1 + ...ompilationTypeParameterSyntaxOfFunction.ts | 1 + .../jsFileCompilationTypeSyntaxOfVar.ts | 1 + .../compiler/jsFileCompilationWithOut.ts | 1 + ...ilationWithOutFileNameSameAsInputJsFile.ts | 1 + .../jsFileCompilationWithoutJsExtensions.ts | 2 + .../compiler/jsFileCompilationWithoutOut.ts | 1 + ...entNamesNotSpecifiedWithJsExtensions.json} | 4 +- ...fferentNamesSpecifiedWithJsExtensions.json | 7 + ...SameNameDTsSpecifiedWithJsExtensions.json} | 4 +- ...meNameDtsNotSpecifiedWithJsExtensions.json | 7 + ...ameFilesNotSpecifiedWithJsExtensions.json} | 4 +- ...ameNameFilesSpecifiedWithJsExtensions.json | 7 + .../a.ts | 0 .../b.js | 0 .../tsconfig.json | 2 +- .../a.ts | 0 .../b.js | 1 + .../tsconfig.json | 7 + .../a.d.ts | 1 + .../a.js | 0 .../tsconfig.json | 4 + .../tsconfig.json | 1 - .../a.d.ts | 0 .../a.js | 0 .../tsconfig.json | 1 + .../tsconfig.json | 1 - .../a.js | 1 + .../a.ts | 1 + .../tsconfig.json | 1 + .../SameNameTsSpecifiedWithJsExtensions/a.js | 1 + .../SameNameTsSpecifiedWithJsExtensions/a.ts | 1 + .../tsconfig.json | 4 + tests/cases/unittests/moduleResolution.ts | 23 +- 109 files changed, 511 insertions(+), 247 deletions(-) create mode 100644 tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json => jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json} (63%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles => jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions}/amd/test.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles => jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions}/amd/test.js (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json => jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json} (63%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles => jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions}/node/test.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles => jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions}/node/test.js (100%) create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts => jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts} (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js => jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js} (100%) create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts => jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts} (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js => jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js} (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json => jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json} (55%) rename tests/baselines/reference/project/{jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json => jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json} (55%) create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json delete mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json delete mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.js create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json create mode 100644 tests/cases/compiler/jsFileCompilationWithoutJsExtensions.ts rename tests/cases/project/{jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json => jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json} (73%) create mode 100644 tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json rename tests/cases/project/{jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json => jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json} (54%) create mode 100644 tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json rename tests/cases/project/{jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json => jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json} (54%) create mode 100644 tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json rename tests/cases/projects/jsFileCompilation/{DifferentNamesNotSpecifiedWithConsumeJsFiles => DifferentNamesNotSpecifiedWithJsExtensions}/a.ts (100%) rename tests/cases/projects/jsFileCompilation/{DifferentNamesNotSpecifiedWithConsumeJsFiles => DifferentNamesNotSpecifiedWithJsExtensions}/b.js (100%) rename tests/cases/projects/jsFileCompilation/{DifferentNamesNotSpecifiedWithConsumeJsFiles => DifferentNamesNotSpecifiedWithJsExtensions}/tsconfig.json (59%) rename tests/cases/projects/jsFileCompilation/{SameNameFilesNotSpecifiedWithConsumeJsFiles => DifferentNamesSpecifiedWithJsExtensions}/a.ts (100%) create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/b.js create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/tsconfig.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.d.ts rename tests/cases/projects/jsFileCompilation/{SameNameDtsNotSpecifiedWithConsumeJsFiles => SameNameDTsSpecifiedWithJsExtensions}/a.js (100%) create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/tsconfig.json delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/tsconfig.json rename tests/cases/projects/jsFileCompilation/{SameNameDtsNotSpecifiedWithConsumeJsFiles => SameNameDtsNotSpecifiedWithJsExtensions}/a.d.ts (100%) rename tests/cases/projects/jsFileCompilation/{SameNameFilesNotSpecifiedWithConsumeJsFiles => SameNameDtsNotSpecifiedWithJsExtensions}/a.js (100%) create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/tsconfig.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/tsconfig.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/tsconfig.json diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 09dea3cc844..2ee0f67382b 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -247,8 +247,11 @@ namespace ts { error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic, }, { - name: "consumeJsFiles", - type: "boolean", + name: "jsExtensions", + type: "string[]", + description: Diagnostics.Specifies_extensions_to_treat_as_javascript_file_To_specify_multiple_extensions_either_use_this_option_multiple_times_or_provide_comma_separated_list, + paramType: Diagnostics.EXTENSION_S, + error: Diagnostics.Argument_for_jsExtensions_option_must_be_either_extension_or_comma_separated_list_of_extensions, } ]; @@ -309,31 +312,23 @@ namespace ts { if (hasProperty(optionNameMap, s)) { let opt = optionNameMap[s]; - // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). - if (!args[i] && opt.type !== "boolean") { - errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); + if (opt.type === "boolean") { + // This needs to be treated specially since it doesnt accept argument + options[opt.name] = true; } + else { + // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). + if (!args[i]) { + errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); + } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i++]); - break; - case "boolean": - options[opt.name] = true; - break; - case "string": - options[opt.name] = args[i++] || ""; - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - let map = >opt.type; - let key = (args[i++] || "").toLowerCase(); - if (hasProperty(map, key)) { - options[opt.name] = map[key]; - } - else { - errors.push(createCompilerDiagnostic((opt).error)); - } + let { hasError, value} = parseOption(opt, args[i++], options[opt.name]); + if (hasError) { + errors.push(createCompilerDiagnostic((opt).error)); + } + else { + options[opt.name] = value; + } } } else { @@ -345,7 +340,7 @@ namespace ts { } } } - + function parseResponseFile(fileName: string) { let text = readFile ? readFile(fileName) : sys.readFile(fileName); @@ -380,6 +375,63 @@ namespace ts { } } + function parseMultiValueStringArray(s: string, existingValue: string[]) { + let value: string[] = existingValue || []; + let hasError: boolean; + let currentString = ""; + if (s) { + for (let i = 0; i < s.length; i++) { + let ch = s.charCodeAt(i); + if (ch === CharacterCodes.comma) { + pushCurrentStringToResult(); + } + else { + currentString += s.charAt(i); + } + } + // push last string + pushCurrentStringToResult(); + } + return { value, hasError }; + + function pushCurrentStringToResult() { + if (currentString) { + value.push(currentString); + currentString = ""; + } + else { + hasError = true; + } + } + } + + /* @internal */ + export function parseOption(option: CommandLineOption, stringValue: string, existingValue: CompilerOptionsValueType) { + let hasError: boolean; + let value: CompilerOptionsValueType; + switch (option.type) { + case "number": + value = parseInt(stringValue); + break; + case "string": + value = stringValue || ""; + break; + case "string[]": + return parseMultiValueStringArray(stringValue, existingValue); + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + let map = >option.type; + let key = (stringValue || "").toLowerCase(); + if (hasProperty(map, key)) { + value = map[key]; + } + else { + hasError = true; + } + } + return { hasError, value }; + } + /** * Read tsconfig.json file * @param fileName The path to the config file @@ -409,23 +461,57 @@ namespace ts { } } + /* @internal */ + export function parseJsonCompilerOption(opt: CommandLineOption, jsonValue: any, errors: Diagnostic[]) { + let optType = opt.type; + let expectedType = typeof optType === "string" ? optType : "string"; + let hasValidValue = true; + if (typeof jsonValue === expectedType) { + if (typeof optType !== "string") { + let key = jsonValue.toLowerCase(); + if (hasProperty(optType, key)) { + jsonValue = optType[key]; + } + else { + errors.push(createCompilerDiagnostic((opt).error)); + jsonValue = 0; + } + } + } + // Check if the value asked was string[] and value provided was not string[] + else if (expectedType !== "string[]" || + typeof jsonValue !== "object" || + typeof jsonValue.length !== "number" || + forEach(jsonValue, individualValue => typeof individualValue !== "string")) { + // Not expectedType + errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, expectedType)); + hasValidValue = false; + } + + return { + value: jsonValue, + hasValidValue + }; + } + /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir + * @param existingOptions optional existing options to extend into */ - export function parseConfigFile(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine { + export function parseConfigFile(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}): ParsedCommandLine { let errors: Diagnostic[] = []; - let options = getCompilerOptions(); + let options = getCompilerOptions(existingOptions); return { options, fileNames: getFileNames(), errors }; - function getCompilerOptions(): CompilerOptions { + function getCompilerOptions(existingOptions: CompilerOptions): CompilerOptions { let options: CompilerOptions = {}; let optionNameMap: Map = {}; forEach(optionDeclarations, option => { @@ -436,27 +522,9 @@ namespace ts { for (let id in jsonOptions) { if (hasProperty(optionNameMap, id)) { let opt = optionNameMap[id]; - let optType = opt.type; - let value = jsonOptions[id]; - let expectedType = typeof optType === "string" ? optType : "string"; - if (typeof value === expectedType) { - if (typeof optType !== "string") { - let key = value.toLowerCase(); - if (hasProperty(optType, key)) { - value = optType[key]; - } - else { - errors.push(createCompilerDiagnostic((opt).error)); - value = 0; - } - } - if (opt.isFilePath) { - value = normalizePath(combinePaths(basePath, value)); - } - options[opt.name] = value; - } - else { - errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, id, expectedType)); + let { hasValidValue, value } = parseJsonCompilerOption(opt, jsonOptions[id], errors); + if (hasValidValue) { + options[opt.name] = opt.isFilePath ? normalizePath(combinePaths(basePath, value)) : value; } } else { @@ -464,7 +532,7 @@ namespace ts { } } } - return options; + return extend(existingOptions, options); } function getFileNames(): string[] { @@ -479,32 +547,31 @@ namespace ts { } else { let exclude = json["exclude"] instanceof Array ? map(json["exclude"], normalizeSlashes) : undefined; - let sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)); - if (options.consumeJsFiles) { - sysFiles = sysFiles.concat(host.readDirectory(basePath, ".js", exclude)); - } - for (let i = 0; i < sysFiles.length; i++) { - let name = sysFiles[i]; - if (fileExtensionIs(name, ".js")) { - let baseName = name.substr(0, name.length - ".js".length); - if (!contains(sysFiles, baseName + ".tsx") && !contains(sysFiles, baseName + ".ts") && !contains(sysFiles, baseName + ".d.ts")) { - fileNames.push(name); + let extensionsToRead = getSupportedExtensions(options); + for (let extensionsIndex = 0; extensionsIndex < extensionsToRead.length; extensionsIndex++) { + let extension = extensionsToRead[extensionsIndex]; + let sysFiles = host.readDirectory(basePath, extension, exclude); + for (let i = 0; i < sysFiles.length; i++) { + let fileName = sysFiles[i]; + // If this is not the extension of one of the lower priority extension, then only we can use this file name + // This could happen if the extension taking priority is substring of lower priority extension. eg. .ts and .d.ts + let hasLowerPriorityExtension: boolean; + for (let j = extensionsIndex + 1; !hasLowerPriorityExtension && j < extensionsToRead.length; j++) { + hasLowerPriorityExtension = fileExtensionIs(fileName, extensionsToRead[j]); + }; + if (!hasLowerPriorityExtension) { + // If the basename + higher priority extensions arent in the filenames, use this file name + let baseName = fileName.substr(0, fileName.length - extension.length - 1); + let hasSameNameHigherPriorityExtensionFile: boolean; + for (let j = 0; !hasSameNameHigherPriorityExtensionFile && j < extensionsIndex; j++) { + hasSameNameHigherPriorityExtensionFile = contains(fileNames, baseName + "." + extensionsToRead[j]); + }; + + if (!hasSameNameHigherPriorityExtensionFile) { + fileNames.push(fileName); + } } } - else if (fileExtensionIs(name, ".d.ts")) { - let baseName = name.substr(0, name.length - ".d.ts".length); - if (!contains(sysFiles, baseName + ".tsx") && !contains(sysFiles, baseName + ".ts")) { - fileNames.push(name); - } - } - else if (fileExtensionIs(name, ".ts")) { - if (!contains(sysFiles, name + "x")) { - fileNames.push(name); - } - } - else { - fileNames.push(name); - } } } return fileNames; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index f792c728227..4a337e94bc4 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -714,20 +714,20 @@ namespace ts { export function fileExtensionIs(path: string, extension: string): boolean { let pathLen = path.length; - let extLen = extension.length; - return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension; + let extLen = extension.length + 1; + return pathLen > extLen && path.substr(pathLen - extLen, extLen) === "." + extension; } /** * List of supported extensions in order of file resolution precedence. */ - export const supportedExtensions = [".ts", ".tsx", ".d.ts", ".js"]; + export const supportedTypeScriptExtensions = ["ts", "tsx", "d.ts"]; - const extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; + const extensionsToRemove = ["d.ts", "ts", "js", "tsx", "jsx"]; export function removeFileExtension(path: string): string { for (let ext of extensionsToRemove) { if (fileExtensionIs(path, ext)) { - return path.substr(0, path.length - ext.length); + return path.substr(0, path.length - ext.length - 1); } } return path; diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 610ee7e1125..d79b7323d3e 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -546,6 +546,7 @@ namespace ts { VERSION: { code: 6036, category: DiagnosticCategory.Message, key: "VERSION" }, LOCATION: { code: 6037, category: DiagnosticCategory.Message, key: "LOCATION" }, DIRECTORY: { code: 6038, category: DiagnosticCategory.Message, key: "DIRECTORY" }, + EXTENSION_S: { code: 6039, category: DiagnosticCategory.Message, key: "EXTENSION[S]" }, Compilation_complete_Watching_for_file_changes: { code: 6042, category: DiagnosticCategory.Message, key: "Compilation complete. Watching for file changes." }, Generates_corresponding_map_file: { code: 6043, category: DiagnosticCategory.Message, key: "Generates corresponding '.map' file." }, Compiler_option_0_expects_an_argument: { code: 6044, category: DiagnosticCategory.Error, key: "Compiler option '{0}' expects an argument." }, @@ -567,6 +568,7 @@ namespace ts { NEWLINE: { code: 6061, category: DiagnosticCategory.Message, key: "NEWLINE" }, Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." }, Argument_for_moduleResolution_option_must_be_node_or_classic: { code: 6063, category: DiagnosticCategory.Error, key: "Argument for '--moduleResolution' option must be 'node' or 'classic'." }, + Argument_for_jsExtensions_option_must_be_either_extension_or_comma_separated_list_of_extensions: { code: 6064, category: DiagnosticCategory.Error, key: "Argument for '--jsExtensions' option must be either extension or comma separated list of extensions." }, Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: DiagnosticCategory.Message, key: "Specify JSX code generation: 'preserve' or 'react'" }, Argument_for_jsx_must_be_preserve_or_react: { code: 6081, category: DiagnosticCategory.Message, key: "Argument for '--jsx' must be 'preserve' or 'react'." }, Enables_experimental_support_for_ES7_decorators: { code: 6065, category: DiagnosticCategory.Message, key: "Enables experimental support for ES7 decorators." }, @@ -577,6 +579,7 @@ namespace ts { Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: DiagnosticCategory.Message, key: "Initializes a TypeScript project and creates a tsconfig.json file." }, Successfully_created_a_tsconfig_json_file: { code: 6071, category: DiagnosticCategory.Message, key: "Successfully created a tsconfig.json file." }, Suppress_excess_property_checks_for_object_literals: { code: 6072, category: DiagnosticCategory.Message, key: "Suppress excess property checks for object literals." }, + Specifies_extensions_to_treat_as_javascript_file_To_specify_multiple_extensions_either_use_this_option_multiple_times_or_provide_comma_separated_list: { code: 6073, category: DiagnosticCategory.Message, key: "Specifies extensions to treat as javascript file. To specify multiple extensions, either use this option multiple times or provide comma separated list." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 5d40a1e5ab2..3f5dc0134e0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2174,6 +2174,10 @@ "category": "Message", "code": 6038 }, + "EXTENSION[S]": { + "category": "Message", + "code": 6039 + }, "Compilation complete. Watching for file changes.": { "category": "Message", "code": 6042 @@ -2258,6 +2262,10 @@ "category": "Error", "code": 6063 }, + "Argument for '--jsExtensions' option must be either extension or comma separated list of extensions.": { + "category": "Error", + "code": 6064 + }, "Specify JSX code generation: 'preserve' or 'react'": { "category": "Message", @@ -2299,6 +2307,10 @@ "category": "Message", "code": 6072 }, + "Specifies extensions to treat as javascript file. To specify multiple extensions, either use this option multiple times or provide comma separated list.": { + "category": "Message", + "code": 6073 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 330ad05518b..27d85a3b4a8 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -659,7 +659,7 @@ namespace ts { sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = normalizePath(fileName); - sourceFile.flags = fileExtensionIs(sourceFile.fileName, ".d.ts") ? NodeFlags.DeclarationFile : 0; + sourceFile.flags = fileExtensionIs(sourceFile.fileName, "d.ts") ? NodeFlags.DeclarationFile : 0; sourceFile.languageVariant = isTsx(sourceFile.fileName) ? LanguageVariant.JSX : LanguageVariant.Standard; return sourceFile; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 7c9c7e103bc..0110e0b529a 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -42,24 +42,24 @@ namespace ts { : compilerOptions.module === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic; switch (moduleResolution) { - case ModuleResolutionKind.NodeJs: return nodeModuleNameResolver(moduleName, containingFile, host); + case ModuleResolutionKind.NodeJs: return nodeModuleNameResolver(moduleName, containingFile, getSupportedExtensions(compilerOptions), host); case ModuleResolutionKind.Classic: return classicNameResolver(moduleName, containingFile, compilerOptions, host); } } - export function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + export function nodeModuleNameResolver(moduleName: string, containingFile: string, supportedExtensions: string[], host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { let containingDirectory = getDirectoryPath(containingFile); if (getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { let failedLookupLocations: string[] = []; let candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - let resolvedFileName = loadNodeModuleFromFile(candidate, /* loadOnlyDts */ false, failedLookupLocations, host); + let resolvedFileName = loadNodeModuleFromFile(candidate, supportedExtensions, failedLookupLocations, host); if (resolvedFileName) { return { resolvedModule: { resolvedFileName }, failedLookupLocations }; } - resolvedFileName = loadNodeModuleFromDirectory(candidate, /* loadOnlyDts */ false, failedLookupLocations, host); + resolvedFileName = loadNodeModuleFromDirectory(candidate, supportedExtensions, failedLookupLocations, host); return resolvedFileName ? { resolvedModule: { resolvedFileName }, failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations }; @@ -69,16 +69,11 @@ namespace ts { } } - function loadNodeModuleFromFile(candidate: string, loadOnlyDts: boolean, failedLookupLocation: string[], host: ModuleResolutionHost): string { - if (loadOnlyDts) { - return tryLoad(".d.ts"); - } - else { - return forEach(supportedExtensions, tryLoad); - } + function loadNodeModuleFromFile(candidate: string, supportedExtensions: string[], failedLookupLocation: string[], host: ModuleResolutionHost): string { + return forEach(supportedExtensions, tryLoad); function tryLoad(ext: string): string { - let fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + ext; + let fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + "." + ext; if (host.fileExists(fileName)) { return fileName; } @@ -89,7 +84,7 @@ namespace ts { } } - function loadNodeModuleFromDirectory(candidate: string, loadOnlyDts: boolean, failedLookupLocation: string[], host: ModuleResolutionHost): string { + function loadNodeModuleFromDirectory(candidate: string, supportedExtensions: string[], failedLookupLocation: string[], host: ModuleResolutionHost): string { let packageJsonPath = combinePaths(candidate, "package.json"); if (host.fileExists(packageJsonPath)) { @@ -105,7 +100,7 @@ namespace ts { } if (jsonContent.typings) { - let result = loadNodeModuleFromFile(normalizePath(combinePaths(candidate, jsonContent.typings)), loadOnlyDts, failedLookupLocation, host); + let result = loadNodeModuleFromFile(normalizePath(combinePaths(candidate, jsonContent.typings)), supportedExtensions, failedLookupLocation, host); if (result) { return result; } @@ -116,7 +111,7 @@ namespace ts { failedLookupLocation.push(packageJsonPath); } - return loadNodeModuleFromFile(combinePaths(candidate, "index"), loadOnlyDts, failedLookupLocation, host); + return loadNodeModuleFromFile(combinePaths(candidate, "index"), supportedExtensions, failedLookupLocation, host); } function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { @@ -127,12 +122,12 @@ namespace ts { if (baseName !== "node_modules") { let nodeModulesFolder = combinePaths(directory, "node_modules"); let candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); - let result = loadNodeModuleFromFile(candidate, /* loadOnlyDts */ true, failedLookupLocations, host); + let result = loadNodeModuleFromFile(candidate, /* loadOnlyDts */ ["d.ts"], failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } - result = loadNodeModuleFromDirectory(candidate, /* loadOnlyDts */ true, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(candidate, /* loadOnlyDts */ ["d.ts"], failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } @@ -169,14 +164,14 @@ namespace ts { let referencedSourceFile: string; while (true) { searchName = normalizePath(combinePaths(searchPath, moduleName)); - referencedSourceFile = forEach(supportedExtensions, extension => { - if (extension === ".tsx" && !compilerOptions.jsx) { + referencedSourceFile = forEach(getSupportedExtensions(compilerOptions), extension => { + if (extension === "tsx" && !compilerOptions.jsx) { // resolve .tsx files only if jsx support is enabled // 'logical not' handles both undefined and None cases return undefined; } - let candidate = searchName + extension; + let candidate = searchName + "." + extension; if (host.fileExists(candidate)) { return candidate; } @@ -368,13 +363,14 @@ namespace ts { } if (!tryReuseStructureFromOldProgram()) { - forEach(rootNames, name => processRootFile(name, false)); + let supportedExtensions = getSupportedExtensions(options); + forEach(rootNames, name => processRootFile(name, false, supportedExtensions)); // Do not process the default library if: // - The '--noLib' flag is used. // - A 'no-default-lib' reference comment is encountered in // processing the root files. if (!skipDefaultLib) { - processRootFile(host.getDefaultLibFileName(options), true); + processRootFile(host.getDefaultLibFileName(options), true, supportedExtensions); } } @@ -833,12 +829,8 @@ namespace ts { return sortAndDeduplicateDiagnostics(allDiagnostics); } - function hasExtension(fileName: string): boolean { - return getBaseFileName(fileName).indexOf(".") >= 0; - } - - function processRootFile(fileName: string, isDefaultLib: boolean) { - processSourceFile(normalizePath(fileName), isDefaultLib); + function processRootFile(fileName: string, isDefaultLib: boolean, supportedExtensions: string[]) { + processSourceFile(normalizePath(fileName), isDefaultLib, supportedExtensions); } function fileReferenceIsEqualTo(a: FileReference, b: FileReference): boolean { @@ -897,7 +889,7 @@ namespace ts { file.imports = imports || emptyArray; } - function processSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) { + function processSourceFile(fileName: string, isDefaultLib: boolean, supportedExtensions: string[], refFile?: SourceFile, refPos?: number, refEnd?: number) { let diagnosticArgument: string[]; let diagnostic: DiagnosticMessage; if (hasExtension(fileName)) { @@ -905,7 +897,7 @@ namespace ts { diagnostic = Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1; diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"]; } - else if (!findSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd)) { + else if (!findSourceFile(fileName, isDefaultLib, supportedExtensions, refFile, refPos, refEnd)) { diagnostic = Diagnostics.File_0_not_found; diagnosticArgument = [fileName]; } @@ -915,14 +907,15 @@ namespace ts { } } else { - let nonTsFile: SourceFile = options.allowNonTsExtensions && findSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd); + let nonTsFile: SourceFile = options.allowNonTsExtensions && findSourceFile(fileName, isDefaultLib, supportedExtensions, refFile, refPos, refEnd); if (!nonTsFile) { if (options.allowNonTsExtensions) { diagnostic = Diagnostics.File_0_not_found; diagnosticArgument = [fileName]; } - else if (!forEach(supportedExtensions, extension => findSourceFile(fileName + extension, isDefaultLib, refFile, refPos, refEnd))) { - diagnostic = Diagnostics.File_0_not_found; + else if (!forEach(getSupportedExtensions(options), extension => findSourceFile(fileName + "." + extension, isDefaultLib, supportedExtensions, refFile, refPos, refEnd))) { + // (TODO: shkamat) Should this message be different given we support multiple extensions + diagnostic = Diagnostics.File_0_not_found; fileName += ".ts"; diagnosticArgument = [fileName]; } @@ -940,7 +933,7 @@ namespace ts { } // Get source file from normalized fileName - function findSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number): SourceFile { + function findSourceFile(fileName: string, isDefaultLib: boolean, supportedExtensions: string[], refFile?: SourceFile, refPos?: number, refEnd?: number): SourceFile { let canonicalName = host.getCanonicalFileName(normalizeSlashes(fileName)); if (filesByName.contains(canonicalName)) { // We've already looked for this file, use cached result @@ -972,11 +965,11 @@ namespace ts { let basePath = getDirectoryPath(fileName); if (!options.noResolve) { - processReferencedFiles(file, basePath); + processReferencedFiles(file, basePath, supportedExtensions); } // always process imported modules to record module name resolutions - processImportedModules(file, basePath); + processImportedModules(file, basePath, supportedExtensions); if (isDefaultLib) { file.isDefaultLib = true; @@ -1008,14 +1001,14 @@ namespace ts { } } - function processReferencedFiles(file: SourceFile, basePath: string) { + function processReferencedFiles(file: SourceFile, basePath: string, supportedExtensions: string[]) { forEach(file.referencedFiles, ref => { let referencedFileName = resolveTripleslashReference(ref.fileName, file.fileName); - processSourceFile(referencedFileName, /* isDefaultLib */ false, file, ref.pos, ref.end); + processSourceFile(referencedFileName, /* isDefaultLib */ false, supportedExtensions, file, ref.pos, ref.end); }); } - function processImportedModules(file: SourceFile, basePath: string) { + function processImportedModules(file: SourceFile, basePath: string, supportedExtensions: string[]) { collectExternalModuleReferences(file); if (file.imports.length) { file.resolvedModules = {}; @@ -1025,13 +1018,13 @@ namespace ts { let resolution = resolutions[i]; setResolvedModule(file, moduleNames[i], resolution); if (resolution && !options.noResolve) { - const importedFile = findModuleSourceFile(resolution.resolvedFileName, file.imports[i]); + const importedFile = findModuleSourceFile(resolution.resolvedFileName, file.imports[i], supportedExtensions); if (importedFile && resolution.isExternalLibraryImport) { if (!isExternalModule(importedFile)) { let start = getTokenPosOfNode(file.imports[i], file) fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName)); } - else if (!fileExtensionIs(importedFile.fileName, ".d.ts")) { + else if (!fileExtensionIs(importedFile.fileName, "d.ts")) { let start = getTokenPosOfNode(file.imports[i], file) fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_can_only_be_in_d_ts_files_Please_contact_the_package_author_to_update_the_package_definition)); } @@ -1049,8 +1042,8 @@ namespace ts { } return; - function findModuleSourceFile(fileName: string, nameLiteral: Expression) { - return findSourceFile(fileName, /* isDefaultLib */ false, file, skipTrivia(file.text, nameLiteral.pos), nameLiteral.end); + function findModuleSourceFile(fileName: string, nameLiteral: Expression, supportedExtensions: string[]) { + return findSourceFile(fileName, /* isDefaultLib */ false, supportedExtensions, file, skipTrivia(file.text, nameLiteral.pos), nameLiteral.end); } } diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 805275776ad..8c1bf962aae 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -223,13 +223,13 @@ namespace ts { } let configObject = result.config; - let configParseResult = parseConfigFile(configObject, sys, getDirectoryPath(configFileName)); + let configParseResult = parseConfigFile(configObject, sys, getDirectoryPath(configFileName), commandLine.options); if (configParseResult.errors.length > 0) { reportDiagnostics(configParseResult.errors); return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); } rootFileNames = configParseResult.fileNames; - compilerOptions = extend(commandLine.options, configParseResult.options); + compilerOptions = configParseResult.options; } else { rootFileNames = commandLine.fileNames; @@ -519,8 +519,8 @@ namespace ts { return; - function serializeCompilerOptions(options: CompilerOptions): Map { - let result: Map = {}; + function serializeCompilerOptions(options: CompilerOptions): Map { + let result: Map = {}; let optionsNameMap = getOptionNameMap().optionNameMap; for (let name in options) { @@ -537,8 +537,8 @@ namespace ts { let optionDefinition = optionsNameMap[name.toLowerCase()]; if (optionDefinition) { if (typeof optionDefinition.type === "string") { - // string, number or boolean - result[name] = value; + // string, number, boolean or string[] + result[name] = value; } else { // Enum diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9cd00247593..174afe51bde 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2062,15 +2062,17 @@ namespace ts { experimentalAsyncFunctions?: boolean; emitDecoratorMetadata?: boolean; moduleResolution?: ModuleResolutionKind; - consumeJsFiles?: boolean; + jsExtensions?: string[]; /* @internal */ stripInternal?: boolean; // Skip checking lib.d.ts to help speed up tests. /* @internal */ skipDefaultLibCheck?: boolean; - [option: string]: string | number | boolean; + [option: string]: CompilerOptionsValueType; } + export type CompilerOptionsValueType = string | number | boolean | string[]; + export const enum ModuleKind { None = 0, CommonJS = 1, @@ -2134,7 +2136,7 @@ namespace ts { /* @internal */ export interface CommandLineOptionOfCustomType extends CommandLineOptionBase { - type: Map; // an object literal mapping named values to actual values + type: Map | string; // an object literal mapping named values to actual values | string if it is string[] error: DiagnosticMessage; // The error given when the argument does not fit a customized 'type' } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 696d2f481e0..fd08d864a55 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1783,13 +1783,17 @@ namespace ts { // 1. in-browser single file compilation scenario // 2. non supported extension file return compilerOptions.isolatedModules || - forEach(supportedExtensions, extension => fileExtensionIs(sourceFile.fileName, extension)); + forEach(supportedTypeScriptExtensions, extension => fileExtensionIs(sourceFile.fileName, extension)); } return false; } return false; } + export function getSupportedExtensions(options: CompilerOptions): string[] { + return options.jsExtensions ? supportedTypeScriptExtensions.concat(options.jsExtensions) : supportedTypeScriptExtensions; + } + export function getAllAccessorDeclarations(declarations: NodeArray, accessor: AccessorDeclaration) { let firstAccessor: AccessorDeclaration; let secondAccessor: AccessorDeclaration; @@ -2063,13 +2067,18 @@ namespace ts { export function getLocalSymbolForExportDefault(symbol: Symbol) { return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & NodeFlags.Default) ? symbol.valueDeclaration.localSymbol : undefined; } + + export function hasExtension(fileName: string): boolean { + return getBaseFileName(fileName).indexOf(".") >= 0; + } export function isJavaScript(fileName: string) { - return fileExtensionIs(fileName, ".js"); + // Treat file as typescript if the extension is not supportedTypeScript + return hasExtension(fileName) && !forEach(supportedTypeScriptExtensions, extension => fileExtensionIs(fileName, extension)); } export function isTsx(fileName: string) { - return fileExtensionIs(fileName, ".tsx"); + return fileExtensionIs(fileName, "tsx"); } /** diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index a24ed30ae14..c4532293de0 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -148,7 +148,7 @@ class CompilerBaselineRunner extends RunnerBase { }); it("Correct JS output for " + fileName, () => { - if (!ts.fileExtensionIs(lastUnit.name, ".d.ts") && this.emit) { + if (!ts.fileExtensionIs(lastUnit.name, "d.ts") && this.emit) { if (result.files.length === 0 && result.errors.length === 0) { throw new Error("Expected at least one js file to be emitted or at least one error to be created."); } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index bd7072177df..a04b3af84ca 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -996,23 +996,17 @@ module Harness { } let option = getCommandLineOption(name); if (option) { - switch (option.type) { - case "boolean": - options[option.name] = value.toLowerCase() === "true"; - break; - case "string": - options[option.name] = value; - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - let map = >option.type; - let key = value.toLowerCase(); - if (ts.hasProperty(map, key)) { - options[option.name] = map[key]; - } - else { - throw new Error(`Unknown value '${value}' for compiler option '${name}'.`); - } + if (option.type === "boolean") { + options[option.name] = value.toLowerCase() === "true"; + } + else { + let { hasError, value: parsedValue } = ts.parseOption(option, value, options[option.name]); + if (hasError) { + throw new Error(`Unknown value '${value}' for compiler option '${name}'.`); + } + else { + options[option.name] = parsedValue; + } } } else { diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index 32e61cb8d7b..a250cb3daac 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -2,7 +2,7 @@ /// // Test case is json of below type in tests/cases/project/ -interface ProjectRunnerTestCase { +interface ProjectRunnerTestCase extends ts.CompilerOptions{ scenario: string; projectRoot: string; // project where it lives - this also is the current directory when compiling inputFiles: string[]; // list of input files to be given to program @@ -50,7 +50,7 @@ class ProjectRunner extends RunnerBase { } private runProjectTestCase(testCaseFileName: string) { - let testCase: ProjectRunnerTestCase & ts.CompilerOptions; + let testCase: ProjectRunnerTestCase; let testFileText: string = null; try { @@ -61,7 +61,7 @@ class ProjectRunner extends RunnerBase { } try { - testCase = JSON.parse(testFileText); + testCase = JSON.parse(testFileText); } catch (e) { assert(false, "Testcase: " + testCaseFileName + " does not contain valid json format: " + e.message); @@ -181,8 +181,13 @@ class ProjectRunner extends RunnerBase { let nonSubfolderDiskFiles = 0; let outputFiles: BatchCompileProjectTestCaseEmittedFile[] = []; - let compilerOptions = createCompilerOptions(); let inputFiles = testCase.inputFiles; + let { errors, compilerOptions } = createCompilerOptions(); + if (errors.length) { + moduleKind, + errors + }; + let configFileName: string; if (compilerOptions.project) { // Parse project @@ -203,7 +208,7 @@ class ProjectRunner extends RunnerBase { } let configObject = result.config; - let configParseResult = ts.parseConfigFile(configObject, { fileExists, readFile: getSourceFileText, readDirectory }, ts.getDirectoryPath(configFileName)); + let configParseResult = ts.parseConfigFile(configObject, { fileExists, readFile: getSourceFileText, readDirectory }, ts.getDirectoryPath(configFileName), compilerOptions); if (configParseResult.errors.length > 0) { return { moduleKind, @@ -211,7 +216,7 @@ class ProjectRunner extends RunnerBase { }; } inputFiles = configParseResult.fileNames; - compilerOptions = ts.extend(compilerOptions, configParseResult.options); + compilerOptions = configParseResult.options; } let projectCompilerResult = compileProjectFiles(moduleKind, () => inputFiles, getSourceFileText, writeFile, compilerOptions); @@ -224,7 +229,7 @@ class ProjectRunner extends RunnerBase { errors: projectCompilerResult.errors, }; - function createCompilerOptions(): ts.CompilerOptions { + function createCompilerOptions() { // Set the special options that depend on other testcase options let compilerOptions: ts.CompilerOptions = { mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? Harness.IO.resolvePath(testCase.mapRoot) : testCase.mapRoot, @@ -232,7 +237,7 @@ class ProjectRunner extends RunnerBase { module: moduleKind, moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future }; - + let errors: ts.Diagnostic[] = []; // Set the values specified using json let optionNameMap: ts.Map = {}; ts.forEach(ts.optionDeclarations, option => { @@ -241,19 +246,14 @@ class ProjectRunner extends RunnerBase { for (let name in testCase) { if (name !== "mapRoot" && name !== "sourceRoot" && ts.hasProperty(optionNameMap, name)) { let option = optionNameMap[name]; - let optType = option.type; - let value = testCase[name]; - if (typeof optType !== "string") { - let key = value.toLowerCase(); - if (ts.hasProperty(optType, key)) { - value = optType[key]; - } + let { hasValidValue, value } = ts.parseJsonCompilerOption(option, testCase[name], errors); + if (hasValidValue) { + compilerOptions[option.name] = value; } - compilerOptions[option.name] = value; } } - return compilerOptions; + return { errors, compilerOptions }; } function getFileNameInTheProjectTest(fileName: string): string { @@ -389,11 +389,11 @@ class ProjectRunner extends RunnerBase { } function getErrorsBaseline(compilerResult: CompileProjectFilesResult) { - let inputFiles = ts.map(ts.filter(compilerResult.program.getSourceFiles(), + let inputFiles = compilerResult.program ? ts.map(ts.filter(compilerResult.program.getSourceFiles(), sourceFile => sourceFile.fileName !== "lib.d.ts"), sourceFile => { return { unitName: sourceFile.fileName, content: sourceFile.text }; - }); + }): []; return Harness.Compiler.getErrorBaseline(inputFiles, compilerResult.errors); } diff --git a/src/services/services.ts b/src/services/services.ts index d18fa1506ab..6517e0c0a4a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1868,7 +1868,7 @@ namespace ts { let compilerHost: CompilerHost = { getSourceFile: (fileName, target) => fileName === normalizeSlashes(inputFileName) ? sourceFile : undefined, writeFile: (name, text, writeByteOrderMark) => { - if (fileExtensionIs(name, ".map")) { + if (fileExtensionIs(name, "map")) { Debug.assert(sourceMapText === undefined, `Unexpected multiple source map outputs for the file '${name}'`); sourceMapText = text; } diff --git a/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt new file mode 100644 index 00000000000..4276669ff76 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt @@ -0,0 +1,6 @@ +error TS6054: File 'tests/cases/compiler/a.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. + + +!!! error TS6054: File 'tests/cases/compiler/a.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +==== tests/cases/compiler/a.js (0 errors) ==== + declare var v; \ No newline at end of file diff --git a/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt b/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt index de21d58456f..76d5def7b5c 100644 --- a/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt +++ b/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt @@ -1,6 +1,6 @@ error TS6053: File 'a.ts' not found. -error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js'. +error TS6054: File 'a.t' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. !!! error TS6053: File 'a.ts' not found. -!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js'. \ No newline at end of file +!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. \ No newline at end of file diff --git a/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt b/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt index de21d58456f..76d5def7b5c 100644 --- a/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt +++ b/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt @@ -1,6 +1,6 @@ error TS6053: File 'a.ts' not found. -error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js'. +error TS6054: File 'a.t' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. !!! error TS6053: File 'a.ts' not found. -!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js'. \ No newline at end of file +!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json similarity index 63% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json index c2cd78e8118..eb3813ca142 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json @@ -1,13 +1,13 @@ { - "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and consumeJsFiles is true", + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and .js files are consumed", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesNotSpecifiedWithConsumeJsFiles", + "project": "DifferentNamesNotSpecifiedWithJsExtensions", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts", - "DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js" + "DifferentNamesNotSpecifiedWithJsExtensions/a.ts", + "DifferentNamesNotSpecifiedWithJsExtensions/b.js" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.d.ts rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/amd/test.js rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.js diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json similarity index 63% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json index c2cd78e8118..eb3813ca142 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json @@ -1,13 +1,13 @@ { - "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and consumeJsFiles is true", + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and .js files are consumed", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesNotSpecifiedWithConsumeJsFiles", + "project": "DifferentNamesNotSpecifiedWithJsExtensions", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts", - "DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js" + "DifferentNamesNotSpecifiedWithJsExtensions/a.ts", + "DifferentNamesNotSpecifiedWithJsExtensions/b.js" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.d.ts rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles/node/test.js rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.js diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt new file mode 100644 index 00000000000..a7fd60e03d5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt @@ -0,0 +1,6 @@ +error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. + + +!!! error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +==== DifferentNamesSpecified/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json index 555acda2cd6..36eed6a6518 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json @@ -6,8 +6,7 @@ "project": "DifferentNamesSpecified", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesSpecified/a.ts", - "DifferentNamesSpecified/b.js" + "DifferentNamesSpecified/a.ts" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt new file mode 100644 index 00000000000..a7fd60e03d5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt @@ -0,0 +1,6 @@ +error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. + + +!!! error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +==== DifferentNamesSpecified/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json index 555acda2cd6..36eed6a6518 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json @@ -6,8 +6,7 @@ "project": "DifferentNamesSpecified", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesSpecified/a.ts", - "DifferentNamesSpecified/b.js" + "DifferentNamesSpecified/a.ts" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..6c58345617a --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecifiedWithJsExtensions", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesSpecifiedWithJsExtensions/a.ts", + "DifferentNamesSpecifiedWithJsExtensions/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..6c58345617a --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecifiedWithJsExtensions", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesSpecifiedWithJsExtensions/a.ts", + "DifferentNamesSpecifiedWithJsExtensions/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json similarity index 55% rename from tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json rename to tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json index 4a3803ead63..867227ec4e3 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json @@ -1,12 +1,12 @@ { - "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json and .js files are consumed", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsNotSpecifiedWithConsumeJsFiles", + "project": "SameNameDTsSpecifiedWithJsExtensions", "resolvedInputFiles": [ "lib.d.ts", - "SameNameDTsNotSpecifiedWithConsumeJsFiles/a.d.ts" + "SameNameDTsSpecifiedWithJsExtensions/a.d.ts" ], "emittedFiles": [] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json similarity index 55% rename from tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json rename to tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json index 4a3803ead63..867227ec4e3 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json @@ -1,12 +1,12 @@ { - "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json and .js files are consumed", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsNotSpecifiedWithConsumeJsFiles", + "project": "SameNameDTsSpecifiedWithJsExtensions", "resolvedInputFiles": [ "lib.d.ts", - "SameNameDTsNotSpecifiedWithConsumeJsFiles/a.d.ts" + "SameNameDTsSpecifiedWithJsExtensions/a.d.ts" ], "emittedFiles": [] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..ffdfdf24e39 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithJsExtensions", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..ffdfdf24e39 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithJsExtensions", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json deleted file mode 100644 index 0970535d97a..00000000000 --- a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/amd/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", - "projectRoot": "tests/cases/projects/jsFileCompilation", - "baselineCheck": true, - "declaration": true, - "project": "SameNameFilesNotSpecifiedWithConsumeJsFiles", - "resolvedInputFiles": [ - "lib.d.ts", - "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts" - ], - "emittedFiles": [ - "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js", - "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts" - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json deleted file mode 100644 index 0970535d97a..00000000000 --- a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles/node/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", - "projectRoot": "tests/cases/projects/jsFileCompilation", - "baselineCheck": true, - "declaration": true, - "project": "SameNameFilesNotSpecifiedWithConsumeJsFiles", - "resolvedInputFiles": [ - "lib.d.ts", - "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts" - ], - "emittedFiles": [ - "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js", - "SameNameFilesNotSpecifiedWithConsumeJsFiles/a.d.ts" - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..93fee268825 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecifiedWithJsExtensions", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecifiedWithJsExtensions/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecifiedWithJsExtensions/a.js", + "SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..93fee268825 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecifiedWithJsExtensions", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecifiedWithJsExtensions/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecifiedWithJsExtensions/a.js", + "SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..0adbe74627f --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecifiedWithJsExtensions", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameTsSpecifiedWithJsExtensions/a.ts" + ], + "emittedFiles": [ + "SameNameTsSpecifiedWithJsExtensions/a.js", + "SameNameTsSpecifiedWithJsExtensions/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.js new file mode 100644 index 00000000000..e757934f20c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..0adbe74627f --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecifiedWithJsExtensions", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameTsSpecifiedWithJsExtensions/a.ts" + ], + "emittedFiles": [ + "SameNameTsSpecifiedWithJsExtensions/a.js", + "SameNameTsSpecifiedWithJsExtensions/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts b/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts index 636866e7eeb..6cb565e4c9f 100644 --- a/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js declare var v; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts b/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts index 2670e1503a9..1dd1cf453f2 100644 --- a/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js @internal class C { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts b/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts index 53ed217c2b5..5e670172c15 100644 --- a/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts +++ b/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts b/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts index 88931fa2eaf..2ac1ea3ba51 100644 --- a/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts +++ b/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationEnumSyntax.ts b/tests/cases/compiler/jsFileCompilationEnumSyntax.ts index ad1126ebf27..5a466ef5765 100644 --- a/tests/cases/compiler/jsFileCompilationEnumSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationEnumSyntax.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js enum E { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts index f02035c3f65..0b5545741b2 100644 --- a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @declaration: true // @filename: a.ts class c { diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts index 04945af8205..22d9e3c269e 100644 --- a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts b/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts index 42a6e36efc8..cea0dfe700d 100644 --- a/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js export = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts index 0a289515cb3..bfebbfd9966 100644 --- a/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts +++ b/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js class C implements D { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts b/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts index 85e9a7efb6d..3c102270196 100644 --- a/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js import a = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts b/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts index 014edddc341..172bf01b803 100644 --- a/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js interface I { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationModuleSyntax.ts b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts index 4de8f393a93..c9762553028 100644 --- a/tests/cases/compiler/jsFileCompilationModuleSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js module M { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts index fc6acef20ee..c089979ecbc 100644 --- a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts +++ b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @filename: a.ts class c { } diff --git a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts index 3ed1ca1039d..83c752f7292 100644 --- a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts +++ b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @out: out.js // @filename: a.ts class c { diff --git a/tests/cases/compiler/jsFileCompilationOptionalParameter.ts b/tests/cases/compiler/jsFileCompilationOptionalParameter.ts index 47b445e38ac..962c7321475 100644 --- a/tests/cases/compiler/jsFileCompilationOptionalParameter.ts +++ b/tests/cases/compiler/jsFileCompilationOptionalParameter.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js function F(p?) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts index 209efc3e12e..24a0f2389dd 100644 --- a/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts +++ b/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js class C { v } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts index cd59f862ac8..8c678eed588 100644 --- a/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts +++ b/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @filename: a.js class C { public foo() { diff --git a/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts b/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts index cb7a051016d..8594e011d3c 100644 --- a/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts +++ b/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js class C { constructor(public x) { }} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationRestParameter.ts b/tests/cases/compiler/jsFileCompilationRestParameter.ts index 71d04eec64e..22ccf24bae3 100644 --- a/tests/cases/compiler/jsFileCompilationRestParameter.ts +++ b/tests/cases/compiler/jsFileCompilationRestParameter.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @filename: a.js // @target: es6 // @out: b.js diff --git a/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts b/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts index 01080ef8556..183ace7ce10 100644 --- a/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts +++ b/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js function F(): number { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationSyntaxError.ts b/tests/cases/compiler/jsFileCompilationSyntaxError.ts index e6d379e0e3b..d6f10ce47c4 100644 --- a/tests/cases/compiler/jsFileCompilationSyntaxError.ts +++ b/tests/cases/compiler/jsFileCompilationSyntaxError.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @filename: a.js /** * @type {number} diff --git a/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts b/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts index d4b9aeb0b81..d77d35c011a 100644 --- a/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js type a = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts b/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts index 2a8d892c80d..e2aca1007b2 100644 --- a/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts +++ b/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js Foo(); \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeAssertions.ts b/tests/cases/compiler/jsFileCompilationTypeAssertions.ts index 29f0c18c81b..45f76c78bfb 100644 --- a/tests/cases/compiler/jsFileCompilationTypeAssertions.ts +++ b/tests/cases/compiler/jsFileCompilationTypeAssertions.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js var v = undefined; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts b/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts index f7c98808ad5..a989a8e2a30 100644 --- a/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts +++ b/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js function F(a: number) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts index 6b340a63dda..5242a2f7e7a 100644 --- a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts +++ b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js class C { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts index 5e2581676b8..a6f27b787eb 100644 --- a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts +++ b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js function F() { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts b/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts index e6289fd6eb0..1e2641dd8d1 100644 --- a/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts +++ b/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts @@ -1,2 +1,3 @@ +// @jsExtensions: js // @filename: a.js var v: () => number; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithOut.ts b/tests/cases/compiler/jsFileCompilationWithOut.ts index 47ca5115cbb..595cba8ffd3 100644 --- a/tests/cases/compiler/jsFileCompilationWithOut.ts +++ b/tests/cases/compiler/jsFileCompilationWithOut.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @out: out.js // @filename: a.ts class c { diff --git a/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts index da7d99dc5e7..ce97a6635c5 100644 --- a/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts +++ b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @out: tests/cases/compiler/b.js // @filename: a.ts class c { diff --git a/tests/cases/compiler/jsFileCompilationWithoutJsExtensions.ts b/tests/cases/compiler/jsFileCompilationWithoutJsExtensions.ts new file mode 100644 index 00000000000..636866e7eeb --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithoutJsExtensions.ts @@ -0,0 +1,2 @@ +// @filename: a.js +declare var v; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithoutOut.ts b/tests/cases/compiler/jsFileCompilationWithoutOut.ts index 2936f2eda7c..6cc6c7b50b1 100644 --- a/tests/cases/compiler/jsFileCompilationWithoutOut.ts +++ b/tests/cases/compiler/jsFileCompilationWithoutOut.ts @@ -1,3 +1,4 @@ +// @jsExtensions: js // @filename: a.ts class c { } diff --git a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json similarity index 73% rename from tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json rename to tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json index 0571c55820f..50cd978a712 100644 --- a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithConsumeJsFiles.json +++ b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json @@ -1,7 +1,7 @@ { - "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and consumeJsFiles is true", + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and .js files are consumed", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesNotSpecifiedWithConsumeJsFiles" + "project": "DifferentNamesNotSpecifiedWithJsExtensions" } \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..a15686497c5 --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecifiedWithJsExtensions" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json b/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json similarity index 54% rename from tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json rename to tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json index 41a19f64c5c..f0341ee905f 100644 --- a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json +++ b/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json @@ -1,7 +1,7 @@ { - "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json and .js files are consumed", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsNotSpecifiedWithConsumeJsFiles" + "project": "SameNameDTsSpecifiedWithJsExtensions" } \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..4ce47779ea4 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithJsExtensions" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json similarity index 54% rename from tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json rename to tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json index d8cb3f952ba..d151f7d499f 100644 --- a/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json +++ b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json @@ -1,7 +1,7 @@ { - "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and consumeJsFiles is true", + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameFilesNotSpecifiedWithConsumeJsFiles" + "project": "SameNameFilesNotSpecifiedWithJsExtensions" } \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json new file mode 100644 index 00000000000..da24d83de84 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecifiedWithJsExtensions" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/a.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/a.ts rename to tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/a.ts diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/b.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/b.js rename to tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/b.js diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/tsconfig.json similarity index 59% rename from tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/tsconfig.json rename to tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/tsconfig.json index 9be9952dd2b..b3fb530a291 100644 --- a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/tsconfig.json +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { "out": "test.js", - "consumeJsFiles": true + "jsExtensions": [ "js" ] } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/a.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.ts rename to tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/a.ts diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/b.js new file mode 100644 index 00000000000..9fdf6253b80 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/b.js @@ -0,0 +1 @@ +var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/tsconfig.json new file mode 100644 index 00000000000..f52029d734e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "out": "test.js", + "jsExtensions": [ "js" ] + }, + "files": [ "a.ts", "b.js" ] +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.d.ts new file mode 100644 index 00000000000..d9e24d329b7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.d.ts @@ -0,0 +1 @@ +declare var test: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.js rename to tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.js diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/tsconfig.json new file mode 100644 index 00000000000..de14c20c662 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { "jsExtensions": [ "js" ] }, + "files": [ "a.d.ts" ] +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/tsconfig.json deleted file mode 100644 index df05c5d4d52..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -{ "compilerOptions": { "consumeJsFiles": true } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.d.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithConsumeJsFiles/a.d.ts rename to tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.d.ts diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/a.js rename to tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.js diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json new file mode 100644 index 00000000000..e14243307e2 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "jsExtensions": [ "js" ] } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/tsconfig.json deleted file mode 100644 index df05c5d4d52..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithConsumeJsFiles/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -{ "compilerOptions": { "consumeJsFiles": true } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.js b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.ts b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/tsconfig.json new file mode 100644 index 00000000000..e14243307e2 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "jsExtensions": [ "js" ] } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.js b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.ts b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.ts new file mode 100644 index 00000000000..6d820a0093e --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/tsconfig.json new file mode 100644 index 00000000000..8f3028a8ad1 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { "jsExtensions": [ "js" ] }, + "files": [ "a.ts" ] +} \ No newline at end of file diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index 262430db86a..46a283b5e2c 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -36,21 +36,21 @@ module ts { describe("Node module resolution - relative paths", () => { function testLoadAsFile(containingFileName: string, moduleFileNameNoExt: string, moduleName: string): void { - for (let ext of supportedExtensions) { + for (let ext of supportedTypeScriptExtensions) { let containingFile = { name: containingFileName } - let moduleFile = { name: moduleFileNameNoExt + ext } - let resolution = nodeModuleNameResolver(moduleName, containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); + let moduleFile = { name: moduleFileNameNoExt + "." + ext } + let resolution = nodeModuleNameResolver(moduleName, containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); let failedLookupLocations: string[] = []; let dir = getDirectoryPath(containingFileName); - for (let e of supportedExtensions) { + for (let e of supportedTypeScriptExtensions) { if (e === ext) { break; } else { - failedLookupLocations.push(normalizePath(getRootLength(moduleName) === 0 ? combinePaths(dir, moduleName) : moduleName) + e); + failedLookupLocations.push(normalizePath(getRootLength(moduleName) === 0 ? combinePaths(dir, moduleName) : moduleName) + "." + e); } } @@ -78,11 +78,11 @@ module ts { let containingFile = { name: containingFileName }; let packageJson = { name: packageJsonFileName, content: JSON.stringify({ "typings": fieldRef }) }; let moduleFile = { name: moduleFileName }; - let resolution = nodeModuleNameResolver(moduleName, containingFile.name, createModuleResolutionHost(containingFile, packageJson, moduleFile)); + let resolution = nodeModuleNameResolver(moduleName, containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, packageJson, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); // expect three failed lookup location - attempt to load module as file with all supported extensions - assert.equal(resolution.failedLookupLocations.length, ts.supportedExtensions.length); + assert.equal(resolution.failedLookupLocations.length, supportedTypeScriptExtensions.length); } it("module name as directory - load from typings", () => { @@ -96,14 +96,13 @@ module ts { let containingFile = {name: "/a/b/c.ts"}; let packageJson = {name: "/a/b/foo/package.json", content: JSON.stringify({main: "/c/d"})}; let indexFile = { name: "/a/b/foo/index.d.ts" }; - let resolution = nodeModuleNameResolver("./foo", containingFile.name, createModuleResolutionHost(containingFile, packageJson, indexFile)); + let resolution = nodeModuleNameResolver("./foo", containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, packageJson, indexFile)); assert.equal(resolution.resolvedModule.resolvedFileName, indexFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); assert.deepEqual(resolution.failedLookupLocations, [ "/a/b/foo.ts", "/a/b/foo.tsx", "/a/b/foo.d.ts", - "/a/b/foo.js", "/a/b/foo/index.ts", "/a/b/foo/index.tsx", ]); @@ -114,7 +113,7 @@ module ts { it("load module as file - ts files not loaded", () => { let containingFile = { name: "/a/b/c/d/e.ts" }; let moduleFile = { name: "/a/b/node_modules/foo.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule, undefined); assert.deepEqual(resolution.failedLookupLocations, [ "/a/b/c/d/node_modules/foo.d.ts", @@ -138,7 +137,7 @@ module ts { it("load module as file", () => { let containingFile = { name: "/a/b/c/d/e.ts" }; let moduleFile = { name: "/a/b/node_modules/foo.d.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); }); @@ -146,7 +145,7 @@ module ts { it("load module as directory", () => { let containingFile = { name: "/a/node_modules/b/c/node_modules/d/e.ts" }; let moduleFile = { name: "/a/node_modules/foo/index.d.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); assert.deepEqual(resolution.failedLookupLocations, [ From 7f09c8125141b897e0676807ea727199e79896f6 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Sep 2015 12:33:20 -0700 Subject: [PATCH 27/89] Syntax changes if the extensions to treat as javascript change --- src/compiler/program.ts | 3 ++- src/services/services.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 0110e0b529a..f6daf4880b6 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -357,7 +357,8 @@ namespace ts { (oldOptions.noResolve !== options.noResolve) || (oldOptions.target !== options.target) || (oldOptions.noLib !== options.noLib) || - (oldOptions.jsx !== options.jsx)) { + (oldOptions.jsx !== options.jsx) || + (oldOptions.jsExtensions !== options.jsExtensions)) { oldProgram = undefined; } } diff --git a/src/services/services.ts b/src/services/services.ts index 6517e0c0a4a..421f46b3bc6 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1995,7 +1995,7 @@ namespace ts { let getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); function getKeyFromCompilationSettings(settings: CompilerOptions): string { - return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx; + return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + +"|" + settings.jsExtensions; } function getBucketForCompilationSettings(settings: CompilerOptions, createIfMissing: boolean): FileMap { @@ -2625,7 +2625,8 @@ namespace ts { (oldSettings.target !== newSettings.target || oldSettings.module !== newSettings.module || oldSettings.noResolve !== newSettings.noResolve || - oldSettings.jsx !== newSettings.jsx); + oldSettings.jsx !== newSettings.jsx || + oldSettings.jsExtensions !== newSettings.jsExtensions); // Now create a new compiler let compilerHost: CompilerHost = { From 607564f2e2845c14546e32393c7a5c3091111240 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Sep 2015 12:09:23 -0700 Subject: [PATCH 28/89] Parse all the javascript files with JSX grammer --- src/compiler/parser.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 27d85a3b4a8..89ef8b1485c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -530,6 +530,10 @@ namespace ts { return result; } + function getLanguageVariant(fileName: string) { + return isTsx(fileName) || isJavaScript(fileName) ? LanguageVariant.JSX : LanguageVariant.Standard; + } + function initializeState(fileName: string, _sourceText: string, languageVersion: ScriptTarget, _syntaxCursor: IncrementalParser.SyntaxCursor) { sourceText = _sourceText; syntaxCursor = _syntaxCursor; @@ -547,7 +551,7 @@ namespace ts { scanner.setText(sourceText); scanner.setOnError(scanError); scanner.setScriptTarget(languageVersion); - scanner.setLanguageVariant(isTsx(fileName) ? LanguageVariant.JSX : LanguageVariant.Standard); + scanner.setLanguageVariant(getLanguageVariant(fileName)); } function clearState() { @@ -660,7 +664,7 @@ namespace ts { sourceFile.languageVersion = languageVersion; sourceFile.fileName = normalizePath(fileName); sourceFile.flags = fileExtensionIs(sourceFile.fileName, "d.ts") ? NodeFlags.DeclarationFile : 0; - sourceFile.languageVariant = isTsx(sourceFile.fileName) ? LanguageVariant.JSX : LanguageVariant.Standard; + sourceFile.languageVariant = getLanguageVariant(sourceFile.fileName); return sourceFile; } From 0fe282e71994ac950e32b8040e714f563609a32f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Sep 2015 12:50:25 -0700 Subject: [PATCH 29/89] Update the type assertion errors to jsx syntax error as we are treating js files as jsx files --- .../jsFileCompilationTypeAssertions.errors.txt | 6 +++--- .../fourslash/getJavaScriptSemanticDiagnostics20.ts | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index de1e1038db6..6d4ef23dcc6 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. +tests/cases/compiler/a.js(1,27): error TS17002: Expected corresponding JSX closing tag for 'string'. ==== tests/cases/compiler/a.js (1 errors) ==== var v = undefined; - ~~~~~~ -!!! error TS8016: 'type assertion expressions' can only be used in a .ts file. \ No newline at end of file + +!!! error TS17002: Expected corresponding JSX closing tag for 'string'. \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts index 790f02bac92..5172ee7701c 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts @@ -4,12 +4,13 @@ // @Filename: a.js //// var v = undefined; -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { - "message": "'type assertion expressions' can only be used in a .ts file.", - "start": 9, - "length": 6, + "message": "Expected corresponding JSX closing tag for 'string'.", + "start": 26, + "length": 0, "category": "error", - "code": 8016 + "code": 17002 } -]`); \ No newline at end of file +]`); +verify.getSemanticDiagnostics(`[]`); \ No newline at end of file From ce652dc7fbcc34fa36c312aa599fb9904b9f43aa Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 12:27:06 -0700 Subject: [PATCH 30/89] Fixing few code review comments --- src/compiler/commandLineParser.ts | 10 +++++++--- src/compiler/program.ts | 4 ++-- src/compiler/tsc.ts | 2 +- src/harness/projectsRunner.ts | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 2ee0f67382b..603dff9e779 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -375,9 +375,14 @@ namespace ts { } } + /** + * Parses non quoted strings separated by comma e.g. "a,b" would result in string array ["a", "b"] + * @param s + * @param existingValue + */ function parseMultiValueStringArray(s: string, existingValue: string[]) { let value: string[] = existingValue || []; - let hasError: boolean; + let hasError = false; let currentString = ""; if (s) { for (let i = 0; i < s.length; i++) { @@ -480,8 +485,7 @@ namespace ts { } // Check if the value asked was string[] and value provided was not string[] else if (expectedType !== "string[]" || - typeof jsonValue !== "object" || - typeof jsonValue.length !== "number" || + !(jsonValue instanceof Array) || forEach(jsonValue, individualValue => typeof individualValue !== "string")) { // Not expectedType errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, expectedType)); diff --git a/src/compiler/program.ts b/src/compiler/program.ts index f6daf4880b6..999b8bd6df1 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -14,10 +14,10 @@ namespace ts { export const version = "1.7.0"; - export function findConfigFile(searchPath: string, moduleResolutionHost: ModuleResolutionHost): string { + export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string { let fileName = "tsconfig.json"; while (true) { - if (moduleResolutionHost.fileExists(fileName)) { + if (fileExists(fileName)) { return fileName; } let parentPath = getDirectoryPath(searchPath); diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 8c1bf962aae..a0c3cc642e2 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -188,7 +188,7 @@ namespace ts { } else if (commandLine.fileNames.length === 0 && isJSONSupported()) { let searchPath = normalizePath(sys.getCurrentDirectory()); - configFileName = findConfigFile(searchPath, sys); + configFileName = findConfigFile(searchPath, sys.fileExists); } if (commandLine.fileNames.length === 0 && !configFileName) { diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index a250cb3daac..700423a721f 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -195,7 +195,7 @@ class ProjectRunner extends RunnerBase { assert(!inputFiles || inputFiles.length === 0, "cannot specify input files and project option together"); } else if (!inputFiles || inputFiles.length === 0) { - configFileName = ts.findConfigFile("", { fileExists, readFile: getSourceFileText }); + configFileName = ts.findConfigFile("", fileExists); } if (configFileName) { From 460c5978cd905b86ef56647b12f9db4447d7b098 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 12:28:23 -0700 Subject: [PATCH 31/89] Changes in harness to emit expected and actual to figure out baseline error thats reported only on travis run tests --- src/harness/harness.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index a04b3af84ca..f4cde09c704 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1650,7 +1650,7 @@ module Harness { let encoded_actual = Utils.encodeString(actual); if (expected != encoded_actual) { // Overwrite & issue error - let errMsg = "The baseline file " + relativeFileName + " has changed"; + let errMsg = "The baseline file " + relativeFileName + " has changed.\nExpected:\n" + expected + "\nActual:\n" + encoded_actual; throw new Error(errMsg); } } From 108f8568efc391dab61535de8fe0cfef3bc58af4 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 15:17:10 -0700 Subject: [PATCH 32/89] Remove tsconfig files of failing testcases --- .../jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json | 0 .../SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json | 1 - 2 files changed, 1 deletion(-) delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json deleted file mode 100644 index e14243307e2..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -{ "compilerOptions": { "jsExtensions": [ "js" ] } } \ No newline at end of file From b3e4f8e1ca62013cf01b020abd5d654f86a6808e Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 15:18:46 -0700 Subject: [PATCH 33/89] Create new tscconfig files for the failing testcases --- .../jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json | 0 .../SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json | 1 + 2 files changed, 1 insertion(+) create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json new file mode 100644 index 00000000000..e14243307e2 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "jsExtensions": [ "js" ] } } \ No newline at end of file From db9faf6039310746ef4ad75f5f22fc0d7808cb15 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 15:37:13 -0700 Subject: [PATCH 34/89] Temp change to investigate test failure --- src/compiler/commandLineParser.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 603dff9e779..6daa1ec8857 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -458,6 +458,8 @@ namespace ts { * @param jsonText The text of the config file */ export function parseConfigFileText(fileName: string, jsonText: string): { config?: any; error?: Diagnostic } { + console.log("fileName: \"" + fileName + "\""); + console.log("jsonText: \"" + jsonText + "\""); try { return { config: /\S/.test(jsonText) ? JSON.parse(jsonText) : {} }; } From 938c5334eb69533821c559669e654ef8470e1587 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 16:01:33 -0700 Subject: [PATCH 35/89] Remove the failing testcases --- .../projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts | 1 - .../projects/jsFileCompilation/SameNameDtsNotSpecified/a.js | 1 - .../jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json | 0 .../SameNameDtsNotSpecifiedWithJsExtensions/a.d.ts | 1 - .../SameNameDtsNotSpecifiedWithJsExtensions/a.js | 1 - .../SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json | 1 - 6 files changed, 5 deletions(-) delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.js delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.d.ts delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.js delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts deleted file mode 100644 index 16cb2db6fd7..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare var a: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.js deleted file mode 100644 index bbad8b11e3d..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/a.js +++ /dev/null @@ -1 +0,0 @@ -var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecified/tsconfig.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.d.ts deleted file mode 100644 index 16cb2db6fd7..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare var a: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.js b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.js deleted file mode 100644 index bbad8b11e3d..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/a.js +++ /dev/null @@ -1 +0,0 @@ -var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json deleted file mode 100644 index e14243307e2..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -{ "compilerOptions": { "jsExtensions": [ "js" ] } } \ No newline at end of file From 567d71c848209efa4cc02f8138bc487d677b9b0f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 16:02:04 -0700 Subject: [PATCH 36/89] Add new test cases --- .../projects/jsFileCompilation/SameNameDTsNotSpecified/a.d.ts | 1 + .../projects/jsFileCompilation/SameNameDTsNotSpecified/a.js | 1 + .../jsFileCompilation/SameNameDTsNotSpecified/tsconfig.json | 0 .../SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts | 1 + .../SameNameDTsNotSpecifiedWithJsExtensions/a.js | 1 + .../SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json | 1 + 6 files changed, 5 insertions(+) create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.d.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/tsconfig.json create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.js create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.d.ts new file mode 100644 index 00000000000..16cb2db6fd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.d.ts @@ -0,0 +1 @@ +declare var a: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/tsconfig.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts new file mode 100644 index 00000000000..16cb2db6fd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts @@ -0,0 +1 @@ +declare var a: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.js new file mode 100644 index 00000000000..bbad8b11e3d --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json new file mode 100644 index 00000000000..e14243307e2 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "jsExtensions": [ "js" ] } } \ No newline at end of file From 756052a4e0f6285af69abce8b2861677805c53c0 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 16:06:12 -0700 Subject: [PATCH 37/89] Removing console logs that were for debugging --- src/compiler/commandLineParser.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 6daa1ec8857..603dff9e779 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -458,8 +458,6 @@ namespace ts { * @param jsonText The text of the config file */ export function parseConfigFileText(fileName: string, jsonText: string): { config?: any; error?: Diagnostic } { - console.log("fileName: \"" + fileName + "\""); - console.log("jsonText: \"" + jsonText + "\""); try { return { config: /\S/.test(jsonText) ? JSON.parse(jsonText) : {} }; } From 17fca985cc5ab760b24610994030265da56f4d54 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 5 Oct 2015 22:09:32 -0700 Subject: [PATCH 38/89] Fix tslint error --- src/harness/projectsRunner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index f5d89ba86c3..39c9a458e9c 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -3,7 +3,7 @@ /* tslint:disable:no-null */ // Test case is json of below type in tests/cases/project/ -interface ProjectRunnerTestCase extends ts.CompilerOptions{ +interface ProjectRunnerTestCase extends ts.CompilerOptions { scenario: string; projectRoot: string; // project where it lives - this also is the current directory when compiling inputFiles: string[]; // list of input files to be given to program From 242eb8bc5c7fa5ded4c4f91f79a4a59f96e9dda5 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 6 Oct 2015 15:49:39 -0700 Subject: [PATCH 39/89] Taken feedback into account and simplified the getFileNames logic to handle extensions by priority --- src/compiler/commandLineParser.ts | 52 +++++++++++++++++++------------ 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 1db54e66b62..792a85ac522 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -551,28 +551,40 @@ namespace ts { } } else { + let filesSeen: Map = {}; let exclude = json["exclude"] instanceof Array ? map(json["exclude"], normalizeSlashes) : undefined; - let extensionsToRead = getSupportedExtensions(options); - for (let extensionsIndex = 0; extensionsIndex < extensionsToRead.length; extensionsIndex++) { - let extension = extensionsToRead[extensionsIndex]; - let sysFiles = host.readDirectory(basePath, extension, exclude); - for (let i = 0; i < sysFiles.length; i++) { - let fileName = sysFiles[i]; - // If this is not the extension of one of the lower priority extension, then only we can use this file name - // This could happen if the extension taking priority is substring of lower priority extension. eg. .ts and .d.ts - let hasLowerPriorityExtension: boolean; - for (let j = extensionsIndex + 1; !hasLowerPriorityExtension && j < extensionsToRead.length; j++) { - hasLowerPriorityExtension = fileExtensionIs(fileName, extensionsToRead[j]); - }; - if (!hasLowerPriorityExtension) { - // If the basename + higher priority extensions arent in the filenames, use this file name - let baseName = fileName.substr(0, fileName.length - extension.length - 1); - let hasSameNameHigherPriorityExtensionFile: boolean; - for (let j = 0; !hasSameNameHigherPriorityExtensionFile && j < extensionsIndex; j++) { - hasSameNameHigherPriorityExtensionFile = contains(fileNames, baseName + "." + extensionsToRead[j]); - }; + let extensionsByPriority = getSupportedExtensions(options); + for (let extensionsIndex = 0; extensionsIndex < extensionsByPriority.length; extensionsIndex++) { + let currentExtension = extensionsByPriority[extensionsIndex]; + let filesInDirWithExtension = host.readDirectory(basePath, currentExtension, exclude); + // Get list of conflicting extensions, conflicting extension is + // - extension that is lower priority than current extension and + // - extension also is current extension (ends with "." + currentExtension) + let conflictingExtensions: string[] = []; + for (let i = extensionsIndex + 1; i < extensionsByPriority.length; i++) { + let extension = extensionsByPriority[i]; // lower priority extension + if (fileExtensionIs(extension, currentExtension)) { // also has current extension + conflictingExtensions.push(extension); + } + } - if (!hasSameNameHigherPriorityExtensionFile) { + // Add the files to fileNames list if the file is not any of conflicting extension + for (const fileName of filesInDirWithExtension) { + let hasConflictingExtension = false; + for (const conflictingExtension of conflictingExtensions) { + // eg. 'f.d.ts' will match '.ts' extension but really should be process later with '.d.ts' files + if (fileExtensionIs(fileName, conflictingExtension)) { + hasConflictingExtension = true; + break; + } + } + + if (!hasConflictingExtension) { + // Add the file only if there is no higher priority extension file already included + // eg. when a.d.ts and a.js are present in the folder, include only a.d.ts not a.js + const baseName = fileName.substr(0, fileName.length - currentExtension.length - 1); + if (!hasProperty(filesSeen, baseName)) { + filesSeen[baseName] = true; fileNames.push(fileName); } } From f7b72047f0ff79b2b95e8638c0b9a0bcbc298e15 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 8 Oct 2015 14:26:40 -0700 Subject: [PATCH 40/89] Remove extension for emitting output should remove any of supported extensions + js/jsx to get the dts file --- src/compiler/core.ts | 6 ++++-- src/compiler/declarationEmitter.ts | 5 +++-- src/compiler/utilities.ts | 9 +++++++-- src/harness/harness.ts | 2 +- src/harness/projectsRunner.ts | 6 +++--- src/harness/test262Runner.ts | 2 +- tests/cases/unittests/transpile.ts | 2 +- 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 6035f9898ce..22cafc034b4 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -723,8 +723,10 @@ namespace ts { */ export const supportedTypeScriptExtensions = ["ts", "tsx", "d.ts"]; - const extensionsToRemove = ["d.ts", "ts", "js", "tsx", "jsx"]; - export function removeFileExtension(path: string): string { + export function removeFileExtension(path: string, supportedExtensions: string[]): string { + // Sort the extensions in descending order of their length + let extensionsToRemove = supportedExtensions.slice(0, supportedExtensions.length) // Get duplicate array + .sort((ext1, ext2) => compareValues(ext2.length, ext1.length)); // Sort in descending order of extension length for (let ext of extensionsToRemove) { if (fileExtensionIs(path, ext)) { return path.substr(0, path.length - ext.length - 1); diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 4c0c6d20ad0..9e8e366aaac 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -1605,7 +1605,7 @@ namespace ts { ? referencedFile.fileName // Declaration file, use declaration file name : shouldEmitToOwnFile(referencedFile, compilerOptions) ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") // Own output file so get the .d.ts file - : removeFileExtension(compilerOptions.outFile || compilerOptions.out) + ".d.ts"; // Global out file + : removeFileExtension(compilerOptions.outFile || compilerOptions.out, getExtensionsToRemoveForEmitPath(compilerOptions)) + ".d.ts"; // Global out file declFileName = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizeSlashes(jsFilePath)), @@ -1626,7 +1626,8 @@ namespace ts { if (!emitDeclarationResult.reportedDeclarationError) { let declarationOutput = emitDeclarationResult.referencePathsOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); - writeFile(host, diagnostics, removeFileExtension(jsFilePath) + ".d.ts", declarationOutput, host.getCompilerOptions().emitBOM); + let compilerOptions = host.getCompilerOptions(); + writeFile(host, diagnostics, removeFileExtension(jsFilePath, getExtensionsToRemoveForEmitPath(compilerOptions)) + ".d.ts", declarationOutput, compilerOptions.emitBOM); } function getDeclarationOutput(synchronousDeclarationOutput: string, moduleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[]) { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 00efbe9616e..dc43b837c7c 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1748,14 +1748,19 @@ namespace ts { }; } + export function getExtensionsToRemoveForEmitPath(compilerOptons: CompilerOptions) { + return getSupportedExtensions(compilerOptons).concat("jsx", "js"); + } + export function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string) { let compilerOptions = host.getCompilerOptions(); let emitOutputFilePathWithoutExtension: string; if (compilerOptions.outDir) { - emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); + emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir), + getExtensionsToRemoveForEmitPath(compilerOptions)); } else { - emitOutputFilePathWithoutExtension = removeFileExtension(sourceFile.fileName); + emitOutputFilePathWithoutExtension = removeFileExtension(sourceFile.fileName, getExtensionsToRemoveForEmitPath(compilerOptions)); } return emitOutputFilePathWithoutExtension + extension; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 451bb4adfc6..4ebc1976217 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1187,7 +1187,7 @@ namespace Harness { sourceFileName = outFile; } - let dTsFileName = ts.removeFileExtension(sourceFileName) + ".d.ts"; + let dTsFileName = ts.removeFileExtension(sourceFileName, ts.getExtensionsToRemoveForEmitPath(options)) + ".d.ts"; return ts.forEach(result.declFilesCode, declFile => declFile.fileName === dTsFileName ? declFile : undefined); } diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index 39c9a458e9c..cd099279fa8 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -356,17 +356,17 @@ class ProjectRunner extends RunnerBase { if (compilerOptions.outDir) { let sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, compilerResult.program.getCurrentDirectory()); sourceFilePath = sourceFilePath.replace(compilerResult.program.getCommonSourceDirectory(), ""); - emitOutputFilePathWithoutExtension = ts.removeFileExtension(ts.combinePaths(compilerOptions.outDir, sourceFilePath)); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(ts.combinePaths(compilerOptions.outDir, sourceFilePath), ts.getExtensionsToRemoveForEmitPath(compilerOptions)); } else { - emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName, ts.getExtensionsToRemoveForEmitPath(compilerOptions)); } let outputDtsFileName = emitOutputFilePathWithoutExtension + ".d.ts"; allInputFiles.unshift(findOutpuDtsFile(outputDtsFileName)); } else { - let outputDtsFileName = ts.removeFileExtension(compilerOptions.outFile || compilerOptions.out) + ".d.ts"; + let outputDtsFileName = ts.removeFileExtension(compilerOptions.outFile || compilerOptions.out, ts.getExtensionsToRemoveForEmitPath(compilerOptions)) + ".d.ts"; let outputDtsFile = findOutpuDtsFile(outputDtsFileName); if (!ts.contains(allInputFiles, outputDtsFile)) { allInputFiles.unshift(outputDtsFile); diff --git a/src/harness/test262Runner.ts b/src/harness/test262Runner.ts index 491c71a5839..1e95fc4ae74 100644 --- a/src/harness/test262Runner.ts +++ b/src/harness/test262Runner.ts @@ -37,7 +37,7 @@ class Test262BaselineRunner extends RunnerBase { before(() => { let content = Harness.IO.readFile(filePath); - let testFilename = ts.removeFileExtension(filePath).replace(/\//g, "_") + ".test"; + let testFilename = ts.removeFileExtension(filePath, ["js"]).replace(/\//g, "_") + ".test"; let testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, testFilename); let inputFiles = testCaseContent.testUnitData.map(unit => { diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index ca7d1faa4a9..95f7f443565 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -64,7 +64,7 @@ module ts { let transpileModuleResultWithSourceMap = transpileModule(input, transpileOptions); assert.isTrue(transpileModuleResultWithSourceMap.sourceMapText !== undefined); - let expectedSourceMapFileName = removeFileExtension(getBaseFileName(normalizeSlashes(transpileOptions.fileName))) + ".js.map"; + let expectedSourceMapFileName = removeFileExtension(getBaseFileName(normalizeSlashes(transpileOptions.fileName)), ts.getExtensionsToRemoveForEmitPath(transpileOptions.compilerOptions)) + ".js.map"; let expectedSourceMappingUrlLine = `//# sourceMappingURL=${expectedSourceMapFileName}`; if (testSettings.expectedOutput !== undefined) { From 2d083f7d83181aadb24436b91e224e237f1ec3ca Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 8 Oct 2015 14:27:02 -0700 Subject: [PATCH 41/89] Use compilation options to get extensions to remove to get module name --- src/compiler/binder.ts | 8 ++++---- src/compiler/checker.ts | 2 +- src/services/navigationBar.ts | 4 ++-- src/services/services.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 65768332360..c869bb3c65d 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -77,13 +77,13 @@ namespace ts { IsContainerWithLocals = IsContainer | HasLocals } - export function bindSourceFile(file: SourceFile) { + export function bindSourceFile(file: SourceFile, compilerOptions: CompilerOptions) { let start = new Date().getTime(); - bindSourceFileWorker(file); + bindSourceFileWorker(file, compilerOptions); bindTime += new Date().getTime() - start; } - function bindSourceFileWorker(file: SourceFile) { + function bindSourceFileWorker(file: SourceFile, compilerOptions: CompilerOptions) { let parent: Node; let container: Node; let blockScopeContainer: Node; @@ -941,7 +941,7 @@ namespace ts { function bindSourceFileIfExternalModule() { setExportContextFlag(file); if (isExternalModule(file)) { - bindAnonymousDeclaration(file, SymbolFlags.ValueModule, `"${removeFileExtension(file.fileName)}"`); + bindAnonymousDeclaration(file, SymbolFlags.ValueModule, `"${removeFileExtension(file.fileName, getSupportedExtensions(compilerOptions))}"`); } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 40db300d310..def0eb4cf9f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14833,7 +14833,7 @@ namespace ts { function initializeTypeChecker() { // Bind all source files and propagate errors forEach(host.getSourceFiles(), file => { - bindSourceFile(file); + bindSourceFile(file, compilerOptions); }); // Initialize global symbol table diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index e822052a5b2..5dbc514d462 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -2,7 +2,7 @@ /* @internal */ namespace ts.NavigationBar { - export function getNavigationBarItems(sourceFile: SourceFile): ts.NavigationBarItem[] { + export function getNavigationBarItems(sourceFile: SourceFile, compilerOptions: CompilerOptions): ts.NavigationBarItem[] { // If the source file has any child items, then it included in the tree // and takes lexical ownership of all other top-level items. let hasGlobalNode = false; @@ -442,7 +442,7 @@ namespace ts.NavigationBar { hasGlobalNode = true; let rootName = isExternalModule(node) - ? "\"" + escapeString(getBaseFileName(removeFileExtension(normalizePath(node.fileName)))) + "\"" + ? "\"" + escapeString(getBaseFileName(removeFileExtension(normalizePath(node.fileName), getSupportedExtensions(compilerOptions)))) + "\"" : "" return getNavigationBarItem(rootName, diff --git a/src/services/services.ts b/src/services/services.ts index e62132dac1e..9420080abe9 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -6263,7 +6263,7 @@ namespace ts { function getNavigationBarItems(fileName: string): NavigationBarItem[] { let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return NavigationBar.getNavigationBarItems(sourceFile); + return NavigationBar.getNavigationBarItems(sourceFile, host.getCompilationSettings()); } function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] { From 5e14edb4b740669451f8e0a4cffcf7692a3eb49d Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Oct 2015 12:25:13 -0700 Subject: [PATCH 42/89] Verify the emit file name is unique and doesnt overwrite input file Fixes #4424 --- src/compiler/declarationEmitter.ts | 18 +++--- src/compiler/diagnosticMessages.json | 6 +- src/compiler/emitter.ts | 27 +++------ src/compiler/program.ts | 60 +++++++++++++++++-- src/compiler/utilities.ts | 40 +++++++++++++ ...hDeclarationEmitPathSameAsInput.errors.txt | 10 ++++ ...lationWithJsEmitPathSameAsInput.errors.txt | 12 ++++ ...rationFileNameSameAsInputJsFile.errors.txt | 10 ++++ ...ithOutFileNameSameAsInputJsFile.errors.txt | 4 +- ...ationWithDeclarationEmitPathSameAsInput.ts | 7 +++ ...ileCompilationWithJsEmitPathSameAsInput.ts | 8 +++ ...OutDeclarationFileNameSameAsInputJsFile.ts | 8 +++ 12 files changed, 175 insertions(+), 35 deletions(-) create mode 100644 tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt create mode 100644 tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts create mode 100644 tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts create mode 100644 tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 9e8e366aaac..9534b22f47a 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -32,12 +32,12 @@ namespace ts { export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, targetSourceFile: SourceFile): Diagnostic[] { let diagnostics: Diagnostic[] = []; - let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); - emitDeclarations(host, resolver, diagnostics, jsFilePath, targetSourceFile); + let { declarationFilePath } = getEmitFileNames(targetSourceFile, host); + emitDeclarations(host, resolver, diagnostics, declarationFilePath, targetSourceFile); return diagnostics; } - function emitDeclarations(host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[], jsFilePath: string, root?: SourceFile): DeclarationEmit { + function emitDeclarations(host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[], declarationFilePath: string, root?: SourceFile): DeclarationEmit { let newLine = host.getNewLine(); let compilerOptions = host.getCompilerOptions(); @@ -1603,12 +1603,10 @@ namespace ts { function writeReferencePath(referencedFile: SourceFile) { let declFileName = referencedFile.flags & NodeFlags.DeclarationFile ? referencedFile.fileName // Declaration file, use declaration file name - : shouldEmitToOwnFile(referencedFile, compilerOptions) - ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") // Own output file so get the .d.ts file - : removeFileExtension(compilerOptions.outFile || compilerOptions.out, getExtensionsToRemoveForEmitPath(compilerOptions)) + ".d.ts"; // Global out file + : getEmitFileNames(referencedFile, host).declarationFilePath; // declaration file name declFileName = getRelativePathToDirectoryOrUrl( - getDirectoryPath(normalizeSlashes(jsFilePath)), + getDirectoryPath(normalizeSlashes(declarationFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, @@ -1619,15 +1617,15 @@ namespace ts { } /* @internal */ - export function writeDeclarationFile(jsFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[]) { - let emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, jsFilePath, sourceFile); + export function writeDeclarationFile(declarationFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[]) { + let emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, declarationFilePath, sourceFile); // TODO(shkamat): Should we not write any declaration file if any of them can produce error, // or should we just not write this file like we are doing now if (!emitDeclarationResult.reportedDeclarationError) { let declarationOutput = emitDeclarationResult.referencePathsOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); let compilerOptions = host.getCompilerOptions(); - writeFile(host, diagnostics, removeFileExtension(jsFilePath, getExtensionsToRemoveForEmitPath(compilerOptions)) + ".d.ts", declarationOutput, compilerOptions.emitBOM); + writeFile(host, diagnostics, declarationFilePath, declarationOutput, compilerOptions.emitBOM); } function getDeclarationOutput(synchronousDeclarationOutput: string, moduleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[]) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index da6196b1daf..b03faaf26df 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2060,10 +2060,14 @@ "category": "Error", "code": 5054 }, - "Could not write file '{0}' which is one of the input files.": { + "Cannot write file '{0}' which is one of the input files.": { "category": "Error", "code": 5055 }, + "Cannot write file '{0}' since one or more input files would emit into it.": { + "category": "Error", + "code": 5056 + }, "Concatenate and emit output to single file.": { "category": "Message", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index a5166a3479f..89fc1f5d927 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -324,31 +324,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined; let diagnostics: Diagnostic[] = []; let newLine = host.getNewLine(); - let jsxDesugaring = host.getCompilerOptions().jsx !== JsxEmit.Preserve; - let shouldEmitJsx = (s: SourceFile) => (s.languageVariant === LanguageVariant.JSX && !jsxDesugaring); if (targetSourceFile === undefined) { forEach(host.getSourceFiles(), sourceFile => { if (shouldEmitToOwnFile(sourceFile, compilerOptions)) { - let jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); - emitFile(jsFilePath, sourceFile); + emitFile(getEmitFileNames(sourceFile, host), sourceFile); } }); if (compilerOptions.outFile || compilerOptions.out) { - emitFile(compilerOptions.outFile || compilerOptions.out); + emitFile(getBundledEmitFileNames(compilerOptions)); } } else { // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) if (shouldEmitToOwnFile(targetSourceFile, compilerOptions)) { - let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, shouldEmitJsx(targetSourceFile) ? ".jsx" : ".js"); - emitFile(jsFilePath, targetSourceFile); + emitFile(getEmitFileNames(targetSourceFile, host), targetSourceFile); } else if (!isDeclarationFile(targetSourceFile) && !isJavaScript(targetSourceFile.fileName) && (compilerOptions.outFile || compilerOptions.out)) { - emitFile(compilerOptions.outFile || compilerOptions.out); + emitFile(getBundledEmitFileNames(compilerOptions)); } } @@ -7491,18 +7487,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function emitFile(jsFilePath: string, sourceFile?: SourceFile) { - if (forEach(host.getSourceFiles(), sourceFile => jsFilePath === sourceFile.fileName)) { - // TODO(shkamat) Verify if this works if same file is referred via different paths ..\foo\a.js and a.js refering to same one - // Report error and dont emit this file - diagnostics.push(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_which_is_one_of_the_input_files, jsFilePath)); - return; + function emitFile({ jsFilePath, declarationFilePath}: { jsFilePath: string, declarationFilePath: string }, sourceFile?: SourceFile) { + if (!host.isEmitBlocked(jsFilePath)) { + emitJavaScript(jsFilePath, sourceFile); } - emitJavaScript(jsFilePath, sourceFile); - - if (compilerOptions.declaration) { - writeDeclarationFile(jsFilePath, sourceFile, host, resolver, diagnostics); + if (compilerOptions.declaration && !host.isEmitBlocked(declarationFilePath)) { + writeDeclarationFile(declarationFilePath, sourceFile, host, resolver, diagnostics); } } } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index dcb9e0791a7..b15db858db4 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -330,6 +330,7 @@ namespace ts { let files: SourceFile[] = []; let fileProcessingDiagnostics = createDiagnosticCollection(); let programDiagnostics = createDiagnosticCollection(); + let hasEmitBlockingDiagnostics: Map = {}; // Map storing if there is emit blocking diagnostics for given input let commonSourceDirectory: string; let diagnosticsProducingTypeChecker: TypeChecker; @@ -374,13 +375,9 @@ namespace ts { } } - verifyCompilerOptions(); - // unconditionally set oldProgram to undefined to prevent it from being captured in closure oldProgram = undefined; - programTime += new Date().getTime() - start; - program = { getRootFileNames: () => rootNames, getSourceFile: getSourceFile, @@ -403,6 +400,11 @@ namespace ts { getTypeCount: () => getDiagnosticsProducingTypeChecker().getTypeCount(), getFileProcessingDiagnostics: () => fileProcessingDiagnostics }; + + verifyCompilerOptions(); + + programTime += new Date().getTime() - start; + return program; function getClassifiableNames() { @@ -519,6 +521,7 @@ namespace ts { getSourceFiles: program.getSourceFiles, writeFile: writeFileCallback || ( (fileName, data, writeByteOrderMark, onError) => host.writeFile(fileName, data, writeByteOrderMark, onError)), + isEmitBlocked: emitFileName => hasProperty(hasEmitBlockingDiagnostics, emitFileName), }; } @@ -1245,6 +1248,55 @@ namespace ts { options.target !== ScriptTarget.ES6) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_experimentalAsyncFunctions_cannot_be_specified_when_targeting_ES5_or_lower)); } + + if (!options.noEmit) { + let emitHost = getEmitHost(); + let emitFilesSeen: Map = {}; + + // Build map of files seen + for (let file of files) { + let { jsFilePath, declarationFilePath } = getEmitFileNames(file, emitHost); + if (jsFilePath) { + let filesEmittingJsFilePath = lookUp(emitFilesSeen, jsFilePath); + if (!filesEmittingJsFilePath) { + emitFilesSeen[jsFilePath] = [file]; + if (options.declaration) { + emitFilesSeen[declarationFilePath] = [file]; + } + } + else { + filesEmittingJsFilePath.push(file); + } + } + } + + // Verify that all the emit files are unique and dont overwrite input files + forEachKey(emitFilesSeen, emitFilePath => { + // Report error if the output overwrites input file + if (hasFile(files, emitFilePath)) { + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_which_is_one_of_the_input_files); + } + + // Report error if multiple files write into same file (except if specified by --out or --outFile) + if (emitFilePath !== (options.outFile || options.out)) { + // Not --out or --outFile emit, There should be single file emitting to this file + if (emitFilesSeen[emitFilePath].length > 1) { + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_since_one_or_more_input_files_would_emit_into_it); + } + } + else { + // --out or --outFile, error if there exist file emitting to single file colliding with --out + if (forEach(emitFilesSeen[emitFilePath], sourceFile => shouldEmitToOwnFile(sourceFile, options))) { + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_since_one_or_more_input_files_would_emit_into_it); + } + } + }); + } + } + + function createEmitBlockingDiagnostics(emitFileName: string, message: DiagnosticMessage) { + hasEmitBlockingDiagnostics[emitFileName] = true; + programDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); } } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index dc43b837c7c..f8a1af6f5cf 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -39,6 +39,8 @@ namespace ts { getCanonicalFileName(fileName: string): string; getNewLine(): string; + isEmitBlocked(emitFileName: string): boolean; + writeFile: WriteFileCallback; } @@ -1766,6 +1768,44 @@ namespace ts { return emitOutputFilePathWithoutExtension + extension; } + export function getEmitFileNames(sourceFile: SourceFile, host: EmitHost) { + if (!isDeclarationFile(sourceFile) && !isJavaScript(sourceFile.fileName)) { + let options = host.getCompilerOptions(); + let jsFilePath: string; + if (shouldEmitToOwnFile(sourceFile, options)) { + let jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, + sourceFile.languageVariant === LanguageVariant.JSX && options.jsx === JsxEmit.Preserve ? ".jsx" : ".js"); + return { + jsFilePath, + declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) + }; + } + else if (options.outFile || options.out) { + return getBundledEmitFileNames(options); + } + } + return { + jsFilePath: undefined, + declarationFilePath: undefined + }; + } + + export function getBundledEmitFileNames(options: CompilerOptions) { + let jsFilePath = options.outFile || options.out; + return { + jsFilePath, + declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) + }; + } + + function getDeclarationEmitFilePath(jsFilePath: string, options: CompilerOptions) { + return options.declaration ? removeFileExtension(jsFilePath, getExtensionsToRemoveForEmitPath(options)) + ".d.ts" : undefined; + } + + export function hasFile(sourceFiles: SourceFile[], fileName: string) { + return forEach(sourceFiles, file => file.fileName === fileName); + } + export function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string) { let sourceFilePath = getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); diff --git a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt new file mode 100644 index 00000000000..a9c60c0748f --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt @@ -0,0 +1,10 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' which is one of the input files. + + +!!! error TS5055: Cannot write file 'a.d.ts' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/a.d.ts (0 errors) ==== + declare function isC(): boolean; \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt new file mode 100644 index 00000000000..09e07a67bf3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/a.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt new file mode 100644 index 00000000000..ed23a30c3fa --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt @@ -0,0 +1,10 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' which is one of the input files. + + +!!! error TS5055: Cannot write file 'b.d.ts' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.d.ts (0 errors) ==== + declare function foo(): boolean; \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt index 4b25824989d..3531296e019 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Could not write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. -!!! error TS5055: Could not write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts b/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts new file mode 100644 index 00000000000..c200602dddd --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts @@ -0,0 +1,7 @@ +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: a.d.ts +declare function isC(): boolean; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts b/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts new file mode 100644 index 00000000000..27082e9a930 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts @@ -0,0 +1,8 @@ +// @jsExtensions: js +// @filename: a.ts +class c { +} + +// @filename: a.js +function foo() { +} diff --git a/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts b/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts new file mode 100644 index 00000000000..1c6bb41de14 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts @@ -0,0 +1,8 @@ +// @declaration: true +// @out: tests/cases/compiler/b.js +// @filename: a.ts +class c { +} + +// @filename: b.d.ts +declare function foo(): boolean; \ No newline at end of file From a87dae15a980e8d9b5e31fa1bd063733a6bb260c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Oct 2015 12:44:21 -0700 Subject: [PATCH 43/89] Verify that when emit blocking error occurs rest of the emit occurs as expected --- src/harness/compilerRunner.ts | 2 +- .../fileReferencesWithNoExtensions.js | 34 +++++++++++++++++++ ...CompilationEmitBlockedCorrectly.errors.txt | 17 ++++++++++ .../jsFileCompilationEmitBlockedCorrectly.js | 23 +++++++++++++ ...ationWithDeclarationEmitPathSameAsInput.js | 15 ++++++++ ...OutDeclarationFileNameSameAsInputJsFile.js | 15 ++++++++ .../jsFileCompilationEmitBlockedCorrectly.ts | 13 +++++++ 7 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/fileReferencesWithNoExtensions.js create mode 100644 tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.js create mode 100644 tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.js create mode 100644 tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js create mode 100644 tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index d9082532cb5..e3c48e33e5c 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -151,7 +151,7 @@ class CompilerBaselineRunner extends RunnerBase { }); it("Correct JS output for " + fileName, () => { - if (!ts.fileExtensionIs(lastUnit.name, "d.ts") && this.emit) { + if (!(units.length === 1 && ts.fileExtensionIs(lastUnit.name, "d.ts")) && this.emit) { if (result.files.length === 0 && result.errors.length === 0) { throw new Error("Expected at least one js file to be emitted or at least one error to be created."); } diff --git a/tests/baselines/reference/fileReferencesWithNoExtensions.js b/tests/baselines/reference/fileReferencesWithNoExtensions.js new file mode 100644 index 00000000000..48421954c3a --- /dev/null +++ b/tests/baselines/reference/fileReferencesWithNoExtensions.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/fileReferencesWithNoExtensions.ts] //// + +//// [t.ts] +/// +/// +/// +var a = aa; // Check that a.ts is referenced +var b = bb; // Check that b.d.ts is referenced +var c = cc; // Check that c.ts has precedence over c.d.ts + +//// [a.ts] +var aa = 1; + +//// [b.d.ts] +declare var bb: number; + +//// [c.ts] +var cc = 1; + +//// [c.d.ts] +declare var xx: number; + + +//// [a.js] +var aa = 1; +//// [c.js] +var cc = 1; +//// [t.js] +/// +/// +/// +var a = aa; // Check that a.ts is referenced +var b = bb; // Check that b.d.ts is referenced +var c = cc; // Check that c.ts has precedence over c.d.ts diff --git a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt new file mode 100644 index 00000000000..eb9e11e574b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt @@ -0,0 +1,17 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + // this should be emitted + class d { + } + +==== tests/cases/compiler/a.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.js b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.js new file mode 100644 index 00000000000..ea9c9f62b8d --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +// this should be emitted +class d { +} + +//// [a.js] +function foo() { +} + + +//// [b.js] +// this should be emitted +var d = (function () { + function d() { + } + return d; +})(); diff --git a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.js b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.js new file mode 100644 index 00000000000..a7ba8b49985 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts] //// + +//// [a.ts] +class c { +} + +//// [a.d.ts] +declare function isC(): boolean; + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js new file mode 100644 index 00000000000..d3b2f788d66 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts] //// + +//// [a.ts] +class c { +} + +//// [b.d.ts] +declare function foo(): boolean; + +//// [b.js] +var c = (function () { + function c() { + } + return c; +})(); diff --git a/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts b/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts new file mode 100644 index 00000000000..80f9358fb7f --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts @@ -0,0 +1,13 @@ +// @jsExtensions: js +// @filename: a.ts +class c { +} + +// @filename: b.ts +// this should be emitted +class d { +} + +// @filename: a.js +function foo() { +} From 6882035dc00f83e33e0a7117c4f9ad0110460d8d Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Oct 2015 12:50:35 -0700 Subject: [PATCH 44/89] Verify if one or more files are emitting into same output file we provide error --- .../reference/filesEmittingIntoSameOutput.errors.txt | 12 ++++++++++++ ...lesEmittingIntoSameOutputWithOutOption.errors.txt | 12 ++++++++++++ tests/cases/compiler/filesEmittingIntoSameOutput.ts | 7 +++++++ .../filesEmittingIntoSameOutputWithOutOption.ts | 9 +++++++++ 4 files changed, 40 insertions(+) create mode 100644 tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt create mode 100644 tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt create mode 100644 tests/cases/compiler/filesEmittingIntoSameOutput.ts create mode 100644 tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts diff --git a/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt b/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt new file mode 100644 index 00000000000..3a4c7eaad45 --- /dev/null +++ b/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt @@ -0,0 +1,12 @@ +error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. + + +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/a.tsx (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt new file mode 100644 index 00000000000..77cd91b9a7f --- /dev/null +++ b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt @@ -0,0 +1,12 @@ +error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. + + +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +==== tests/cases/compiler/a.ts (0 errors) ==== + export class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/cases/compiler/filesEmittingIntoSameOutput.ts b/tests/cases/compiler/filesEmittingIntoSameOutput.ts new file mode 100644 index 00000000000..2e53db45edc --- /dev/null +++ b/tests/cases/compiler/filesEmittingIntoSameOutput.ts @@ -0,0 +1,7 @@ +// @filename: a.ts +class c { +} + +// @filename: a.tsx +function foo() { +} diff --git a/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts b/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts new file mode 100644 index 00000000000..e8770c99fba --- /dev/null +++ b/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts @@ -0,0 +1,9 @@ +// @out: tests/cases/compiler/a.js +// @module: amd +// @filename: a.ts +export class c { +} + +// @filename: b.ts +function foo() { +} From 286fb3e94876018aae129e4dc8e03e68fb1a24b5 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Oct 2015 13:10:54 -0700 Subject: [PATCH 45/89] Fix the lint error --- src/compiler/program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b15db858db4..3b062e333c8 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -404,7 +404,7 @@ namespace ts { verifyCompilerOptions(); programTime += new Date().getTime() - start; - + return program; function getClassifiableNames() { From b38a81bc736ebdf06b7982ee044b507b18cc2ac3 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Oct 2015 14:31:44 -0700 Subject: [PATCH 46/89] Emit enabled for JS files --- src/compiler/declarationEmitter.ts | 42 +++++++------------ src/compiler/diagnosticMessages.json | 4 -- src/compiler/emitter.ts | 3 +- src/compiler/utilities.ts | 6 +-- ...tionAmbientVarDeclarationSyntax.errors.txt | 2 + ...sFileCompilationDecoratorSyntax.errors.txt | 2 + ...CompilationEmitBlockedCorrectly.errors.txt | 2 + .../jsFileCompilationEmitDeclarations.js | 3 ++ ...ileCompilationEmitTrippleSlashReference.js | 7 ++++ .../jsFileCompilationEnumSyntax.errors.txt | 2 + ...onsWithJsFileReferenceWithNoOut.errors.txt | 7 ++-- ...eclarationsWithJsFileReferenceWithNoOut.js | 5 +++ ...tionsWithJsFileReferenceWithOut.errors.txt | 18 -------- ...nDeclarationsWithJsFileReferenceWithOut.js | 9 ++++ ...rationsWithJsFileReferenceWithOut.symbols} | 2 +- ...larationsWithJsFileReferenceWithOut.types} | 2 +- ...mpilationExportAssignmentSyntax.errors.txt | 2 + ...tionHeritageClauseSyntaxOfClass.errors.txt | 2 + ...leCompilationImportEqualsSyntax.errors.txt | 2 + ...sFileCompilationInterfaceSyntax.errors.txt | 2 + .../jsFileCompilationModuleSyntax.errors.txt | 2 + ...onsWithJsFileReferenceWithNoOut.errors.txt | 17 ++++++++ ...tDeclarationsWithJsFileReferenceWithOut.js | 2 + ...ileCompilationOptionalParameter.errors.txt | 2 + ...ompilationPropertySyntaxOfClass.errors.txt | 2 + ...lationPublicMethodSyntaxOfClass.errors.txt | 2 + ...pilationPublicParameterModifier.errors.txt | 2 + .../jsFileCompilationRestParameter.js | 1 + ...ationReturnTypeSyntaxOfFunction.errors.txt | 2 + .../jsFileCompilationSyntaxError.errors.txt | 2 + ...sFileCompilationTypeAliasSyntax.errors.txt | 2 + ...ilationTypeArgumentSyntaxOfCall.errors.txt | 2 + ...jsFileCompilationTypeAssertions.errors.txt | 2 + ...sFileCompilationTypeOfParameter.errors.txt | 2 + ...ationTypeParameterSyntaxOfClass.errors.txt | 2 + ...onTypeParameterSyntaxOfFunction.errors.txt | 2 + ...sFileCompilationTypeSyntaxOfVar.errors.txt | 2 + ...lationWithJsEmitPathSameAsInput.errors.txt | 2 + .../reference/jsFileCompilationWithOut.js | 2 + .../jsFileCompilationWithoutOut.errors.txt | 12 ++++++ .../jsFileCompilationWithoutOut.symbols | 10 ----- .../jsFileCompilationWithoutOut.types | 10 ----- .../amd/test.d.ts | 1 + .../amd/test.js | 1 + .../node/test.d.ts | 1 + .../node/test.js | 1 + .../amd/test.d.ts | 1 + .../amd/test.js | 1 + .../node/test.d.ts | 1 + .../node/test.js | 1 + 50 files changed, 136 insertions(+), 80 deletions(-) delete mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt rename tests/baselines/reference/{jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.symbols => jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.symbols} (77%) rename tests/baselines/reference/{jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.types => jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.types} (72%) create mode 100644 tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt delete mode 100644 tests/baselines/reference/jsFileCompilationWithoutOut.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationWithoutOut.types diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 9534b22f47a..76c3175dcd5 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -69,22 +69,16 @@ namespace ts { if (!compilerOptions.noResolve) { let addedGlobalFileReference = false; forEach(root.referencedFiles, fileReference => { - if (isJavaScript(fileReference.fileName)) { - reportedDeclarationError = true; - diagnostics.push(createFileDiagnostic(root, fileReference.pos, fileReference.end - fileReference.pos, Diagnostics.js_file_cannot_be_referenced_in_ts_file_when_emitting_declarations)); - } - else { - let referencedFile = tryResolveScriptReference(host, root, fileReference); + let referencedFile = tryResolveScriptReference(host, root, fileReference); - // All the references that are not going to be part of same file - if (referencedFile && ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference - shouldEmitToOwnFile(referencedFile, compilerOptions) || // This is referenced file is emitting its own js file - !addedGlobalFileReference)) { // Or the global out file corresponding to this reference was not added + // All the references that are not going to be part of same file + if (referencedFile && ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference + shouldEmitToOwnFile(referencedFile, compilerOptions) || // This is referenced file is emitting its own js file + !addedGlobalFileReference)) { // Or the global out file corresponding to this reference was not added - writeReferencePath(referencedFile); - if (!isExternalModuleOrDeclarationFile(referencedFile)) { - addedGlobalFileReference = true; - } + writeReferencePath(referencedFile); + if (!isExternalModuleOrDeclarationFile(referencedFile)) { + addedGlobalFileReference = true; } } }); @@ -111,24 +105,18 @@ namespace ts { // Emit references corresponding to this file let emittedReferencedFiles: SourceFile[] = []; forEach(host.getSourceFiles(), sourceFile => { - if (!isExternalModuleOrDeclarationFile(sourceFile) && !isJavaScript(sourceFile.fileName)) { + if (!isExternalModuleOrDeclarationFile(sourceFile)) { // Check what references need to be added if (!compilerOptions.noResolve) { forEach(sourceFile.referencedFiles, fileReference => { - if (isJavaScript(fileReference.fileName)) { - reportedDeclarationError = true; - diagnostics.push(createFileDiagnostic(sourceFile, fileReference.pos, fileReference.end - fileReference.pos, Diagnostics.js_file_cannot_be_referenced_in_ts_file_when_emitting_declarations)); - } - else { - let referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); + let referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); - // If the reference file is a declaration file or an external module, emit that reference - if (referencedFile && (isExternalModuleOrDeclarationFile(referencedFile) && - !contains(emittedReferencedFiles, referencedFile))) { // If the file reference was not already emitted + // If the reference file is a declaration file or an external module, emit that reference + if (referencedFile && (isExternalModuleOrDeclarationFile(referencedFile) && + !contains(emittedReferencedFiles, referencedFile))) { // If the file reference was not already emitted - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); - } + writeReferencePath(referencedFile); + emittedReferencedFiles.push(referencedFile); } }); } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 00e13ba634c..d1beacfeaa9 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2465,10 +2465,6 @@ "category": "Error", "code": 8017 }, - ".js file cannot be referenced in .ts file when emitting declarations.": { - "category": "Error", - "code": 8018 - }, "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.": { "category": "Error", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ea2fd36889f..ff60a5927bd 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -342,7 +342,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitFile(getEmitFileNames(targetSourceFile, host), targetSourceFile); } else if (!isDeclarationFile(targetSourceFile) && - !isJavaScript(targetSourceFile.fileName) && (compilerOptions.outFile || compilerOptions.out)) { emitFile(getBundledEmitFileNames(compilerOptions)); } @@ -462,7 +461,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else { forEach(host.getSourceFiles(), sourceFile => { - if (!isJavaScript(sourceFile.fileName) && !isExternalModuleOrDeclarationFile(sourceFile)) { + if (!isExternalModuleOrDeclarationFile(sourceFile)) { emitSourceFile(sourceFile); } }); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index f8a1af6f5cf..f4dd2c02c8d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1769,7 +1769,7 @@ namespace ts { } export function getEmitFileNames(sourceFile: SourceFile, host: EmitHost) { - if (!isDeclarationFile(sourceFile) && !isJavaScript(sourceFile.fileName)) { + if (!isDeclarationFile(sourceFile)) { let options = host.getCompilerOptions(); let jsFilePath: string; if (shouldEmitToOwnFile(sourceFile, options)) { @@ -1835,12 +1835,12 @@ namespace ts { } export function shouldEmitToOwnFile(sourceFile: SourceFile, compilerOptions: CompilerOptions): boolean { - if (!isDeclarationFile(sourceFile) && !isJavaScript(sourceFile.fileName)) { + if (!isDeclarationFile(sourceFile)) { if ((isExternalModule(sourceFile) || !(compilerOptions.outFile || compilerOptions.out))) { // 1. in-browser single file compilation scenario // 2. non supported extension file return compilerOptions.isolatedModules || - forEach(supportedTypeScriptExtensions, extension => fileExtensionIs(sourceFile.fileName, extension)); + forEach(getSupportedExtensions(compilerOptions), extension => fileExtensionIs(sourceFile.fileName, extension)); } return false; } diff --git a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt index a210385d996..b0732afea72 100644 --- a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== declare var v; ~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt index 6017ddc7a11..b7fec2eefc6 100644 --- a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8017: 'decorators' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== @internal class C { } ~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt index eb9e11e574b..5861e73f49b 100644 --- a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt @@ -1,7 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.js b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js index 4c9f6802fd9..c6711e4e85f 100644 --- a/tests/baselines/reference/jsFileCompilationEmitDeclarations.js +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js @@ -15,8 +15,11 @@ var c = (function () { } return c; })(); +function foo() { +} //// [out.d.ts] declare class c { } +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js index 33077f3038f..04f36213b1b 100644 --- a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js @@ -19,8 +19,15 @@ var c = (function () { } return c; })(); +function bar() { +} +/// +function foo() { +} //// [out.d.ts] declare class c { } +declare function bar(): void; +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt index 6b9d97e55bb..e9fd9cc31b7 100644 --- a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== enum E { } ~ diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 1d6ddb3ed30..9be6b3f1ccd 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -1,14 +1,13 @@ -tests/cases/compiler/b.ts(1,1): error TS8018: .js file cannot be referenced in .ts file when emitting declarations. +error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } -==== tests/cases/compiler/b.ts (1 errors) ==== +==== tests/cases/compiler/b.ts (0 errors) ==== /// - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS8018: .js file cannot be referenced in .ts file when emitting declarations. // error on above reference path when emitting declarations function foo() { } diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js index 6bd76de881b..07d6fb812c0 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js @@ -30,3 +30,8 @@ function foo() { //// [a.d.ts] declare class c { } +//// [c.d.ts] +declare function bar(): void; +//// [b.d.ts] +/// +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt deleted file mode 100644 index a658130e10a..00000000000 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -tests/cases/compiler/b.ts(1,1): error TS8018: .js file cannot be referenced in .ts file when emitting declarations. - - -==== tests/cases/compiler/a.ts (0 errors) ==== - class c { - } - -==== tests/cases/compiler/b.ts (1 errors) ==== - /// - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS8018: .js file cannot be referenced in .ts file when emitting declarations. - // error on above reference when emitting declarations - function foo() { - } - -==== tests/cases/compiler/c.js (0 errors) ==== - function bar() { - } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js index 99dd961db4c..0d1939d7208 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js @@ -20,7 +20,16 @@ var c = (function () { } return c; })(); +function bar() { +} /// // error on above reference when emitting declarations function foo() { } + + +//// [out.d.ts] +declare class c { +} +declare function bar(): void; +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.symbols b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.symbols similarity index 77% rename from tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.symbols rename to tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.symbols index 06b80b144a4..544fe53f425 100644 --- a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.symbols +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.symbols @@ -5,7 +5,7 @@ class c { === tests/cases/compiler/b.ts === /// -// no error on above reference path since not emitting declarations +// error on above reference when emitting declarations function foo() { >foo : Symbol(foo, Decl(b.ts, 0, 0)) } diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.types b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.types similarity index 72% rename from tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.types rename to tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.types index ea9b48061c3..8aafb9f61d0 100644 --- a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.types +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.types @@ -5,7 +5,7 @@ class c { === tests/cases/compiler/b.ts === /// -// no error on above reference path since not emitting declarations +// error on above reference when emitting declarations function foo() { >foo : () => void } diff --git a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt index a349e2bca13..27371222dce 100644 --- a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== export = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt index df014047b35..c7d080404a2 100644 --- a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C implements D { } ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt index e53bf2ac860..36ab7aab188 100644 --- a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== import a = b; ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt index c46c3c05b3f..3089aeecb49 100644 --- a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== interface I { } ~ diff --git a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt index 8748064cc96..d85819b8588 100644 --- a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== module M { } ~ diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt new file mode 100644 index 00000000000..06bfd61c7ab --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -0,0 +1,17 @@ +error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + /// + // no error on above reference path since not emitting declarations + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js index 55412253441..fae4936b6c9 100644 --- a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js @@ -20,6 +20,8 @@ var c = (function () { } return c; })(); +function bar() { +} /// //no error on above reference since not emitting declarations function foo() { diff --git a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt index 68b131d39f9..6d9e3c5919d 100644 --- a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== function F(p?) { } ~ diff --git a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt index 0ecf6f3c666..5a35e68bcec 100644 --- a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,11): error TS8014: 'property declarations' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C { v } ~ diff --git a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt index 907775c7be6..a6d47e5fbe3 100644 --- a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C { public foo() { diff --git a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt index e5072278f4c..fa3e0e34a77 100644 --- a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C { constructor(public x) { }} ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationRestParameter.js b/tests/baselines/reference/jsFileCompilationRestParameter.js index d28299c543a..bcba97af024 100644 --- a/tests/baselines/reference/jsFileCompilationRestParameter.js +++ b/tests/baselines/reference/jsFileCompilationRestParameter.js @@ -2,3 +2,4 @@ function foo(...a) { } //// [b.js] +function foo(...a) { } diff --git a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt index 50746dcfc82..8b83a9d1f90 100644 --- a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== function F(): number { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt index 1ca6e251788..b06375e8a6a 100644 --- a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt +++ b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(3,6): error TS1223: 'type' tag already specified. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== /** * @type {number} diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt index 6af5751ea85..a0724e452b7 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,1): error TS8008: 'type aliases' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== type a = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt index cade211aa63..acefc2ff569 100644 --- a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,5): error TS8011: 'type arguments' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== Foo(); ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index 6d4ef23dcc6..669e83688cc 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,27): error TS17002: Expected corresponding JSX closing tag for 'string'. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== var v = undefined; diff --git a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt index ae3fd23c6ef..69fa6251942 100644 --- a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== function F(a: number) { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt index 708ff378137..f279896c4ed 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== class C { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt index 391e8f476da..9b056bcae50 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== function F() { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt index a4486a5d49d..080cb580bf2 100644 --- a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -1,6 +1,8 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts file. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== var v: () => number; ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt index 09e07a67bf3..134c95dee15 100644 --- a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt @@ -1,7 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithOut.js b/tests/baselines/reference/jsFileCompilationWithOut.js index 7bab7b973ab..32d0261061f 100644 --- a/tests/baselines/reference/jsFileCompilationWithOut.js +++ b/tests/baselines/reference/jsFileCompilationWithOut.js @@ -15,3 +15,5 @@ var c = (function () { } return c; })(); +function foo() { +} diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt new file mode 100644 index 00000000000..3531296e019 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.symbols b/tests/baselines/reference/jsFileCompilationWithoutOut.symbols deleted file mode 100644 index 5260b8d6cf3..00000000000 --- a/tests/baselines/reference/jsFileCompilationWithoutOut.symbols +++ /dev/null @@ -1,10 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : Symbol(c, Decl(a.ts, 0, 0)) -} - -=== tests/cases/compiler/b.js === -function foo() { ->foo : Symbol(foo, Decl(b.js, 0, 0)) -} - diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.types b/tests/baselines/reference/jsFileCompilationWithoutOut.types deleted file mode 100644 index dce83eeb8eb..00000000000 --- a/tests/baselines/reference/jsFileCompilationWithoutOut.types +++ /dev/null @@ -1,10 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : c -} - -=== tests/cases/compiler/b.js === -function foo() { ->foo : () => void -} - diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.d.ts index 4c0b8989316..bbae04a30bf 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.d.ts @@ -1 +1,2 @@ declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.js index e757934f20c..f2115703462 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.js +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.js @@ -1 +1,2 @@ var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.d.ts index 4c0b8989316..bbae04a30bf 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.d.ts @@ -1 +1,2 @@ declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.js index e757934f20c..f2115703462 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.js +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.js @@ -1 +1,2 @@ var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts index 4c0b8989316..bbae04a30bf 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts @@ -1 +1,2 @@ declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js index e757934f20c..f2115703462 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js @@ -1 +1,2 @@ var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts index 4c0b8989316..bbae04a30bf 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts @@ -1 +1,2 @@ declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js index e757934f20c..f2115703462 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js @@ -1 +1,2 @@ var test = 10; +var test2 = 10; // Should get compiled From d4d6e48ea57870bc68b562e28ff5486c39af4d37 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Oct 2015 14:39:10 -0700 Subject: [PATCH 47/89] Adding test case for scenario in which error reported depends on order of files --- .../jsFileCompilationDuplicateVariable.js | 16 ++++++++++++++++ .../jsFileCompilationDuplicateVariable.symbols | 8 ++++++++ .../jsFileCompilationDuplicateVariable.types | 10 ++++++++++ ...tionDuplicateVariableErrorReported.errors.txt | 10 ++++++++++ ...eCompilationDuplicateVariableErrorReported.js | 16 ++++++++++++++++ .../jsFileCompilationDuplicateVariable.ts | 8 ++++++++ ...eCompilationDuplicateVariableErrorReported.ts | 8 ++++++++ 7 files changed, 76 insertions(+) create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateVariable.js create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateVariable.symbols create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateVariable.types create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js create mode 100644 tests/cases/compiler/jsFileCompilationDuplicateVariable.ts create mode 100644 tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.js b/tests/baselines/reference/jsFileCompilationDuplicateVariable.js new file mode 100644 index 00000000000..3e3d0b9802a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariable.js @@ -0,0 +1,16 @@ +//// [tests/cases/compiler/jsFileCompilationDuplicateVariable.ts] //// + +//// [a.ts] +var x = 10; + +//// [b.js] +var x = "hello"; // No error is recorded here and declaration file will show this as number + +//// [out.js] +var x = 10; +var x = "hello"; // No error is recorded here and declaration file will show this as number + + +//// [out.d.ts] +declare var x: number; +declare var x: number; diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.symbols b/tests/baselines/reference/jsFileCompilationDuplicateVariable.symbols new file mode 100644 index 00000000000..9bfc61a64f8 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariable.symbols @@ -0,0 +1,8 @@ +=== tests/cases/compiler/a.ts === +var x = 10; +>x : Symbol(x, Decl(a.ts, 0, 3), Decl(b.js, 0, 3)) + +=== tests/cases/compiler/b.js === +var x = "hello"; // No error is recorded here and declaration file will show this as number +>x : Symbol(x, Decl(a.ts, 0, 3), Decl(b.js, 0, 3)) + diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.types b/tests/baselines/reference/jsFileCompilationDuplicateVariable.types new file mode 100644 index 00000000000..fefad3f6dda --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariable.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +var x = 10; +>x : number +>10 : number + +=== tests/cases/compiler/b.js === +var x = "hello"; // No error is recorded here and declaration file will show this as number +>x : number +>"hello" : string + diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt new file mode 100644 index 00000000000..a3abc114118 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/a.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'. + + +==== tests/cases/compiler/b.js (0 errors) ==== + var x = "hello"; + +==== tests/cases/compiler/a.ts (1 errors) ==== + var x = 10; // Error reported so no declaration file generated? + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js new file mode 100644 index 00000000000..7b2643c13d3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js @@ -0,0 +1,16 @@ +//// [tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts] //// + +//// [b.js] +var x = "hello"; + +//// [a.ts] +var x = 10; // Error reported so no declaration file generated? + +//// [out.js] +var x = "hello"; +var x = 10; // Error reported so no declaration file generated? + + +//// [out.d.ts] +declare var x: string; +declare var x: string; diff --git a/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts b/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts new file mode 100644 index 00000000000..f3f69ee5ec3 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts @@ -0,0 +1,8 @@ +// @jsExtensions: js +// @out: out.js +// @declaration: true +// @filename: a.ts +var x = 10; + +// @filename: b.js +var x = "hello"; // No error is recorded here and declaration file will show this as number \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts b/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts new file mode 100644 index 00000000000..77db6222a92 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts @@ -0,0 +1,8 @@ +// @jsExtensions: js +// @out: out.js +// @declaration: true +// @filename: b.js +var x = "hello"; + +// @filename: a.ts +var x = 10; // Error reported so no declaration file generated? \ No newline at end of file From 9f96f47a4f36849c5b5fb38013d3bd21d89d60c9 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Oct 2015 14:47:22 -0700 Subject: [PATCH 48/89] Added scenario when duplicate function implementation is reported --- ...DuplicateFunctionImplementation.errors.txt | 15 ++++++++++++ ...pilationDuplicateFunctionImplementation.js | 23 ++++++++++++++++++ ...ImplementationFileOrderReversed.errors.txt | 16 +++++++++++++ ...FunctionImplementationFileOrderReversed.js | 24 +++++++++++++++++++ ...pilationDuplicateFunctionImplementation.ts | 12 ++++++++++ ...FunctionImplementationFileOrderReversed.ts | 13 ++++++++++ 6 files changed, 103 insertions(+) create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js create mode 100644 tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts create mode 100644 tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt new file mode 100644 index 00000000000..fb0c214ddf6 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/a.ts(1,10): error TS2393: Duplicate function implementation. + + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + return 10; + } +==== tests/cases/compiler/a.ts (1 errors) ==== + function foo() { + ~~~ +!!! error TS2393: Duplicate function implementation. + return 30; + } + + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js new file mode 100644 index 00000000000..9b644509361 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts] //// + +//// [b.js] +function foo() { + return 10; +} +//// [a.ts] +function foo() { + return 30; +} + + + +//// [out.js] +function foo() { + return 10; +} +function foo() { + return 30; +} + + +//// [out.d.ts] diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt new file mode 100644 index 00000000000..78eb22546e8 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/a.ts(1,10): error TS2393: Duplicate function implementation. + + +==== tests/cases/compiler/a.ts (1 errors) ==== + function foo() { + ~~~ +!!! error TS2393: Duplicate function implementation. + return 30; + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + return 10; + } + + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js new file mode 100644 index 00000000000..d7965e91be1 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts] //// + +//// [a.ts] +function foo() { + return 30; +} + +//// [b.js] +function foo() { + return 10; +} + + + +//// [out.js] +function foo() { + return 30; +} +function foo() { + return 10; +} + + +//// [out.d.ts] diff --git a/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts new file mode 100644 index 00000000000..1cc61edaf32 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts @@ -0,0 +1,12 @@ +// @jsExtensions: js +// @out: out.js +// @declaration: true +// @filename: b.js +function foo() { + return 10; +} +// @filename: a.ts +function foo() { + return 30; +} + diff --git a/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts new file mode 100644 index 00000000000..af1d842d9b2 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts @@ -0,0 +1,13 @@ +// @jsExtensions: js +// @out: out.js +// @declaration: true +// @filename: a.ts +function foo() { + return 30; +} + +// @filename: b.js +function foo() { + return 10; +} + From 11b270f6ca3f0f518d0e3b93a56f2c8b9dfacb86 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Oct 2015 16:27:11 -0700 Subject: [PATCH 49/89] Add testcase - generating declaration file results in more errors in ts file --- src/harness/fourslash.ts | 10 ++++++++++ tests/cases/fourslash/fourslash.ts | 4 ++++ ...pilationDuplicateFunctionImplementation.ts | 20 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 3a628bb62c1..ef118e30fb5 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -535,6 +535,16 @@ namespace FourSlash { } } + public verifyGetEmitOutputContentsForCurrentFile(expected: { fileName: string; content: string; }[]): void { + let emit = this.languageService.getEmitOutput(this.activeFile.fileName); + this.taoInvalidReason = "verifyGetEmitOutputContentsForCurrentFile impossible"; + assert.equal(emit.outputFiles.length, expected.length, "Number of emit output files"); + for (let i = 0; i < emit.outputFiles.length; i++) { + assert.equal(emit.outputFiles[i].name, expected[i].fileName, "FileName"); + assert.equal(emit.outputFiles[i].text, expected[i].content, "Content"); + } + } + public verifyMemberListContains(symbol: string, text?: string, documentation?: string, kind?: string) { this.scenarioActions.push(""); this.scenarioActions.push(``); diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 54e86786d14..98bdccc9ab7 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -314,6 +314,10 @@ module FourSlashInterface { FourSlash.currentTestState.verifyGetEmitOutputForCurrentFile(expected); } + public verifyGetEmitOutputContentsForCurrentFile(expected: { fileName: string; content: string; }[]): void { + FourSlash.currentTestState.verifyGetEmitOutputContentsForCurrentFile(expected); + } + public currentParameterHelpArgumentNameIs(name: string) { FourSlash.currentTestState.verifyCurrentParameterHelpName(name); } diff --git a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts new file mode 100644 index 00000000000..f9cc1f9b635 --- /dev/null +++ b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts @@ -0,0 +1,20 @@ +/// + +// @declaration: true +// @out: out.js +// @jsExtensions: js +// @Filename: b.js +// @emitThisFile: true +////function foo() { return 10; }/*1*/ + +// @Filename: a.ts +// @emitThisFile: true +////function foo() { return 30; }/*2*/ + +goTo.marker("2"); +verify.getSemanticDiagnostics("[]"); +verify.verifyGetEmitOutputContentsForCurrentFile([ + { fileName: "out.js", content: "function foo() { return 10; }\r\nfunction foo() { return 30; }\r\n" }, + { fileName: "out.d.ts", content: "" }]); +goTo.marker("2"); +verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); \ No newline at end of file From 81763543f32c8b922d7d466d9f71240cf0f276ba Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 14 Oct 2015 12:00:43 -0700 Subject: [PATCH 50/89] Fix the duplicate function implementation error that depended on order of files --- src/compiler/checker.ts | 9 ++++++++- .../jsFileCompilationDuplicateFunctionImplementation.ts | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2127bf45870..838172345c6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10770,6 +10770,7 @@ namespace ts { let symbol = getSymbolOfNode(node); let firstDeclaration = getDeclarationOfKind(symbol, node.kind); + // Only type check the symbol once if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(symbol); @@ -11782,7 +11783,13 @@ namespace ts { let symbol = getSymbolOfNode(node); let localSymbol = node.localSymbol || symbol; - let firstDeclaration = getDeclarationOfKind(localSymbol, node.kind); + let firstDeclaration = forEach(symbol.declarations, declaration => { + // Get first non javascript function declaration + if (declaration.kind === node.kind && !isJavaScript(getSourceFile(declaration).fileName)) { + return declaration; + } + }); + // Only type check the symbol once if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); diff --git a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts index f9cc1f9b635..cbc83bb9c41 100644 --- a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts +++ b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts @@ -11,10 +11,14 @@ // @emitThisFile: true ////function foo() { return 30; }/*2*/ +goTo.marker("1"); +verify.getSemanticDiagnostics('[]'); goTo.marker("2"); -verify.getSemanticDiagnostics("[]"); +verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); verify.verifyGetEmitOutputContentsForCurrentFile([ { fileName: "out.js", content: "function foo() { return 10; }\r\nfunction foo() { return 30; }\r\n" }, { fileName: "out.d.ts", content: "" }]); goTo.marker("2"); -verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); \ No newline at end of file +verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); +goTo.marker("1"); +verify.getSemanticDiagnostics('[]'); \ No newline at end of file From 5aa7086b819e90f8b385487931815aa0ad6996f8 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 15 Oct 2015 11:04:25 -0700 Subject: [PATCH 51/89] Use ts.indexOf instead of Array.indexOf method --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 838172345c6..8f2c7d3f62f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -396,7 +396,7 @@ namespace ts { } let sourceFiles = host.getSourceFiles(); - return sourceFiles.indexOf(file1) <= sourceFiles.indexOf(file2); + return indexOf(sourceFiles, file1) <= indexOf(sourceFiles, file2); } // Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and From 1ae146476479e3e348befd206b49ef2f9da00320 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 15 Oct 2015 11:22:53 -0700 Subject: [PATCH 52/89] Test cases for let declaration and its use order --- .../jsFileCompilationLetDeclarationOrder.js | 21 +++++++++++++++++++ ...FileCompilationLetDeclarationOrder.symbols | 14 +++++++++++++ ...jsFileCompilationLetDeclarationOrder.types | 20 ++++++++++++++++++ ...CompilationLetDeclarationOrder2.errors.txt | 12 +++++++++++ .../jsFileCompilationLetDeclarationOrder2.js | 20 ++++++++++++++++++ .../jsFileCompilationLetDeclarationOrder.ts | 10 +++++++++ .../jsFileCompilationLetDeclarationOrder2.ts | 9 ++++++++ 7 files changed, 106 insertions(+) create mode 100644 tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js create mode 100644 tests/baselines/reference/jsFileCompilationLetDeclarationOrder.symbols create mode 100644 tests/baselines/reference/jsFileCompilationLetDeclarationOrder.types create mode 100644 tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js create mode 100644 tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts create mode 100644 tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js new file mode 100644 index 00000000000..15a1e8d7533 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts] //// + +//// [b.js] +let a = 10; +b = 30; + +//// [a.ts] +let b = 30; +a = 10; + + +//// [out.js] +var a = 10; +b = 30; +var b = 30; +a = 10; + + +//// [out.d.ts] +declare let a: number; +declare let b: number; diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.symbols b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.symbols new file mode 100644 index 00000000000..c1e97340dc9 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/b.js === +let a = 10; +>a : Symbol(a, Decl(b.js, 0, 3)) + +b = 30; +>b : Symbol(b, Decl(a.ts, 0, 3)) + +=== tests/cases/compiler/a.ts === +let b = 30; +>b : Symbol(b, Decl(a.ts, 0, 3)) + +a = 10; +>a : Symbol(a, Decl(b.js, 0, 3)) + diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.types b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.types new file mode 100644 index 00000000000..a28c62813de --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.types @@ -0,0 +1,20 @@ +=== tests/cases/compiler/b.js === +let a = 10; +>a : number +>10 : number + +b = 30; +>b = 30 : number +>b : number +>30 : number + +=== tests/cases/compiler/a.ts === +let b = 30; +>b : number +>30 : number + +a = 10; +>a = 10 : number +>a : number +>10 : number + diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt new file mode 100644 index 00000000000..fb213ec4433 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt @@ -0,0 +1,12 @@ +tests/cases/compiler/a.ts(2,1): error TS2448: Block-scoped variable 'a' used before its declaration. + + +==== tests/cases/compiler/a.ts (1 errors) ==== + let b = 30; + a = 10; + ~ +!!! error TS2448: Block-scoped variable 'a' used before its declaration. +==== tests/cases/compiler/b.js (0 errors) ==== + let a = 10; + b = 30; + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js new file mode 100644 index 00000000000..641a89c1c50 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts] //// + +//// [a.ts] +let b = 30; +a = 10; +//// [b.js] +let a = 10; +b = 30; + + +//// [out.js] +var b = 30; +a = 10; +var a = 10; +b = 30; + + +//// [out.d.ts] +declare let b: number; +declare let a: number; diff --git a/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts new file mode 100644 index 00000000000..d3e342a2d4b --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts @@ -0,0 +1,10 @@ +// @jsExtensions: js +// @out: out.js +// @declaration: true +// @filename: b.js +let a = 10; +b = 30; + +// @filename: a.ts +let b = 30; +a = 10; diff --git a/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts new file mode 100644 index 00000000000..c71d87ac9d9 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts @@ -0,0 +1,9 @@ +// @jsExtensions: js +// @out: out.js +// @declaration: true +// @filename: a.ts +let b = 30; +a = 10; +// @filename: b.js +let a = 10; +b = 30; From 68040879c905caff9e2d26de7c7be8122ffbe259 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 19 Oct 2015 16:44:38 -0700 Subject: [PATCH 53/89] Refactoring to fix build issues --- src/compiler/core.ts | 4 ++++ src/compiler/utilities.ts | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 649539452d1..73e25bc472f 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -729,6 +729,10 @@ namespace ts { * List of supported extensions in order of file resolution precedence. */ export const supportedTypeScriptExtensions = ["ts", "tsx", "d.ts"]; + + export function getSupportedExtensions(options?: CompilerOptions): string[] { + return options && options.jsExtensions ? supportedTypeScriptExtensions.concat(options.jsExtensions) : supportedTypeScriptExtensions; + } export function isSupportedSourceFileName(fileName: string, compilerOptions?: CompilerOptions) { if (!fileName) { return false; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 6dd8041f390..2d6f5410698 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1855,10 +1855,6 @@ namespace ts { return false; } - export function getSupportedExtensions(options?: CompilerOptions): string[] { - return options && options.jsExtensions ? supportedTypeScriptExtensions.concat(options.jsExtensions) : supportedTypeScriptExtensions; - } - export function getAllAccessorDeclarations(declarations: NodeArray, accessor: AccessorDeclaration) { let firstAccessor: AccessorDeclaration; let secondAccessor: AccessorDeclaration; From 3215438ddf3f13deb59fb564f826fd8b360c5171 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 11:22:46 -0700 Subject: [PATCH 54/89] Dont emit declaration file if there are errors in the source file --- src/compiler/core.ts | 2 +- src/compiler/declarationEmitter.ts | 4 +-- src/compiler/emitter.ts | 2 +- src/compiler/program.ts | 52 +++++++++++++++++++++++++++--- src/compiler/types.ts | 1 + src/compiler/utilities.ts | 1 + 6 files changed, 52 insertions(+), 10 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 73e25bc472f..de9a93ee679 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -729,7 +729,7 @@ namespace ts { * List of supported extensions in order of file resolution precedence. */ export const supportedTypeScriptExtensions = ["ts", "tsx", "d.ts"]; - + export function getSupportedExtensions(options?: CompilerOptions): string[] { return options && options.jsExtensions ? supportedTypeScriptExtensions.concat(options.jsExtensions) : supportedTypeScriptExtensions; } diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 76c3175dcd5..8b4e1500a1c 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -1607,9 +1607,7 @@ namespace ts { /* @internal */ export function writeDeclarationFile(declarationFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[]) { let emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, declarationFilePath, sourceFile); - // TODO(shkamat): Should we not write any declaration file if any of them can produce error, - // or should we just not write this file like we are doing now - if (!emitDeclarationResult.reportedDeclarationError) { + if (!emitDeclarationResult.reportedDeclarationError && !host.isDeclarationEmitBlocked(declarationFilePath, sourceFile)) { let declarationOutput = emitDeclarationResult.referencePathsOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); let compilerOptions = host.getCompilerOptions(); diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 842bfcfcf7b..3f741437609 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -7601,7 +7601,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitJavaScript(jsFilePath, sourceFile); } - if (compilerOptions.declaration && !host.isEmitBlocked(declarationFilePath)) { + if (compilerOptions.declaration) { writeDeclarationFile(declarationFilePath, sourceFile, host, resolver, diagnostics); } } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 22dca3ace4a..4ab0bf4ccea 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -330,6 +330,7 @@ namespace ts { let files: SourceFile[] = []; let fileProcessingDiagnostics = createDiagnosticCollection(); let programDiagnostics = createDiagnosticCollection(); + let emitBlockingDiagnostics = createDiagnosticCollection(); let hasEmitBlockingDiagnostics: Map = {}; // Map storing if there is emit blocking diagnostics for given input let commonSourceDirectory: string; @@ -393,6 +394,7 @@ namespace ts { getDiagnosticsProducingTypeChecker, getCommonSourceDirectory: () => commonSourceDirectory, emit, + isDeclarationEmitBlocked, getCurrentDirectory: () => host.getCurrentDirectory(), getNodeCount: () => getDiagnosticsProducingTypeChecker().getNodeCount(), getIdentifierCount: () => getDiagnosticsProducingTypeChecker().getIdentifierCount(), @@ -510,7 +512,7 @@ namespace ts { return true; } - function getEmitHost(writeFileCallback?: WriteFileCallback): EmitHost { + function getEmitHost(writeFileCallback?: WriteFileCallback, cancellationToken?: CancellationToken): EmitHost { return { getCanonicalFileName: fileName => host.getCanonicalFileName(fileName), getCommonSourceDirectory: program.getCommonSourceDirectory, @@ -521,7 +523,8 @@ namespace ts { getSourceFiles: program.getSourceFiles, writeFile: writeFileCallback || ( (fileName, data, writeByteOrderMark, onError) => host.writeFile(fileName, data, writeByteOrderMark, onError)), - isEmitBlocked: emitFileName => hasProperty(hasEmitBlockingDiagnostics, emitFileName), + isEmitBlocked, + isDeclarationEmitBlocked: (emitFileName, sourceFile) => program.isDeclarationEmitBlocked(emitFileName, sourceFile, cancellationToken), }; } @@ -537,6 +540,42 @@ namespace ts { return runWithCancellationToken(() => emitWorker(this, sourceFile, writeFileCallback, cancellationToken)); } + function isDeclarationEmitBlocked(emitFileName: string, sourceFile?: SourceFile, cancellationToken?: CancellationToken): boolean { + if (isEmitBlocked(emitFileName)) { + return true; + } + + // Dont check for emit blocking options diagnostics because that check per emit file is already covered in isEmitBlocked + // We dont want to end up blocking declaration emit of one file because other file results in emit blocking error + if (getOptionsDiagnostics(cancellationToken, /*includeEmitBlockingDiagnostics*/false).length || + getGlobalDiagnostics().length) { + return true; + } + + if (sourceFile) { + // Do not generate declaration file for this if there are any errors in this file or any of the declaration files + return hasSyntaxOrSemanticDiagnostics(sourceFile) || + forEach(files, sourceFile => isDeclarationFile(sourceFile) && hasSyntaxOrSemanticDiagnostics(sourceFile)); + } + + // Check if the bundled emit source files have errors + return forEach(files, sourceFile => { + // Check all the files that will be bundled together as well as all the included declaration files are error free + if (!isExternalModule(sourceFile)) { + return hasSyntaxOrSemanticDiagnostics(sourceFile); + } + }); + + function hasSyntaxOrSemanticDiagnostics(file: SourceFile) { + return !!getSyntacticDiagnostics(file, cancellationToken).length || + !!getSemanticDiagnostics(file, cancellationToken).length; + } + } + + function isEmitBlocked(emitFileName: string): boolean { + return hasProperty(hasEmitBlockingDiagnostics, emitFileName); + } + function emitWorker(program: Program, sourceFile: SourceFile, writeFileCallback: WriteFileCallback, cancellationToken: CancellationToken): EmitResult { // If the noEmitOnError flag is set, then check if we have any errors so far. If so, // immediately bail out. Note that we pass 'undefined' for 'sourceFile' so that we @@ -559,7 +598,7 @@ namespace ts { let emitResult = emitFiles( emitResolver, - getEmitHost(writeFileCallback), + getEmitHost(writeFileCallback, cancellationToken), sourceFile); emitTime += new Date().getTime() - start; @@ -821,10 +860,13 @@ namespace ts { }); } - function getOptionsDiagnostics(): Diagnostic[] { + function getOptionsDiagnostics(cancellationToken?: CancellationToken, includeEmitBlockingDiagnostics?: boolean): Diagnostic[] { let allDiagnostics: Diagnostic[] = []; addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics()); addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics()); + if (!includeEmitBlockingDiagnostics) { + addRange(allDiagnostics, emitBlockingDiagnostics.getGlobalDiagnostics()); + } return sortAndDeduplicateDiagnostics(allDiagnostics); } @@ -1291,7 +1333,7 @@ namespace ts { function createEmitBlockingDiagnostics(emitFileName: string, message: DiagnosticMessage) { hasEmitBlockingDiagnostics[emitFileName] = true; - programDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); + emitBlockingDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); } } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c501fd52bc2..b5451c3311d 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1358,6 +1358,7 @@ namespace ts { getTypeChecker(): TypeChecker; /* @internal */ getCommonSourceDirectory(): string; + /* @internal */ isDeclarationEmitBlocked(emitFileName: string, sourceFile?: SourceFile, cancellationToken?: CancellationToken): boolean; // For testing purposes only. Should not be used by any other consumers (including the // language service). diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 2d6f5410698..0b0c9f2db33 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -40,6 +40,7 @@ namespace ts { getNewLine(): string; isEmitBlocked(emitFileName: string): boolean; + isDeclarationEmitBlocked(emitFileName: string, sourceFile?: SourceFile): boolean; writeFile: WriteFileCallback; } From d14934e4dabad0ee33acaebbd5d9b58537a33027 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 11:26:02 -0700 Subject: [PATCH 55/89] Tests update for emitting declarations if no errors --- .../baselines/reference/classdecl.errors.txt | 108 ---- tests/baselines/reference/classdecl.js | 4 +- tests/baselines/reference/classdecl.symbols | 198 +++++++ tests/baselines/reference/classdecl.types | 212 +++++++ ...mputedPropertyNamesDeclarationEmit3_ES5.js | 5 - ...mputedPropertyNamesDeclarationEmit3_ES6.js | 5 - ...mputedPropertyNamesDeclarationEmit4_ES5.js | 5 - ...mputedPropertyNamesDeclarationEmit4_ES6.js | 5 - tests/baselines/reference/constEnum2.js | 10 - .../reference/constEnumPropertyAccess2.js | 13 - ...lFileObjectLiteralWithAccessors.errors.txt | 20 - ...declFileObjectLiteralWithAccessors.symbols | 36 ++ .../declFileObjectLiteralWithAccessors.types | 47 ++ ...FileObjectLiteralWithOnlyGetter.errors.txt | 15 - .../declFileObjectLiteralWithOnlyGetter.js | 2 +- ...eclFileObjectLiteralWithOnlyGetter.symbols | 23 + .../declFileObjectLiteralWithOnlyGetter.types | 27 + ...FileObjectLiteralWithOnlySetter.errors.txt | 15 - ...eclFileObjectLiteralWithOnlySetter.symbols | 26 + .../declFileObjectLiteralWithOnlySetter.types | 37 ++ .../declFilePrivateStatic.errors.txt | 29 - .../reference/declFilePrivateStatic.symbols | 31 + .../reference/declFilePrivateStatic.types | 35 ++ .../declarationEmitDestructuring2.js | 24 - .../declarationEmitDestructuring4.js | 10 - ...clarationEmitDestructuringArrayPattern2.js | 12 - ...onEmitDestructuringObjectLiteralPattern.js | 19 - ...nEmitDestructuringObjectLiteralPattern1.js | 9 - ...ionEmitDestructuringParameterProperties.js | 21 - ...tructuringWithOptionalBindingParameters.js | 9 - .../declarationEmit_invalidReference2.js | 4 - ...uplicateIdentifiersAcrossFileBoundaries.js | 33 -- .../emptyObjectBindingPatternParameter04.js | 8 - ...ariableDeclarationBindingPatterns02_ES5.js | 3 - ...ariableDeclarationBindingPatterns02_ES6.js | 3 - tests/baselines/reference/es5ExportEquals.js | 5 - tests/baselines/reference/es6ExportEquals.js | 5 - ...tDefaultBindingFollowedWithNamedImport1.js | 1 - ...ultBindingFollowedWithNamedImport1InEs5.js | 1 - ...ndingFollowedWithNamedImport1WithExport.js | 7 - ...efaultBindingFollowedWithNamedImportDts.js | 12 - ...faultBindingFollowedWithNamedImportDts1.js | 8 - ...aultBindingFollowedWithNamedImportInEs5.js | 1 - ...indingFollowedWithNamedImportWithExport.js | 7 - ...aultBindingFollowedWithNamespaceBinding.js | 1 - ...FollowedWithNamespaceBinding1WithExport.js | 2 - ...tBindingFollowedWithNamespaceBindingDts.js | 3 - ...indingFollowedWithNamespaceBindingInEs5.js | 1 - ...gFollowedWithNamespaceBindingWithExport.js | 2 - .../reference/es6ImportDefaultBindingInEs5.js | 1 - .../es6ImportDefaultBindingWithExport.js | 2 - .../es6ImportNameSpaceImportWithExport.js | 2 - .../es6ImportNamedImportWithExport.js | 13 - .../es6ImportWithoutFromClauseWithExport.js | 2 - .../exportDeclarationInInternalModule.js | 17 - .../reference/exportStarFromEmptyModule.js | 7 - .../getEmitOutputTsxFile_React.baseline | 3 +- .../getEmitOutputWithSemanticErrors2.baseline | 2 - ...thSemanticErrorsForMultipleFiles2.baseline | 3 - tests/baselines/reference/giant.js | 304 ---------- .../reference/isolatedModulesDeclaration.js | 4 - ...pilationDuplicateFunctionImplementation.js | 3 - ...FunctionImplementationFileOrderReversed.js | 3 - ...mpilationDuplicateVariableErrorReported.js | 5 - ...eclarationsWithJsFileReferenceWithNoOut.js | 10 - .../jsFileCompilationLetDeclarationOrder2.js | 5 - tests/baselines/reference/letAsIdentifier.js | 6 - .../baselines/reference/moduledecl.errors.txt | 241 -------- tests/baselines/reference/moduledecl.js | 1 + tests/baselines/reference/moduledecl.symbols | 536 +++++++++++++++++ tests/baselines/reference/moduledecl.types | 551 ++++++++++++++++++ tests/baselines/reference/out-flag3.js | 8 +- ...ileCompilationDifferentNamesSpecified.json | 3 +- .../amd/test.d.ts | 1 - ...ileCompilationDifferentNamesSpecified.json | 3 +- .../node/test.d.ts | 1 - .../amd/outdir/simple/FolderC/fileC.d.ts | 2 - .../amd/outdir/simple/fileB.d.ts | 4 - .../amd/rootDirectoryErrors.json | 4 +- .../node/outdir/simple/FolderC/fileC.d.ts | 2 - .../node/outdir/simple/fileB.d.ts | 4 - .../node/rootDirectoryErrors.json | 4 +- tests/baselines/reference/widenedTypes.js | 14 - .../reference/withExportDecl.errors.txt | 64 -- tests/baselines/reference/withExportDecl.js | 2 +- .../reference/withExportDecl.symbols | 129 ++++ .../baselines/reference/withExportDecl.types | 156 +++++ tests/cases/compiler/classdecl.ts | 3 +- .../declFileObjectLiteralWithAccessors.ts | 1 + .../declFileObjectLiteralWithOnlyGetter.ts | 1 + .../declFileObjectLiteralWithOnlySetter.ts | 1 + tests/cases/compiler/declFilePrivateStatic.ts | 1 + tests/cases/compiler/moduledecl.ts | 2 + tests/cases/compiler/withExportDecl.ts | 2 +- .../fourslash/getEmitOutputTsxFile_React.ts | 8 + ...pilationDuplicateFunctionImplementation.ts | 3 +- 96 files changed, 2074 insertions(+), 1189 deletions(-) delete mode 100644 tests/baselines/reference/classdecl.errors.txt create mode 100644 tests/baselines/reference/classdecl.symbols create mode 100644 tests/baselines/reference/classdecl.types delete mode 100644 tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt create mode 100644 tests/baselines/reference/declFileObjectLiteralWithAccessors.symbols create mode 100644 tests/baselines/reference/declFileObjectLiteralWithAccessors.types delete mode 100644 tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt create mode 100644 tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.symbols create mode 100644 tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types delete mode 100644 tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt create mode 100644 tests/baselines/reference/declFileObjectLiteralWithOnlySetter.symbols create mode 100644 tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types delete mode 100644 tests/baselines/reference/declFilePrivateStatic.errors.txt create mode 100644 tests/baselines/reference/declFilePrivateStatic.symbols create mode 100644 tests/baselines/reference/declFilePrivateStatic.types delete mode 100644 tests/baselines/reference/moduledecl.errors.txt create mode 100644 tests/baselines/reference/moduledecl.symbols create mode 100644 tests/baselines/reference/moduledecl.types delete mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts delete mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts delete mode 100644 tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/FolderC/fileC.d.ts delete mode 100644 tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/fileB.d.ts delete mode 100644 tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/FolderC/fileC.d.ts delete mode 100644 tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/fileB.d.ts delete mode 100644 tests/baselines/reference/withExportDecl.errors.txt create mode 100644 tests/baselines/reference/withExportDecl.symbols create mode 100644 tests/baselines/reference/withExportDecl.types diff --git a/tests/baselines/reference/classdecl.errors.txt b/tests/baselines/reference/classdecl.errors.txt deleted file mode 100644 index e43be2f5ad0..00000000000 --- a/tests/baselines/reference/classdecl.errors.txt +++ /dev/null @@ -1,108 +0,0 @@ -tests/cases/compiler/classdecl.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/classdecl.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/classdecl.ts(18,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/classdecl.ts(24,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/classdecl.ts (4 errors) ==== - class a { - //constructor (); - constructor (n: number); - constructor (s: string); - constructor (ns: any) { - - } - - public pgF() { } - - public pv; - public get d() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 30; - } - public set d() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - public static get p2() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return { x: 30, y: 40 }; - } - - private static d2() { - } - private static get p3() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return "string"; - } - private pv3; - - private foo(n: number): string; - private foo(s: string): string; - private foo(ns: any) { - return ns.toString(); - } - } - - class b extends a { - } - - module m1 { - export class b { - } - class d { - } - - - export interface ib { - } - } - - module m2 { - - export module m3 { - export class c extends b { - } - export class ib2 implements m1.ib { - } - } - } - - class c extends m1.b { - } - - class ib2 implements m1.ib { - } - - declare class aAmbient { - constructor (n: number); - constructor (s: string); - public pgF(): void; - public pv; - public d : number; - static p2 : { x: number; y: number; }; - static d2(); - static p3; - private pv3; - private foo(s); - } - - class d { - private foo(n: number): string; - private foo(s: string): string; - private foo(ns: any) { - return ns.toString(); - } - } - - class e { - private foo(s: string): string; - private foo(n: number): string; - private foo(ns: any) { - return ns.toString(); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 2af85da5b57..b424243c164 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -13,7 +13,7 @@ class a { public get d() { return 30; } - public set d() { + public set d(a: number) { } public static get p2() { @@ -107,7 +107,7 @@ var a = (function () { get: function () { return 30; }, - set: function () { + set: function (a) { }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/classdecl.symbols b/tests/baselines/reference/classdecl.symbols new file mode 100644 index 00000000000..ad355e23517 --- /dev/null +++ b/tests/baselines/reference/classdecl.symbols @@ -0,0 +1,198 @@ +=== tests/cases/compiler/classdecl.ts === +class a { +>a : Symbol(a, Decl(classdecl.ts, 0, 0)) + + //constructor (); + constructor (n: number); +>n : Symbol(n, Decl(classdecl.ts, 2, 17)) + + constructor (s: string); +>s : Symbol(s, Decl(classdecl.ts, 3, 17)) + + constructor (ns: any) { +>ns : Symbol(ns, Decl(classdecl.ts, 4, 17)) + + } + + public pgF() { } +>pgF : Symbol(pgF, Decl(classdecl.ts, 6, 5)) + + public pv; +>pv : Symbol(pv, Decl(classdecl.ts, 8, 20)) + + public get d() { +>d : Symbol(d, Decl(classdecl.ts, 10, 14), Decl(classdecl.ts, 13, 5)) + + return 30; + } + public set d(a: number) { +>d : Symbol(d, Decl(classdecl.ts, 10, 14), Decl(classdecl.ts, 13, 5)) +>a : Symbol(a, Decl(classdecl.ts, 14, 17)) + } + + public static get p2() { +>p2 : Symbol(a.p2, Decl(classdecl.ts, 15, 5)) + + return { x: 30, y: 40 }; +>x : Symbol(x, Decl(classdecl.ts, 18, 16)) +>y : Symbol(y, Decl(classdecl.ts, 18, 23)) + } + + private static d2() { +>d2 : Symbol(a.d2, Decl(classdecl.ts, 19, 5)) + } + private static get p3() { +>p3 : Symbol(a.p3, Decl(classdecl.ts, 22, 5)) + + return "string"; + } + private pv3; +>pv3 : Symbol(pv3, Decl(classdecl.ts, 25, 5)) + + private foo(n: number): string; +>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35)) +>n : Symbol(n, Decl(classdecl.ts, 28, 16)) + + private foo(s: string): string; +>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35)) +>s : Symbol(s, Decl(classdecl.ts, 29, 16)) + + private foo(ns: any) { +>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35)) +>ns : Symbol(ns, Decl(classdecl.ts, 30, 16)) + + return ns.toString(); +>ns : Symbol(ns, Decl(classdecl.ts, 30, 16)) + } +} + +class b extends a { +>b : Symbol(b, Decl(classdecl.ts, 33, 1)) +>a : Symbol(a, Decl(classdecl.ts, 0, 0)) +} + +module m1 { +>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) + + export class b { +>b : Symbol(b, Decl(classdecl.ts, 38, 11)) + } + class d { +>d : Symbol(d, Decl(classdecl.ts, 40, 5)) + } + + + export interface ib { +>ib : Symbol(ib, Decl(classdecl.ts, 42, 5)) + } +} + +module m2 { +>m2 : Symbol(m2, Decl(classdecl.ts, 47, 1)) + + export module m3 { +>m3 : Symbol(m3, Decl(classdecl.ts, 49, 11)) + + export class c extends b { +>c : Symbol(c, Decl(classdecl.ts, 51, 22)) +>b : Symbol(b, Decl(classdecl.ts, 33, 1)) + } + export class ib2 implements m1.ib { +>ib2 : Symbol(ib2, Decl(classdecl.ts, 53, 9)) +>m1.ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5)) +>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) +>ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5)) + } + } +} + +class c extends m1.b { +>c : Symbol(c, Decl(classdecl.ts, 57, 1)) +>m1.b : Symbol(m1.b, Decl(classdecl.ts, 38, 11)) +>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) +>b : Symbol(m1.b, Decl(classdecl.ts, 38, 11)) +} + +class ib2 implements m1.ib { +>ib2 : Symbol(ib2, Decl(classdecl.ts, 60, 1)) +>m1.ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5)) +>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) +>ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5)) +} + +declare class aAmbient { +>aAmbient : Symbol(aAmbient, Decl(classdecl.ts, 63, 1)) + + constructor (n: number); +>n : Symbol(n, Decl(classdecl.ts, 66, 17)) + + constructor (s: string); +>s : Symbol(s, Decl(classdecl.ts, 67, 17)) + + public pgF(): void; +>pgF : Symbol(pgF, Decl(classdecl.ts, 67, 28)) + + public pv; +>pv : Symbol(pv, Decl(classdecl.ts, 68, 23)) + + public d : number; +>d : Symbol(d, Decl(classdecl.ts, 69, 14)) + + static p2 : { x: number; y: number; }; +>p2 : Symbol(aAmbient.p2, Decl(classdecl.ts, 70, 22)) +>x : Symbol(x, Decl(classdecl.ts, 71, 17)) +>y : Symbol(y, Decl(classdecl.ts, 71, 28)) + + static d2(); +>d2 : Symbol(aAmbient.d2, Decl(classdecl.ts, 71, 42)) + + static p3; +>p3 : Symbol(aAmbient.p3, Decl(classdecl.ts, 72, 16)) + + private pv3; +>pv3 : Symbol(pv3, Decl(classdecl.ts, 73, 14)) + + private foo(s); +>foo : Symbol(foo, Decl(classdecl.ts, 74, 16)) +>s : Symbol(s, Decl(classdecl.ts, 75, 16)) +} + +class d { +>d : Symbol(d, Decl(classdecl.ts, 76, 1)) + + private foo(n: number): string; +>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35)) +>n : Symbol(n, Decl(classdecl.ts, 79, 16)) + + private foo(s: string): string; +>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35)) +>s : Symbol(s, Decl(classdecl.ts, 80, 16)) + + private foo(ns: any) { +>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35)) +>ns : Symbol(ns, Decl(classdecl.ts, 81, 16)) + + return ns.toString(); +>ns : Symbol(ns, Decl(classdecl.ts, 81, 16)) + } +} + +class e { +>e : Symbol(e, Decl(classdecl.ts, 84, 1)) + + private foo(s: string): string; +>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35)) +>s : Symbol(s, Decl(classdecl.ts, 87, 16)) + + private foo(n: number): string; +>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35)) +>n : Symbol(n, Decl(classdecl.ts, 88, 16)) + + private foo(ns: any) { +>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35)) +>ns : Symbol(ns, Decl(classdecl.ts, 89, 16)) + + return ns.toString(); +>ns : Symbol(ns, Decl(classdecl.ts, 89, 16)) + } +} diff --git a/tests/baselines/reference/classdecl.types b/tests/baselines/reference/classdecl.types new file mode 100644 index 00000000000..63398736563 --- /dev/null +++ b/tests/baselines/reference/classdecl.types @@ -0,0 +1,212 @@ +=== tests/cases/compiler/classdecl.ts === +class a { +>a : a + + //constructor (); + constructor (n: number); +>n : number + + constructor (s: string); +>s : string + + constructor (ns: any) { +>ns : any + + } + + public pgF() { } +>pgF : () => void + + public pv; +>pv : any + + public get d() { +>d : number + + return 30; +>30 : number + } + public set d(a: number) { +>d : number +>a : number + } + + public static get p2() { +>p2 : { x: number; y: number; } + + return { x: 30, y: 40 }; +>{ x: 30, y: 40 } : { x: number; y: number; } +>x : number +>30 : number +>y : number +>40 : number + } + + private static d2() { +>d2 : () => void + } + private static get p3() { +>p3 : string + + return "string"; +>"string" : string + } + private pv3; +>pv3 : any + + private foo(n: number): string; +>foo : { (n: number): string; (s: string): string; } +>n : number + + private foo(s: string): string; +>foo : { (n: number): string; (s: string): string; } +>s : string + + private foo(ns: any) { +>foo : { (n: number): string; (s: string): string; } +>ns : any + + return ns.toString(); +>ns.toString() : any +>ns.toString : any +>ns : any +>toString : any + } +} + +class b extends a { +>b : b +>a : a +} + +module m1 { +>m1 : typeof m1 + + export class b { +>b : b + } + class d { +>d : d + } + + + export interface ib { +>ib : ib + } +} + +module m2 { +>m2 : typeof m2 + + export module m3 { +>m3 : typeof m3 + + export class c extends b { +>c : c +>b : b + } + export class ib2 implements m1.ib { +>ib2 : ib2 +>m1.ib : any +>m1 : typeof m1 +>ib : m1.ib + } + } +} + +class c extends m1.b { +>c : c +>m1.b : m1.b +>m1 : typeof m1 +>b : typeof m1.b +} + +class ib2 implements m1.ib { +>ib2 : ib2 +>m1.ib : any +>m1 : typeof m1 +>ib : m1.ib +} + +declare class aAmbient { +>aAmbient : aAmbient + + constructor (n: number); +>n : number + + constructor (s: string); +>s : string + + public pgF(): void; +>pgF : () => void + + public pv; +>pv : any + + public d : number; +>d : number + + static p2 : { x: number; y: number; }; +>p2 : { x: number; y: number; } +>x : number +>y : number + + static d2(); +>d2 : () => any + + static p3; +>p3 : any + + private pv3; +>pv3 : any + + private foo(s); +>foo : (s: any) => any +>s : any +} + +class d { +>d : d + + private foo(n: number): string; +>foo : { (n: number): string; (s: string): string; } +>n : number + + private foo(s: string): string; +>foo : { (n: number): string; (s: string): string; } +>s : string + + private foo(ns: any) { +>foo : { (n: number): string; (s: string): string; } +>ns : any + + return ns.toString(); +>ns.toString() : any +>ns.toString : any +>ns : any +>toString : any + } +} + +class e { +>e : e + + private foo(s: string): string; +>foo : { (s: string): string; (n: number): string; } +>s : string + + private foo(n: number): string; +>foo : { (s: string): string; (n: number): string; } +>n : number + + private foo(ns: any) { +>foo : { (s: string): string; (n: number): string; } +>ns : any + + return ns.toString(); +>ns.toString() : any +>ns.toString : any +>ns : any +>toString : any + } +} diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js index c24eaf68a6f..1f339b36faf 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js @@ -4,8 +4,3 @@ interface I { } //// [computedPropertyNamesDeclarationEmit3_ES5.js] - - -//// [computedPropertyNamesDeclarationEmit3_ES5.d.ts] -interface I { -} diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js index dc54ff2cbb2..55e657c2325 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js @@ -4,8 +4,3 @@ interface I { } //// [computedPropertyNamesDeclarationEmit3_ES6.js] - - -//// [computedPropertyNamesDeclarationEmit3_ES6.d.ts] -interface I { -} diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js index c57c0384afc..bca1ddbfdc7 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js @@ -5,8 +5,3 @@ var v: { //// [computedPropertyNamesDeclarationEmit4_ES5.js] var v; - - -//// [computedPropertyNamesDeclarationEmit4_ES5.d.ts] -declare var v: { -}; diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js index 903687d0780..c3b26b97c9b 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js @@ -5,8 +5,3 @@ var v: { //// [computedPropertyNamesDeclarationEmit4_ES6.js] var v; - - -//// [computedPropertyNamesDeclarationEmit4_ES6.d.ts] -declare var v: { -}; diff --git a/tests/baselines/reference/constEnum2.js b/tests/baselines/reference/constEnum2.js index c0c640b87fd..5c46778c7ce 100644 --- a/tests/baselines/reference/constEnum2.js +++ b/tests/baselines/reference/constEnum2.js @@ -20,13 +20,3 @@ const enum D { // it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression. // Error : not a constant enum expression var CONST = 9000 % 2; - - -//// [constEnum2.d.ts] -declare const CONST: number; -declare const enum D { - d = 10, - e, - f, - g, -} diff --git a/tests/baselines/reference/constEnumPropertyAccess2.js b/tests/baselines/reference/constEnumPropertyAccess2.js index 46a1d918b94..f2d63ba1389 100644 --- a/tests/baselines/reference/constEnumPropertyAccess2.js +++ b/tests/baselines/reference/constEnumPropertyAccess2.js @@ -31,16 +31,3 @@ var g; g = "string"; function foo(x) { } 2 /* B */ = 3; - - -//// [constEnumPropertyAccess2.d.ts] -declare const enum G { - A = 1, - B = 2, - C = 3, - D = 2, -} -declare var z: typeof G; -declare var z1: any; -declare var g: G; -declare function foo(x: G): void; diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt deleted file mode 100644 index 4c0093a5438..00000000000 --- a/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(6,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts (2 errors) ==== - - function /*1*/makePoint(x: number) { - return { - b: 10, - get x() { return x; }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - set x(a: number) { this.b = a; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - }; - var /*4*/point = makePoint(2); - var /*2*/x = point.x; - point./*3*/x = 30; \ No newline at end of file diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.symbols b/tests/baselines/reference/declFileObjectLiteralWithAccessors.symbols new file mode 100644 index 00000000000..862b0b3781e --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.symbols @@ -0,0 +1,36 @@ +=== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts === + +function /*1*/makePoint(x: number) { +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithAccessors.ts, 0, 0)) +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 1, 24)) + + return { + b: 10, +>b : Symbol(b, Decl(declFileObjectLiteralWithAccessors.ts, 2, 12)) + + get x() { return x; }, +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 1, 24)) + + set x(a: number) { this.b = a; } +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) +>a : Symbol(a, Decl(declFileObjectLiteralWithAccessors.ts, 5, 14)) +>a : Symbol(a, Decl(declFileObjectLiteralWithAccessors.ts, 5, 14)) + + }; +}; +var /*4*/point = makePoint(2); +>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3)) +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithAccessors.ts, 0, 0)) + +var /*2*/x = point.x; +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 9, 3)) +>point.x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) +>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3)) +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) + +point./*3*/x = 30; +>point./*3*/x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) +>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3)) +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) + diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.types b/tests/baselines/reference/declFileObjectLiteralWithAccessors.types new file mode 100644 index 00000000000..f7bb57b0e1e --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.types @@ -0,0 +1,47 @@ +=== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts === + +function /*1*/makePoint(x: number) { +>makePoint : (x: number) => { b: number; x: number; } +>x : number + + return { +>{ b: 10, get x() { return x; }, set x(a: number) { this.b = a; } } : { b: number; x: number; } + + b: 10, +>b : number +>10 : number + + get x() { return x; }, +>x : number +>x : number + + set x(a: number) { this.b = a; } +>x : number +>a : number +>this.b = a : number +>this.b : any +>this : any +>b : any +>a : number + + }; +}; +var /*4*/point = makePoint(2); +>point : { b: number; x: number; } +>makePoint(2) : { b: number; x: number; } +>makePoint : (x: number) => { b: number; x: number; } +>2 : number + +var /*2*/x = point.x; +>x : number +>point.x : number +>point : { b: number; x: number; } +>x : number + +point./*3*/x = 30; +>point./*3*/x = 30 : number +>point./*3*/x : number +>point : { b: number; x: number; } +>x : number +>30 : number + diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt deleted file mode 100644 index 961442c23d0..00000000000 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts (1 errors) ==== - - function /*1*/makePoint(x: number) { - return { - get x() { return x; }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - }; - var /*4*/point = makePoint(2); - var /*2*/x = point./*3*/x; - \ No newline at end of file diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js index 8d79a576b06..396ee75422e 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js @@ -12,7 +12,7 @@ var /*2*/x = point./*3*/x; //// [declFileObjectLiteralWithOnlyGetter.js] function makePoint(x) { return { - get x() { return x; } + get x() { return x; }, }; } ; diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.symbols b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.symbols new file mode 100644 index 00000000000..ef9cd96e555 --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts === + +function /*1*/makePoint(x: number) { +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlyGetter.ts, 0, 0)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 1, 24)) + + return { + get x() { return x; }, +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 1, 24)) + + }; +}; +var /*4*/point = makePoint(2); +>point : Symbol(point, Decl(declFileObjectLiteralWithOnlyGetter.ts, 6, 3)) +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlyGetter.ts, 0, 0)) + +var /*2*/x = point./*3*/x; +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 7, 3)) +>point./*3*/x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12)) +>point : Symbol(point, Decl(declFileObjectLiteralWithOnlyGetter.ts, 6, 3)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12)) + diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types new file mode 100644 index 00000000000..c0fb7b763fc --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types @@ -0,0 +1,27 @@ +=== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts === + +function /*1*/makePoint(x: number) { +>makePoint : (x: number) => { x: number; } +>x : number + + return { +>{ get x() { return x; }, } : { x: number; } + + get x() { return x; }, +>x : number +>x : number + + }; +}; +var /*4*/point = makePoint(2); +>point : { x: number; } +>makePoint(2) : { x: number; } +>makePoint : (x: number) => { x: number; } +>2 : number + +var /*2*/x = point./*3*/x; +>x : number +>point./*3*/x : number +>point : { x: number; } +>x : number + diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt deleted file mode 100644 index 7680a8d14dc..00000000000 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts (1 errors) ==== - - function /*1*/makePoint(x: number) { - return { - b: 10, - set x(a: number) { this.b = a; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - }; - var /*3*/point = makePoint(2); - point./*2*/x = 30; \ No newline at end of file diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.symbols b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.symbols new file mode 100644 index 00000000000..f7474466140 --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.symbols @@ -0,0 +1,26 @@ +=== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts === + +function /*1*/makePoint(x: number) { +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 0)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 1, 24)) + + return { + b: 10, +>b : Symbol(b, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 12)) + + set x(a: number) { this.b = a; } +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14)) +>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 4, 14)) +>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 4, 14)) + + }; +}; +var /*3*/point = makePoint(2); +>point : Symbol(point, Decl(declFileObjectLiteralWithOnlySetter.ts, 7, 3)) +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 0)) + +point./*2*/x = 30; +>point./*2*/x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14)) +>point : Symbol(point, Decl(declFileObjectLiteralWithOnlySetter.ts, 7, 3)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14)) + diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types new file mode 100644 index 00000000000..2b9b98a8963 --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types @@ -0,0 +1,37 @@ +=== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts === + +function /*1*/makePoint(x: number) { +>makePoint : (x: number) => { b: number; x: number; } +>x : number + + return { +>{ b: 10, set x(a: number) { this.b = a; } } : { b: number; x: number; } + + b: 10, +>b : number +>10 : number + + set x(a: number) { this.b = a; } +>x : number +>a : number +>this.b = a : number +>this.b : any +>this : any +>b : any +>a : number + + }; +}; +var /*3*/point = makePoint(2); +>point : { b: number; x: number; } +>makePoint(2) : { b: number; x: number; } +>makePoint : (x: number) => { b: number; x: number; } +>2 : number + +point./*2*/x = 30; +>point./*2*/x = 30 : number +>point./*2*/x : number +>point : { b: number; x: number; } +>x : number +>30 : number + diff --git a/tests/baselines/reference/declFilePrivateStatic.errors.txt b/tests/baselines/reference/declFilePrivateStatic.errors.txt deleted file mode 100644 index 4e1da34b979..00000000000 --- a/tests/baselines/reference/declFilePrivateStatic.errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -tests/cases/compiler/declFilePrivateStatic.ts(9,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/declFilePrivateStatic.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/declFilePrivateStatic.ts(12,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/declFilePrivateStatic.ts(13,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/declFilePrivateStatic.ts (4 errors) ==== - - class C { - private static x = 1; - static y = 1; - - private static a() { } - static b() { } - - private static get c() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static get d() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - private static set e(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static set f(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/declFilePrivateStatic.symbols b/tests/baselines/reference/declFilePrivateStatic.symbols new file mode 100644 index 00000000000..d3d0753123c --- /dev/null +++ b/tests/baselines/reference/declFilePrivateStatic.symbols @@ -0,0 +1,31 @@ +=== tests/cases/compiler/declFilePrivateStatic.ts === + +class C { +>C : Symbol(C, Decl(declFilePrivateStatic.ts, 0, 0)) + + private static x = 1; +>x : Symbol(C.x, Decl(declFilePrivateStatic.ts, 1, 9)) + + static y = 1; +>y : Symbol(C.y, Decl(declFilePrivateStatic.ts, 2, 25)) + + private static a() { } +>a : Symbol(C.a, Decl(declFilePrivateStatic.ts, 3, 17)) + + static b() { } +>b : Symbol(C.b, Decl(declFilePrivateStatic.ts, 5, 26)) + + private static get c() { return 1; } +>c : Symbol(C.c, Decl(declFilePrivateStatic.ts, 6, 18)) + + static get d() { return 1; } +>d : Symbol(C.d, Decl(declFilePrivateStatic.ts, 8, 40)) + + private static set e(v) { } +>e : Symbol(C.e, Decl(declFilePrivateStatic.ts, 9, 32)) +>v : Symbol(v, Decl(declFilePrivateStatic.ts, 11, 25)) + + static set f(v) { } +>f : Symbol(C.f, Decl(declFilePrivateStatic.ts, 11, 31)) +>v : Symbol(v, Decl(declFilePrivateStatic.ts, 12, 17)) +} diff --git a/tests/baselines/reference/declFilePrivateStatic.types b/tests/baselines/reference/declFilePrivateStatic.types new file mode 100644 index 00000000000..35aaa3acdeb --- /dev/null +++ b/tests/baselines/reference/declFilePrivateStatic.types @@ -0,0 +1,35 @@ +=== tests/cases/compiler/declFilePrivateStatic.ts === + +class C { +>C : C + + private static x = 1; +>x : number +>1 : number + + static y = 1; +>y : number +>1 : number + + private static a() { } +>a : () => void + + static b() { } +>b : () => void + + private static get c() { return 1; } +>c : number +>1 : number + + static get d() { return 1; } +>d : number +>1 : number + + private static set e(v) { } +>e : any +>v : any + + static set f(v) { } +>f : any +>v : any +} diff --git a/tests/baselines/reference/declarationEmitDestructuring2.js b/tests/baselines/reference/declarationEmitDestructuring2.js index 09980c5c9dd..31329ded304 100644 --- a/tests/baselines/reference/declarationEmitDestructuring2.js +++ b/tests/baselines/reference/declarationEmitDestructuring2.js @@ -17,27 +17,3 @@ function h(_a) { function h1(_a) { var a = _a[0], b = _a[1][0], c = _a[2][0][0], _b = _a[3], _c = _b.x, x = _c === void 0 ? 10 : _c, _d = _b.y, y = _d === void 0 ? [1, 2, 3] : _d, _e = _b.z, a1 = _e.a1, b1 = _e.b1; } - - -//// [declarationEmitDestructuring2.d.ts] -declare function f({x, y: [a, b, c, d]}?: { - x?: number; - y?: [number, number, number, number]; -}): void; -declare function g([a, b, c, d]?: [number, number, number, number]): void; -declare function h([a, [b], [[c]], {x, y: [a, b, c], z: {a1, b1}}]: [any, [any], [[any]], { - x?: number; - y: [any, any, any]; - z: { - a1: any; - b1: any; - }; -}]): void; -declare function h1([a, [b], [[c]], {x, y, z: {a1, b1}}]: [any, [any], [[any]], { - x?: number; - y?: number[]; - z: { - a1: any; - b1: any; - }; -}]): void; diff --git a/tests/baselines/reference/declarationEmitDestructuring4.js b/tests/baselines/reference/declarationEmitDestructuring4.js index 16e6b49a4cf..58cf0e0b2f9 100644 --- a/tests/baselines/reference/declarationEmitDestructuring4.js +++ b/tests/baselines/reference/declarationEmitDestructuring4.js @@ -26,13 +26,3 @@ function baz3(_a) { } function baz4(_a) { var _a = { x: 10 }; } - - -//// [declarationEmitDestructuring4.d.ts] -declare function baz([]: any[]): void; -declare function baz1([]?: number[]): void; -declare function baz2([[]]?: [number[]]): void; -declare function baz3({}: {}): void; -declare function baz4({}?: { - x: number; -}): void; diff --git a/tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js b/tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js index 662b4625ec8..cac419605ba 100644 --- a/tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js +++ b/tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js @@ -17,15 +17,3 @@ var _f = [], a11 = _f[0], b11 = _f[1], c11 = _f[2]; var _g = [1, ["hello", { x12: 5, y12: true }]], a2 = _g[0], _h = _g[1], _j = _h === void 0 ? ["abc", { x12: 10, y12: false }] : _h, b2 = _j[0], _k = _j[1], x12 = _k.x12, c2 = _k.y12; var _l = [1, "hello"], x13 = _l[0], y13 = _l[1]; var _m = [[x13, y13], { x: x13, y: y13 }], a3 = _m[0], b3 = _m[1]; - - -//// [declarationEmitDestructuringArrayPattern2.d.ts] -declare var x10: number, y10: string, z10: boolean; -declare var x11: number, y11: string; -declare var a11: any, b11: any, c11: any; -declare var a2: number, b2: string, x12: number, c2: boolean; -declare var x13: number, y13: string; -declare var a3: (number | string)[], b3: { - x: number; - y: string; -}; diff --git a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.js b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.js index 38b0a14af5c..d102ad30173 100644 --- a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.js +++ b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.js @@ -43,22 +43,3 @@ var m; _a = f15(), m.a4 = _a.a4, m.b4 = _a.b4, m.c4 = _a.c4; var _a; })(m || (m = {})); - - -//// [declarationEmitDestructuringObjectLiteralPattern.d.ts] -declare var x4: number; -declare var y5: string; -declare var x6: number, y6: string; -declare var a1: number; -declare var b1: string; -declare var a2: number, b2: string; -declare var x11: number, y11: string, z11: boolean; -declare function f15(): { - a4: string; - b4: number; - c4: boolean; -}; -declare var a4: string, b4: number, c4: boolean; -declare module m { - var a4: string, b4: number, c4: boolean; -} diff --git a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern1.js b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern1.js index 264e56fe58c..2c7cf979c9c 100644 --- a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern1.js +++ b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern1.js @@ -16,12 +16,3 @@ var _b = { x6: 5, y6: "hello" }, x6 = _b.x6, y6 = _b.y6; var a1 = { x7: 5, y7: "hello" }.x7; var b1 = { x8: 5, y8: "hello" }.y8; var _c = { x9: 5, y9: "hello" }, a2 = _c.x9, b2 = _c.y9; - - -//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts] -declare var x4: number; -declare var y5: string; -declare var x6: number, y6: string; -declare var a1: number; -declare var b1: string; -declare var a2: number, b2: string; diff --git a/tests/baselines/reference/declarationEmitDestructuringParameterProperties.js b/tests/baselines/reference/declarationEmitDestructuringParameterProperties.js index a98620c8529..9fc1943eae6 100644 --- a/tests/baselines/reference/declarationEmitDestructuringParameterProperties.js +++ b/tests/baselines/reference/declarationEmitDestructuringParameterProperties.js @@ -38,24 +38,3 @@ var C3 = (function () { } return C3; })(); - - -//// [declarationEmitDestructuringParameterProperties.d.ts] -declare class C1 { - x: string, y: string, z: string; - constructor([x, y, z]: string[]); -} -declare type TupleType1 = [string, number, boolean]; -declare class C2 { - x: string, y: number, z: boolean; - constructor([x, y, z]: TupleType1); -} -declare type ObjType1 = { - x: number; - y: string; - z: boolean; -}; -declare class C3 { - x: number, y: string, z: boolean; - constructor({x, y, z}: ObjType1); -} diff --git a/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.js b/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.js index 5c7f4d2cec5..ab42602a035 100644 --- a/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.js +++ b/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.js @@ -11,12 +11,3 @@ function foo(_a) { function foo1(_a) { var x = _a.x, y = _a.y, z = _a.z; } - - -//// [declarationEmitDestructuringWithOptionalBindingParameters.d.ts] -declare function foo([x, y, z]?: [string, number, boolean]): void; -declare function foo1({x, y, z}?: { - x: string; - y: number; - z: boolean; -}): void; diff --git a/tests/baselines/reference/declarationEmit_invalidReference2.js b/tests/baselines/reference/declarationEmit_invalidReference2.js index 78fb232cca7..0f8d5d4c07d 100644 --- a/tests/baselines/reference/declarationEmit_invalidReference2.js +++ b/tests/baselines/reference/declarationEmit_invalidReference2.js @@ -5,7 +5,3 @@ var x = 0; //// [declarationEmit_invalidReference2.js] /// var x = 0; - - -//// [declarationEmit_invalidReference2.d.ts] -declare var x: number; diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js index a2509ea97f4..bdb7a1148f0 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js @@ -75,36 +75,3 @@ var v = 3; var Foo; (function (Foo) { })(Foo || (Foo = {})); - - -//// [file1.d.ts] -interface I { -} -declare class C1 { -} -declare class C2 { -} -declare function f(): void; -declare var v: number; -declare class Foo { - static x: number; -} -declare module N { - module F { - } -} -//// [file2.d.ts] -declare class I { -} -interface C1 { -} -declare function C2(): void; -declare class f { -} -declare var v: number; -declare module Foo { - var x: number; -} -declare module N { - function F(): any; -} diff --git a/tests/baselines/reference/emptyObjectBindingPatternParameter04.js b/tests/baselines/reference/emptyObjectBindingPatternParameter04.js index 8c128bb806e..d9b0e6bc402 100644 --- a/tests/baselines/reference/emptyObjectBindingPatternParameter04.js +++ b/tests/baselines/reference/emptyObjectBindingPatternParameter04.js @@ -9,11 +9,3 @@ function f(_a) { var _a = { a: 1, b: "2", c: true }; var x, y, z; } - - -//// [emptyObjectBindingPatternParameter04.d.ts] -declare function f({}?: { - a: number; - b: string; - c: boolean; -}): void; diff --git a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES5.js b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES5.js index 7710b5e26c1..9b26893b424 100644 --- a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES5.js +++ b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES5.js @@ -19,6 +19,3 @@ var _e = void 0; var _f = void 0; })(); - - -//// [emptyVariableDeclarationBindingPatterns02_ES5.d.ts] diff --git a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES6.js b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES6.js index 8b2df68ed70..9fbdd269912 100644 --- a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES6.js +++ b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES6.js @@ -19,6 +19,3 @@ let []; const []; })(); - - -//// [emptyVariableDeclarationBindingPatterns02_ES6.d.ts] diff --git a/tests/baselines/reference/es5ExportEquals.js b/tests/baselines/reference/es5ExportEquals.js index 88d1da4201d..d3929792409 100644 --- a/tests/baselines/reference/es5ExportEquals.js +++ b/tests/baselines/reference/es5ExportEquals.js @@ -9,8 +9,3 @@ export = f; function f() { } exports.f = f; module.exports = f; - - -//// [es5ExportEquals.d.ts] -export declare function f(): void; -export = f; diff --git a/tests/baselines/reference/es6ExportEquals.js b/tests/baselines/reference/es6ExportEquals.js index e4cf13758ff..ba838296f9d 100644 --- a/tests/baselines/reference/es6ExportEquals.js +++ b/tests/baselines/reference/es6ExportEquals.js @@ -7,8 +7,3 @@ export = f; //// [es6ExportEquals.js] export function f() { } - - -//// [es6ExportEquals.d.ts] -export declare function f(): void; -export = f; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js index 755af6f4fdb..a733eba1045 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js @@ -41,4 +41,3 @@ var x1 = defaultBinding6; //// [es6ImportDefaultBindingFollowedWithNamedImport1_0.d.ts] declare var a: number; export default a; -//// [es6ImportDefaultBindingFollowedWithNamedImport1_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js index 7eda76622de..53f701cb0c1 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js @@ -42,4 +42,3 @@ var x = es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0_6.default; //// [es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0.d.ts] declare var a: number; export default a; -//// [es6ImportDefaultBindingFollowedWithNamedImport1InEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js index b83571066f0..c724eade06c 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js @@ -42,10 +42,3 @@ exports.x1 = server_6.default; //// [server.d.ts] declare var a: number; export default a; -//// [client.d.ts] -export declare var x1: number; -export declare var x1: number; -export declare var x1: number; -export declare var x1: number; -export declare var x1: number; -export declare var x1: number; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js index 9314190e786..1dc0013ecbe 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js @@ -88,15 +88,3 @@ export declare class a12 { } export declare class x11 { } -//// [client.d.ts] -import { a } from "./server"; -export declare var x1: a; -import { a11 as b } from "./server"; -export declare var x2: b; -import { x, a12 as y } from "./server"; -export declare var x4: x; -export declare var x5: y; -import { x11 as z } from "./server"; -export declare var x3: z; -import { m } from "./server"; -export declare var x6: m; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js index 71d35fd85a1..3451176bdb2 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js @@ -46,11 +46,3 @@ exports.x6 = new server_6.default(); declare class a { } export default a; -//// [client.d.ts] -import defaultBinding1 from "./server"; -export declare var x1: defaultBinding1; -export declare var x2: defaultBinding1; -export declare var x3: defaultBinding1; -export declare var x4: defaultBinding1; -export declare var x5: defaultBinding1; -export declare var x6: defaultBinding1; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js index 9674f8c12f4..d4b1b45d5a7 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js @@ -43,4 +43,3 @@ var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_5.m; export declare var a: number; export declare var x: number; export declare var m: number; -//// [es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js index b7da05d7dbb..2d8be87a3d1 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js @@ -47,10 +47,3 @@ export declare var x: number; export declare var m: number; declare var _default: {}; export default _default; -//// [client.d.ts] -export declare var x1: number; -export declare var x1: number; -export declare var x1: number; -export declare var x1: number; -export declare var x1: number; -export declare var x1: number; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js index 2b24fda0755..f6607da3397 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js @@ -17,4 +17,3 @@ var x = nameSpaceBinding.a; //// [es6ImportDefaultBindingFollowedWithNamespaceBinding_0.d.ts] export declare var a: number; -//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js index a032325fbb4..caeaa76ab4a 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js @@ -25,5 +25,3 @@ define(["require", "exports", "server"], function (require, exports, server_1) { //// [server.d.ts] declare var a: number; export default a; -//// [client.d.ts] -export declare var x: number; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js index 93918f6171a..86514091f6c 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js @@ -23,6 +23,3 @@ exports.x = new nameSpaceBinding.a(); //// [server.d.ts] export declare class a { } -//// [client.d.ts] -import * as nameSpaceBinding from "./server"; -export declare var x: nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js index 49717c588b7..35811288691 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js @@ -17,4 +17,3 @@ var x = nameSpaceBinding.a; //// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.d.ts] export declare var a: number; -//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js index dec9b8cfebe..9a02028e431 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js @@ -17,5 +17,3 @@ exports.x = nameSpaceBinding.a; //// [server.d.ts] export declare var a: number; -//// [client.d.ts] -export declare var x: number; diff --git a/tests/baselines/reference/es6ImportDefaultBindingInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingInEs5.js index 34323b2752b..4420397ac61 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingInEs5.js @@ -17,4 +17,3 @@ module.exports = a; //// [es6ImportDefaultBindingInEs5_0.d.ts] declare var a: number; export = a; -//// [es6ImportDefaultBindingInEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingWithExport.js index 2fb7f0644b9..c3a7315929d 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingWithExport.js @@ -25,5 +25,3 @@ define(["require", "exports", "server"], function (require, exports, server_1) { //// [server.d.ts] declare var a: number; export default a; -//// [client.d.ts] -export declare var x: number; diff --git a/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js b/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js index 84f6936d4b0..9da18ee7d0c 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js @@ -22,5 +22,3 @@ define(["require", "exports", "server"], function (require, exports, nameSpaceBi //// [server.d.ts] export declare var a: number; -//// [client.d.ts] -export declare var x: number; diff --git a/tests/baselines/reference/es6ImportNamedImportWithExport.js b/tests/baselines/reference/es6ImportNamedImportWithExport.js index 5175554f0f9..d51e677381a 100644 --- a/tests/baselines/reference/es6ImportNamedImportWithExport.js +++ b/tests/baselines/reference/es6ImportNamedImportWithExport.js @@ -82,16 +82,3 @@ export declare var x1: number; export declare var z1: number; export declare var z2: number; export declare var aaaa: number; -//// [client.d.ts] -export declare var xxxx: number; -export declare var xxxx: number; -export declare var xxxx: number; -export declare var xxxx: number; -export declare var xxxx: number; -export declare var xxxx: number; -export declare var xxxx: number; -export declare var xxxx: number; -export declare var xxxx: number; -export declare var xxxx: number; -export declare var z111: number; -export declare var z2: number; diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js b/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js index 208f71bcbfe..0089dd2b3df 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js +++ b/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js @@ -15,5 +15,3 @@ require("server"); //// [server.d.ts] export declare var a: number; -//// [client.d.ts] -export import "server"; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index 4a1ee9b739f..bcfb7d8347d 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -56,20 +56,3 @@ var Bbb; __export(require()); // this line causes the nullref })(Bbb || (Bbb = {})); var a; - - -//// [exportDeclarationInInternalModule.d.ts] -declare class Bbb { -} -declare class Aaa extends Bbb { -} -declare module Aaa { - class SomeType { - } -} -declare module Bbb { - class SomeType { - } - export * from Aaa; -} -declare var a: Bbb.SomeType; diff --git a/tests/baselines/reference/exportStarFromEmptyModule.js b/tests/baselines/reference/exportStarFromEmptyModule.js index d433e7b3682..e6db992f8f8 100644 --- a/tests/baselines/reference/exportStarFromEmptyModule.js +++ b/tests/baselines/reference/exportStarFromEmptyModule.js @@ -56,10 +56,3 @@ export declare class A { static r: any; } //// [exportStarFromEmptyModule_module2.d.ts] -//// [exportStarFromEmptyModule_module3.d.ts] -export * from "./exportStarFromEmptyModule_module2"; -export * from "./exportStarFromEmptyModule_module1"; -export declare class A { - static q: any; -} -//// [exportStarFromEmptyModule_module4.d.ts] diff --git a/tests/baselines/reference/getEmitOutputTsxFile_React.baseline b/tests/baselines/reference/getEmitOutputTsxFile_React.baseline index c796f8e78bc..fcf6437e79e 100644 --- a/tests/baselines/reference/getEmitOutputTsxFile_React.baseline +++ b/tests/baselines/reference/getEmitOutputTsxFile_React.baseline @@ -17,10 +17,11 @@ declare class Bar { EmitSkipped: false FileName : tests/cases/fourslash/inputFile2.js.map -{"version":3,"file":"inputFile2.js","sourceRoot":"","sources":["inputFile2.tsx"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,QAAQ,CAAC;AACjB,IAAI,CAAC,GAAG,qBAAC,GAAG,KAAC,IAAI,GAAG,CAAE,EAAG,CAAA"}FileName : tests/cases/fourslash/inputFile2.js +{"version":3,"file":"inputFile2.js","sourceRoot":"","sources":["inputFile2.tsx"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,QAAQ,CAAC;AACjB,IAAI,CAAC,GAAG,qBAAC,GAAG,KAAC,IAAI,GAAG,CAAE,EAAG,CAAA"}FileName : tests/cases/fourslash/inputFile2.js var y = "my div"; var x = React.createElement("div", {"name": y}); //# sourceMappingURL=inputFile2.js.mapFileName : tests/cases/fourslash/inputFile2.d.ts +declare var React: any; declare var y: string; declare var x: any; diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline index 396e220bdb6..b6249822131 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline @@ -1,6 +1,4 @@ EmitSkipped: false FileName : tests/cases/fourslash/inputFile.js var x = "hello world"; -FileName : tests/cases/fourslash/inputFile.d.ts -declare var x: number; diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline index 6a58015c1b3..38a695301d2 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline @@ -5,7 +5,4 @@ FileName : out.js var noErrors = true; // File not emitted, and contains semantic errors var semanticError = "string"; -FileName : out.d.ts -declare var noErrors: boolean; -declare var semanticError: boolean; diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index 46bdaf827d5..096f1ecd600 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -1107,307 +1107,3 @@ define(["require", "exports"], function (require, exports) { })(eM = exports.eM || (exports.eM = {})); ; }); - - -//// [giant.d.ts] -export declare var eV: any; -export declare function eF(): void; -export declare class eC { - constructor(); - pV: any; - private rV; - pF(): void; - private rF(); - pgF(): void; - pgF: any; - psF(param: any): void; - psF: any; - private rgF(); - private rgF; - private rsF(param); - private rsF; - static tV: any; - static tF(): void; - static tsF(param: any): void; - static tsF: any; - static tgF(): void; - static tgF: any; -} -export interface eI { - (): any; - (): number; - (p: any): any; - (p1: string): any; - (p2?: string): any; - (...p3: any[]): any; - (p4: string, p5?: string): any; - (p6: string, ...p7: any[]): any; - new (): any; - new (): number; - new (p: string): any; - new (p2?: string): any; - new (...p3: any[]): any; - new (p4: string, p5?: string): any; - new (p6: string, ...p7: any[]): any; - [p1: string]: any; - [p2: string, p3: number]: any; - p: any; - p1?: any; - p2?: string; - p3(): any; - p4?(): any; - p5?(): void; - p6(pa1: any): void; - p7(pa1: any, pa2: any): void; - p7?(pa1: any, pa2: any): void; -} -export declare module eM { - var eV: any; - function eF(): void; - class eC { - constructor(); - pV: any; - private rV; - pF(): void; - private rF(); - pgF(): void; - pgF: any; - psF(param: any): void; - psF: any; - private rgF(); - private rgF; - private rsF(param); - private rsF; - static tV: any; - static tF(): void; - static tsF(param: any): void; - static tsF: any; - static tgF(): void; - static tgF: any; - } - interface eI { - (): any; - (): number; - (p: any): any; - (p1: string): any; - (p2?: string): any; - (...p3: any[]): any; - (p4: string, p5?: string): any; - (p6: string, ...p7: any[]): any; - new (): any; - new (): number; - new (p: string): any; - new (p2?: string): any; - new (...p3: any[]): any; - new (p4: string, p5?: string): any; - new (p6: string, ...p7: any[]): any; - [p1: string]: any; - [p2: string, p3: number]: any; - p: any; - p1?: any; - p2?: string; - p3(): any; - p4?(): any; - p5?(): void; - p6(pa1: any): void; - p7(pa1: any, pa2: any): void; - p7?(pa1: any, pa2: any): void; - } - module eM { - var eV: any; - function eF(): void; - class eC { - } - interface eI { - } - module eM { - } - var eaV: any; - function eaF(): void; - class eaC { - } - module eaM { - } - } - var eaV: any; - function eaF(): void; - class eaC { - constructor(); - pV: any; - private rV; - pF(): void; - private rF(); - pgF(): void; - pgF: any; - psF(param: any): void; - psF: any; - private rgF(); - private rgF; - private rsF(param); - private rsF; - static tV: any; - static tF(): void; - static tsF(param: any): void; - static tsF: any; - static tgF(): void; - static tgF: any; - } - module eaM { - var V: any; - function F(): void; - class C { - } - interface I { - } - module M { - } - var eV: any; - function eF(): void; - class eC { - } - interface eI { - } - module eM { - } - } -} -export declare var eaV: any; -export declare function eaF(): void; -export declare class eaC { - constructor(); - pV: any; - private rV; - pF(): void; - private rF(); - pgF(): void; - pgF: any; - psF(param: any): void; - psF: any; - private rgF(); - private rgF; - private rsF(param); - private rsF; - static tV: any; - static tF(): void; - static tsF(param: any): void; - static tsF: any; - static tgF(): void; - static tgF: any; -} -export declare module eaM { - var V: any; - function F(): void; - class C { - constructor(); - pV: any; - private rV; - pF(): void; - static tV: any; - static tF(): void; - } - interface I { - (): any; - (): number; - (p: string): any; - (p2?: string): any; - (...p3: any[]): any; - (p4: string, p5?: string): any; - (p6: string, ...p7: any[]): any; - new (): any; - new (): number; - new (p: string): any; - new (p2?: string): any; - new (...p3: any[]): any; - new (p4: string, p5?: string): any; - new (p6: string, ...p7: any[]): any; - [p1: string]: any; - [p2: string, p3: number]: any; - p: any; - p1?: any; - p2?: string; - p3(): any; - p4?(): any; - p5?(): void; - p6(pa1: any): void; - p7(pa1: any, pa2: any): void; - p7?(pa1: any, pa2: any): void; - } - module M { - var V: any; - function F(): void; - class C { - } - interface I { - } - module M { - } - var eV: any; - function eF(): void; - class eC { - } - interface eI { - } - module eM { - } - var eaV: any; - function eaF(): void; - class eaC { - } - module eaM { - } - } - var eV: any; - function eF(): void; - class eC { - constructor(); - pV: any; - private rV; - pF(): void; - static tV: any; - static tF(): void; - } - interface eI { - (): any; - (): number; - (p: any): any; - (p1: string): any; - (p2?: string): any; - (...p3: any[]): any; - (p4: string, p5?: string): any; - (p6: string, ...p7: any[]): any; - new (): any; - new (): number; - new (p: string): any; - new (p2?: string): any; - new (...p3: any[]): any; - new (p4: string, p5?: string): any; - new (p6: string, ...p7: any[]): any; - [p1: string]: any; - [p2: string, p3: number]: any; - p: any; - p1?: any; - p2?: string; - p3(): any; - p4?(): any; - p5?(): void; - p6(pa1: any): void; - p7(pa1: any, pa2: any): void; - p7?(pa1: any, pa2: any): void; - } - module eM { - var V: any; - function F(): void; - class C { - } - module M { - } - var eV: any; - function eF(): void; - class eC { - } - interface eI { - } - module eM { - } - } -} diff --git a/tests/baselines/reference/isolatedModulesDeclaration.js b/tests/baselines/reference/isolatedModulesDeclaration.js index bb3e560a2f8..4a24f0e201f 100644 --- a/tests/baselines/reference/isolatedModulesDeclaration.js +++ b/tests/baselines/reference/isolatedModulesDeclaration.js @@ -4,7 +4,3 @@ export var x; //// [file1.js] export var x; - - -//// [file1.d.ts] -export declare var x: any; diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js index 9b644509361..2392b461ebf 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js @@ -18,6 +18,3 @@ function foo() { function foo() { return 30; } - - -//// [out.d.ts] diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js index d7965e91be1..807cdbf0925 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js @@ -19,6 +19,3 @@ function foo() { function foo() { return 10; } - - -//// [out.d.ts] diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js index 7b2643c13d3..aab4ba6af81 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js @@ -9,8 +9,3 @@ var x = 10; // Error reported so no declaration file generated? //// [out.js] var x = "hello"; var x = 10; // Error reported so no declaration file generated? - - -//// [out.d.ts] -declare var x: string; -declare var x: string; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js index 07d6fb812c0..fc8c7b44165 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js @@ -25,13 +25,3 @@ var c = (function () { // error on above reference path when emitting declarations function foo() { } - - -//// [a.d.ts] -declare class c { -} -//// [c.d.ts] -declare function bar(): void; -//// [b.d.ts] -/// -declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js index 641a89c1c50..87fccf56d50 100644 --- a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js @@ -13,8 +13,3 @@ var b = 30; a = 10; var a = 10; b = 30; - - -//// [out.d.ts] -declare let b: number; -declare let a: number; diff --git a/tests/baselines/reference/letAsIdentifier.js b/tests/baselines/reference/letAsIdentifier.js index 05811ce1088..9e0bce41c83 100644 --- a/tests/baselines/reference/letAsIdentifier.js +++ b/tests/baselines/reference/letAsIdentifier.js @@ -11,9 +11,3 @@ var let = 10; var a = 10; let = 30; var a; - - -//// [letAsIdentifier.d.ts] -declare var let: number; -declare var a: number; -declare let a: any; diff --git a/tests/baselines/reference/moduledecl.errors.txt b/tests/baselines/reference/moduledecl.errors.txt deleted file mode 100644 index 2ef60f058c2..00000000000 --- a/tests/baselines/reference/moduledecl.errors.txt +++ /dev/null @@ -1,241 +0,0 @@ -tests/cases/compiler/moduledecl.ts(164,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/moduledecl.ts(172,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/moduledecl.ts (2 errors) ==== - module a { - } - - module b.a { - } - - module c.a.b { - import ma = a; - } - - module mImport { - import d = a; - import e = b.a; - import d1 = a; - import e1 = b.a; - } - - module m0 { - function f1() { - } - - function f2(s: string); - function f2(n: number); - function f2(ns: any) { - } - - class c1 { - public a : ()=>string; - private b: ()=>number; - private static s1; - public static s2; - } - - interface i1 { - () : Object; - [n: number]: c1; - } - - import m2 = a; - import m3 = b; - import m4 = b.a; - import m5 = c; - import m6 = c.a; - import m7 = c.a.b; - } - - module m1 { - export function f1() { - } - - export function f2(s: string); - export function f2(n: number); - export function f2(ns: any) { - } - - export class c1 { - public a: () =>string; - private b: () =>number; - private static s1; - public static s2; - - public d() { - return "Hello"; - } - - public e: { x: number; y: string; }; - constructor (public n, public n2: number, private n3, private n4: string) { - } - } - - export interface i1 { - () : Object; - [n: number]: c1; - } - - import m2 = a; - import m3 = b; - import m4 = b.a; - import m5 = c; - import m6 = c.a; - import m7 = c.a.b; - } - - module m { - export module m2 { - var a = 10; - export var b: number; - } - - export module m3 { - export var c: number; - } - } - - module m { - - export module m25 { - export module m5 { - export var c: number; - } - } - } - - module m13 { - export module m4 { - export module m2 { - export module m3 { - export var c: number; - } - } - - export function f() { - return 20; - } - } - } - - declare module m4 { - export var b; - } - - declare module m5 { - export var c; - } - - declare module m43 { - export var b; - } - - declare module m55 { - export var c; - } - - declare module "m3" { - export var b: number; - } - - module exportTests { - export class C1_public { - private f2() { - return 30; - } - - public f3() { - return "string"; - } - } - class C2_private { - private f2() { - return 30; - } - - public f3() { - return "string"; - } - } - - export class C3_public { - private getC2_private() { - return new C2_private(); - } - private setC2_private(arg: C2_private) { - } - private get c2() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return new C2_private(); - } - public getC1_public() { - return new C1_public(); - } - public setC1_public(arg: C1_public) { - } - public get c1() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return new C1_public(); - } - } - } - - declare module mAmbient { - class C { - public myProp: number; - } - - function foo() : C; - var aVar: C; - interface B { - x: number; - y: C; - } - enum e { - x, - y, - z - } - - module m3 { - class C { - public myProp: number; - } - - function foo(): C; - var aVar: C; - interface B { - x: number; - y: C; - } - enum e { - x, - y, - z - } - } - } - - function foo() { - return mAmbient.foo(); - } - - var cVar = new mAmbient.C(); - var aVar = mAmbient.aVar; - var bB: mAmbient.B; - var eVar: mAmbient.e; - - function m3foo() { - return mAmbient.m3.foo(); - } - - var m3cVar = new mAmbient.m3.C(); - var m3aVar = mAmbient.m3.aVar; - var m3bB: mAmbient.m3.B; - var m3eVar: mAmbient.m3.e; - - \ No newline at end of file diff --git a/tests/baselines/reference/moduledecl.js b/tests/baselines/reference/moduledecl.js index ef3b9a2965c..f835729dc4d 100644 --- a/tests/baselines/reference/moduledecl.js +++ b/tests/baselines/reference/moduledecl.js @@ -1,4 +1,5 @@ //// [moduledecl.ts] + module a { } diff --git a/tests/baselines/reference/moduledecl.symbols b/tests/baselines/reference/moduledecl.symbols new file mode 100644 index 00000000000..178c406f8cd --- /dev/null +++ b/tests/baselines/reference/moduledecl.symbols @@ -0,0 +1,536 @@ +=== tests/cases/compiler/moduledecl.ts === + +module a { +>a : Symbol(a, Decl(moduledecl.ts, 0, 0)) +} + +module b.a { +>b : Symbol(b, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 4, 9)) +} + +module c.a.b { +>c : Symbol(c, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 7, 9)) +>b : Symbol(ma.b, Decl(moduledecl.ts, 7, 11)) + + import ma = a; +>ma : Symbol(ma, Decl(moduledecl.ts, 7, 14)) +>a : Symbol(ma, Decl(moduledecl.ts, 7, 9)) +} + +module mImport { +>mImport : Symbol(mImport, Decl(moduledecl.ts, 9, 1)) + + import d = a; +>d : Symbol(d, Decl(moduledecl.ts, 11, 16)) +>a : Symbol(d, Decl(moduledecl.ts, 0, 0)) + + import e = b.a; +>e : Symbol(e, Decl(moduledecl.ts, 12, 17)) +>b : Symbol(b, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(e, Decl(moduledecl.ts, 4, 9)) + + import d1 = a; +>d1 : Symbol(d1, Decl(moduledecl.ts, 13, 19)) +>a : Symbol(d, Decl(moduledecl.ts, 0, 0)) + + import e1 = b.a; +>e1 : Symbol(e1, Decl(moduledecl.ts, 14, 18)) +>b : Symbol(b, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(e, Decl(moduledecl.ts, 4, 9)) +} + +module m0 { +>m0 : Symbol(m0, Decl(moduledecl.ts, 16, 1)) + + function f1() { +>f1 : Symbol(f1, Decl(moduledecl.ts, 18, 11)) + } + + function f2(s: string); +>f2 : Symbol(f2, Decl(moduledecl.ts, 20, 5), Decl(moduledecl.ts, 22, 27), Decl(moduledecl.ts, 23, 27)) +>s : Symbol(s, Decl(moduledecl.ts, 22, 16)) + + function f2(n: number); +>f2 : Symbol(f2, Decl(moduledecl.ts, 20, 5), Decl(moduledecl.ts, 22, 27), Decl(moduledecl.ts, 23, 27)) +>n : Symbol(n, Decl(moduledecl.ts, 23, 16)) + + function f2(ns: any) { +>f2 : Symbol(f2, Decl(moduledecl.ts, 20, 5), Decl(moduledecl.ts, 22, 27), Decl(moduledecl.ts, 23, 27)) +>ns : Symbol(ns, Decl(moduledecl.ts, 24, 16)) + } + + class c1 { +>c1 : Symbol(c1, Decl(moduledecl.ts, 25, 5)) + + public a : ()=>string; +>a : Symbol(a, Decl(moduledecl.ts, 27, 14)) + + private b: ()=>number; +>b : Symbol(b, Decl(moduledecl.ts, 28, 30)) + + private static s1; +>s1 : Symbol(c1.s1, Decl(moduledecl.ts, 29, 30)) + + public static s2; +>s2 : Symbol(c1.s2, Decl(moduledecl.ts, 30, 26)) + } + + interface i1 { +>i1 : Symbol(i1, Decl(moduledecl.ts, 32, 5)) + + () : Object; +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + [n: number]: c1; +>n : Symbol(n, Decl(moduledecl.ts, 36, 9)) +>c1 : Symbol(c1, Decl(moduledecl.ts, 25, 5)) + } + + import m2 = a; +>m2 : Symbol(m2, Decl(moduledecl.ts, 37, 5)) +>a : Symbol(m2, Decl(moduledecl.ts, 0, 0)) + + import m3 = b; +>m3 : Symbol(m3, Decl(moduledecl.ts, 39, 18)) +>b : Symbol(m3, Decl(moduledecl.ts, 2, 1)) + + import m4 = b.a; +>m4 : Symbol(m4, Decl(moduledecl.ts, 40, 18)) +>b : Symbol(m3, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(m3.a, Decl(moduledecl.ts, 4, 9)) + + import m5 = c; +>m5 : Symbol(m5, Decl(moduledecl.ts, 41, 20)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) + + import m6 = c.a; +>m6 : Symbol(m6, Decl(moduledecl.ts, 42, 18)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(m5.a, Decl(moduledecl.ts, 7, 9)) + + import m7 = c.a.b; +>m7 : Symbol(m7, Decl(moduledecl.ts, 43, 20)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(m5.a, Decl(moduledecl.ts, 7, 9)) +>b : Symbol(m6.b, Decl(moduledecl.ts, 7, 11)) +} + +module m1 { +>m1 : Symbol(m1, Decl(moduledecl.ts, 45, 1)) + + export function f1() { +>f1 : Symbol(f1, Decl(moduledecl.ts, 47, 11)) + } + + export function f2(s: string); +>f2 : Symbol(f2, Decl(moduledecl.ts, 49, 5), Decl(moduledecl.ts, 51, 34), Decl(moduledecl.ts, 52, 34)) +>s : Symbol(s, Decl(moduledecl.ts, 51, 23)) + + export function f2(n: number); +>f2 : Symbol(f2, Decl(moduledecl.ts, 49, 5), Decl(moduledecl.ts, 51, 34), Decl(moduledecl.ts, 52, 34)) +>n : Symbol(n, Decl(moduledecl.ts, 52, 23)) + + export function f2(ns: any) { +>f2 : Symbol(f2, Decl(moduledecl.ts, 49, 5), Decl(moduledecl.ts, 51, 34), Decl(moduledecl.ts, 52, 34)) +>ns : Symbol(ns, Decl(moduledecl.ts, 53, 23)) + } + + export class c1 { +>c1 : Symbol(c1, Decl(moduledecl.ts, 54, 5)) + + public a: () =>string; +>a : Symbol(a, Decl(moduledecl.ts, 56, 21)) + + private b: () =>number; +>b : Symbol(b, Decl(moduledecl.ts, 57, 30)) + + private static s1; +>s1 : Symbol(c1.s1, Decl(moduledecl.ts, 58, 31)) + + public static s2; +>s2 : Symbol(c1.s2, Decl(moduledecl.ts, 59, 26)) + + public d() { +>d : Symbol(d, Decl(moduledecl.ts, 60, 25)) + + return "Hello"; + } + + public e: { x: number; y: string; }; +>e : Symbol(e, Decl(moduledecl.ts, 64, 9)) +>x : Symbol(x, Decl(moduledecl.ts, 66, 19)) +>y : Symbol(y, Decl(moduledecl.ts, 66, 30)) + + constructor (public n, public n2: number, private n3, private n4: string) { +>n : Symbol(n, Decl(moduledecl.ts, 67, 21)) +>n2 : Symbol(n2, Decl(moduledecl.ts, 67, 30)) +>n3 : Symbol(n3, Decl(moduledecl.ts, 67, 49)) +>n4 : Symbol(n4, Decl(moduledecl.ts, 67, 61)) + } + } + + export interface i1 { +>i1 : Symbol(i1, Decl(moduledecl.ts, 69, 5)) + + () : Object; +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + [n: number]: c1; +>n : Symbol(n, Decl(moduledecl.ts, 73, 9)) +>c1 : Symbol(c1, Decl(moduledecl.ts, 54, 5)) + } + + import m2 = a; +>m2 : Symbol(m2, Decl(moduledecl.ts, 74, 5)) +>a : Symbol(m2, Decl(moduledecl.ts, 0, 0)) + + import m3 = b; +>m3 : Symbol(m3, Decl(moduledecl.ts, 76, 18)) +>b : Symbol(m3, Decl(moduledecl.ts, 2, 1)) + + import m4 = b.a; +>m4 : Symbol(m4, Decl(moduledecl.ts, 77, 18)) +>b : Symbol(m3, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(m3.a, Decl(moduledecl.ts, 4, 9)) + + import m5 = c; +>m5 : Symbol(m5, Decl(moduledecl.ts, 78, 20)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) + + import m6 = c.a; +>m6 : Symbol(m6, Decl(moduledecl.ts, 79, 18)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(m5.a, Decl(moduledecl.ts, 7, 9)) + + import m7 = c.a.b; +>m7 : Symbol(m7, Decl(moduledecl.ts, 80, 20)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(m5.a, Decl(moduledecl.ts, 7, 9)) +>b : Symbol(m6.b, Decl(moduledecl.ts, 7, 11)) +} + +module m { +>m : Symbol(m, Decl(moduledecl.ts, 82, 1), Decl(moduledecl.ts, 93, 1)) + + export module m2 { +>m2 : Symbol(m2, Decl(moduledecl.ts, 84, 10)) + + var a = 10; +>a : Symbol(a, Decl(moduledecl.ts, 86, 11)) + + export var b: number; +>b : Symbol(b, Decl(moduledecl.ts, 87, 18)) + } + + export module m3 { +>m3 : Symbol(m3, Decl(moduledecl.ts, 88, 5)) + + export var c: number; +>c : Symbol(c, Decl(moduledecl.ts, 91, 18)) + } +} + +module m { +>m : Symbol(m, Decl(moduledecl.ts, 82, 1), Decl(moduledecl.ts, 93, 1)) + + export module m25 { +>m25 : Symbol(m25, Decl(moduledecl.ts, 95, 10)) + + export module m5 { +>m5 : Symbol(m5, Decl(moduledecl.ts, 97, 23)) + + export var c: number; +>c : Symbol(c, Decl(moduledecl.ts, 99, 22)) + } + } +} + +module m13 { +>m13 : Symbol(m13, Decl(moduledecl.ts, 102, 1)) + + export module m4 { +>m4 : Symbol(m4, Decl(moduledecl.ts, 104, 12)) + + export module m2 { +>m2 : Symbol(m2, Decl(moduledecl.ts, 105, 22)) + + export module m3 { +>m3 : Symbol(m3, Decl(moduledecl.ts, 106, 26)) + + export var c: number; +>c : Symbol(c, Decl(moduledecl.ts, 108, 26)) + } + } + + export function f() { +>f : Symbol(f, Decl(moduledecl.ts, 110, 9)) + + return 20; + } + } +} + +declare module m4 { +>m4 : Symbol(m4, Decl(moduledecl.ts, 116, 1)) + + export var b; +>b : Symbol(b, Decl(moduledecl.ts, 119, 14)) +} + +declare module m5 { +>m5 : Symbol(m5, Decl(moduledecl.ts, 120, 1)) + + export var c; +>c : Symbol(c, Decl(moduledecl.ts, 123, 14)) +} + +declare module m43 { +>m43 : Symbol(m43, Decl(moduledecl.ts, 124, 1)) + + export var b; +>b : Symbol(b, Decl(moduledecl.ts, 127, 14)) +} + +declare module m55 { +>m55 : Symbol(m55, Decl(moduledecl.ts, 128, 1)) + + export var c; +>c : Symbol(c, Decl(moduledecl.ts, 131, 14)) +} + +declare module "m3" { + export var b: number; +>b : Symbol(b, Decl(moduledecl.ts, 135, 14)) +} + +module exportTests { +>exportTests : Symbol(exportTests, Decl(moduledecl.ts, 136, 1)) + + export class C1_public { +>C1_public : Symbol(C1_public, Decl(moduledecl.ts, 138, 20)) + + private f2() { +>f2 : Symbol(f2, Decl(moduledecl.ts, 139, 28)) + + return 30; + } + + public f3() { +>f3 : Symbol(f3, Decl(moduledecl.ts, 142, 9)) + + return "string"; + } + } + class C2_private { +>C2_private : Symbol(C2_private, Decl(moduledecl.ts, 147, 5)) + + private f2() { +>f2 : Symbol(f2, Decl(moduledecl.ts, 148, 22)) + + return 30; + } + + public f3() { +>f3 : Symbol(f3, Decl(moduledecl.ts, 151, 9)) + + return "string"; + } + } + + export class C3_public { +>C3_public : Symbol(C3_public, Decl(moduledecl.ts, 156, 5)) + + private getC2_private() { +>getC2_private : Symbol(getC2_private, Decl(moduledecl.ts, 158, 28)) + + return new C2_private(); +>C2_private : Symbol(C2_private, Decl(moduledecl.ts, 147, 5)) + } + private setC2_private(arg: C2_private) { +>setC2_private : Symbol(setC2_private, Decl(moduledecl.ts, 161, 9)) +>arg : Symbol(arg, Decl(moduledecl.ts, 162, 30)) +>C2_private : Symbol(C2_private, Decl(moduledecl.ts, 147, 5)) + } + private get c2() { +>c2 : Symbol(c2, Decl(moduledecl.ts, 163, 9)) + + return new C2_private(); +>C2_private : Symbol(C2_private, Decl(moduledecl.ts, 147, 5)) + } + public getC1_public() { +>getC1_public : Symbol(getC1_public, Decl(moduledecl.ts, 166, 9)) + + return new C1_public(); +>C1_public : Symbol(C1_public, Decl(moduledecl.ts, 138, 20)) + } + public setC1_public(arg: C1_public) { +>setC1_public : Symbol(setC1_public, Decl(moduledecl.ts, 169, 9)) +>arg : Symbol(arg, Decl(moduledecl.ts, 170, 28)) +>C1_public : Symbol(C1_public, Decl(moduledecl.ts, 138, 20)) + } + public get c1() { +>c1 : Symbol(c1, Decl(moduledecl.ts, 171, 9)) + + return new C1_public(); +>C1_public : Symbol(C1_public, Decl(moduledecl.ts, 138, 20)) + } + } +} + +declare module mAmbient { +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) + + class C { +>C : Symbol(C, Decl(moduledecl.ts, 178, 25)) + + public myProp: number; +>myProp : Symbol(myProp, Decl(moduledecl.ts, 179, 13)) + } + + function foo() : C; +>foo : Symbol(foo, Decl(moduledecl.ts, 181, 5)) +>C : Symbol(C, Decl(moduledecl.ts, 178, 25)) + + var aVar: C; +>aVar : Symbol(aVar, Decl(moduledecl.ts, 184, 7)) +>C : Symbol(C, Decl(moduledecl.ts, 178, 25)) + + interface B { +>B : Symbol(B, Decl(moduledecl.ts, 184, 16)) + + x: number; +>x : Symbol(x, Decl(moduledecl.ts, 185, 17)) + + y: C; +>y : Symbol(y, Decl(moduledecl.ts, 186, 18)) +>C : Symbol(C, Decl(moduledecl.ts, 178, 25)) + } + enum e { +>e : Symbol(e, Decl(moduledecl.ts, 188, 5)) + + x, +>x : Symbol(e.x, Decl(moduledecl.ts, 189, 12)) + + y, +>y : Symbol(e.y, Decl(moduledecl.ts, 190, 10)) + + z +>z : Symbol(e.z, Decl(moduledecl.ts, 191, 10)) + } + + module m3 { +>m3 : Symbol(m3, Decl(moduledecl.ts, 193, 5)) + + class C { +>C : Symbol(C, Decl(moduledecl.ts, 195, 15)) + + public myProp: number; +>myProp : Symbol(myProp, Decl(moduledecl.ts, 196, 17)) + } + + function foo(): C; +>foo : Symbol(foo, Decl(moduledecl.ts, 198, 9)) +>C : Symbol(C, Decl(moduledecl.ts, 195, 15)) + + var aVar: C; +>aVar : Symbol(aVar, Decl(moduledecl.ts, 201, 11)) +>C : Symbol(C, Decl(moduledecl.ts, 195, 15)) + + interface B { +>B : Symbol(B, Decl(moduledecl.ts, 201, 20)) + + x: number; +>x : Symbol(x, Decl(moduledecl.ts, 202, 21)) + + y: C; +>y : Symbol(y, Decl(moduledecl.ts, 203, 22)) +>C : Symbol(C, Decl(moduledecl.ts, 195, 15)) + } + enum e { +>e : Symbol(e, Decl(moduledecl.ts, 205, 9)) + + x, +>x : Symbol(e.x, Decl(moduledecl.ts, 206, 16)) + + y, +>y : Symbol(e.y, Decl(moduledecl.ts, 207, 14)) + + z +>z : Symbol(e.z, Decl(moduledecl.ts, 208, 14)) + } + } +} + +function foo() { +>foo : Symbol(foo, Decl(moduledecl.ts, 212, 1)) + + return mAmbient.foo(); +>mAmbient.foo : Symbol(mAmbient.foo, Decl(moduledecl.ts, 181, 5)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>foo : Symbol(mAmbient.foo, Decl(moduledecl.ts, 181, 5)) +} + +var cVar = new mAmbient.C(); +>cVar : Symbol(cVar, Decl(moduledecl.ts, 218, 3)) +>mAmbient.C : Symbol(mAmbient.C, Decl(moduledecl.ts, 178, 25)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>C : Symbol(mAmbient.C, Decl(moduledecl.ts, 178, 25)) + +var aVar = mAmbient.aVar; +>aVar : Symbol(aVar, Decl(moduledecl.ts, 219, 3)) +>mAmbient.aVar : Symbol(mAmbient.aVar, Decl(moduledecl.ts, 184, 7)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>aVar : Symbol(mAmbient.aVar, Decl(moduledecl.ts, 184, 7)) + +var bB: mAmbient.B; +>bB : Symbol(bB, Decl(moduledecl.ts, 220, 3)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>B : Symbol(mAmbient.B, Decl(moduledecl.ts, 184, 16)) + +var eVar: mAmbient.e; +>eVar : Symbol(eVar, Decl(moduledecl.ts, 221, 3)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>e : Symbol(mAmbient.e, Decl(moduledecl.ts, 188, 5)) + +function m3foo() { +>m3foo : Symbol(m3foo, Decl(moduledecl.ts, 221, 21)) + + return mAmbient.m3.foo(); +>mAmbient.m3.foo : Symbol(mAmbient.m3.foo, Decl(moduledecl.ts, 198, 9)) +>mAmbient.m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>foo : Symbol(mAmbient.m3.foo, Decl(moduledecl.ts, 198, 9)) +} + +var m3cVar = new mAmbient.m3.C(); +>m3cVar : Symbol(m3cVar, Decl(moduledecl.ts, 227, 3)) +>mAmbient.m3.C : Symbol(mAmbient.m3.C, Decl(moduledecl.ts, 195, 15)) +>mAmbient.m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>C : Symbol(mAmbient.m3.C, Decl(moduledecl.ts, 195, 15)) + +var m3aVar = mAmbient.m3.aVar; +>m3aVar : Symbol(m3aVar, Decl(moduledecl.ts, 228, 3)) +>mAmbient.m3.aVar : Symbol(mAmbient.m3.aVar, Decl(moduledecl.ts, 201, 11)) +>mAmbient.m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>aVar : Symbol(mAmbient.m3.aVar, Decl(moduledecl.ts, 201, 11)) + +var m3bB: mAmbient.m3.B; +>m3bB : Symbol(m3bB, Decl(moduledecl.ts, 229, 3)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>B : Symbol(mAmbient.m3.B, Decl(moduledecl.ts, 201, 20)) + +var m3eVar: mAmbient.m3.e; +>m3eVar : Symbol(m3eVar, Decl(moduledecl.ts, 230, 3)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>e : Symbol(mAmbient.m3.e, Decl(moduledecl.ts, 205, 9)) + + diff --git a/tests/baselines/reference/moduledecl.types b/tests/baselines/reference/moduledecl.types new file mode 100644 index 00000000000..0c117fb5184 --- /dev/null +++ b/tests/baselines/reference/moduledecl.types @@ -0,0 +1,551 @@ +=== tests/cases/compiler/moduledecl.ts === + +module a { +>a : any +} + +module b.a { +>b : any +>a : any +} + +module c.a.b { +>c : any +>a : any +>b : any + + import ma = a; +>ma : any +>a : any +} + +module mImport { +>mImport : any + + import d = a; +>d : any +>a : any + + import e = b.a; +>e : any +>b : any +>a : any + + import d1 = a; +>d1 : any +>a : any + + import e1 = b.a; +>e1 : any +>b : any +>a : any +} + +module m0 { +>m0 : typeof m0 + + function f1() { +>f1 : () => void + } + + function f2(s: string); +>f2 : { (s: string): any; (n: number): any; } +>s : string + + function f2(n: number); +>f2 : { (s: string): any; (n: number): any; } +>n : number + + function f2(ns: any) { +>f2 : { (s: string): any; (n: number): any; } +>ns : any + } + + class c1 { +>c1 : c1 + + public a : ()=>string; +>a : () => string + + private b: ()=>number; +>b : () => number + + private static s1; +>s1 : any + + public static s2; +>s2 : any + } + + interface i1 { +>i1 : i1 + + () : Object; +>Object : Object + + [n: number]: c1; +>n : number +>c1 : c1 + } + + import m2 = a; +>m2 : any +>a : any + + import m3 = b; +>m3 : any +>b : any + + import m4 = b.a; +>m4 : any +>b : any +>a : any + + import m5 = c; +>m5 : any +>c : any + + import m6 = c.a; +>m6 : any +>c : any +>a : any + + import m7 = c.a.b; +>m7 : any +>c : any +>a : any +>b : any +} + +module m1 { +>m1 : typeof m1 + + export function f1() { +>f1 : () => void + } + + export function f2(s: string); +>f2 : { (s: string): any; (n: number): any; } +>s : string + + export function f2(n: number); +>f2 : { (s: string): any; (n: number): any; } +>n : number + + export function f2(ns: any) { +>f2 : { (s: string): any; (n: number): any; } +>ns : any + } + + export class c1 { +>c1 : c1 + + public a: () =>string; +>a : () => string + + private b: () =>number; +>b : () => number + + private static s1; +>s1 : any + + public static s2; +>s2 : any + + public d() { +>d : () => string + + return "Hello"; +>"Hello" : string + } + + public e: { x: number; y: string; }; +>e : { x: number; y: string; } +>x : number +>y : string + + constructor (public n, public n2: number, private n3, private n4: string) { +>n : any +>n2 : number +>n3 : any +>n4 : string + } + } + + export interface i1 { +>i1 : i1 + + () : Object; +>Object : Object + + [n: number]: c1; +>n : number +>c1 : c1 + } + + import m2 = a; +>m2 : any +>a : any + + import m3 = b; +>m3 : any +>b : any + + import m4 = b.a; +>m4 : any +>b : any +>a : any + + import m5 = c; +>m5 : any +>c : any + + import m6 = c.a; +>m6 : any +>c : any +>a : any + + import m7 = c.a.b; +>m7 : any +>c : any +>a : any +>b : any +} + +module m { +>m : typeof m + + export module m2 { +>m2 : typeof m2 + + var a = 10; +>a : number +>10 : number + + export var b: number; +>b : number + } + + export module m3 { +>m3 : typeof m3 + + export var c: number; +>c : number + } +} + +module m { +>m : typeof m + + export module m25 { +>m25 : typeof m25 + + export module m5 { +>m5 : typeof m5 + + export var c: number; +>c : number + } + } +} + +module m13 { +>m13 : typeof m13 + + export module m4 { +>m4 : typeof m4 + + export module m2 { +>m2 : typeof m2 + + export module m3 { +>m3 : typeof m3 + + export var c: number; +>c : number + } + } + + export function f() { +>f : () => number + + return 20; +>20 : number + } + } +} + +declare module m4 { +>m4 : typeof m4 + + export var b; +>b : any +} + +declare module m5 { +>m5 : typeof m5 + + export var c; +>c : any +} + +declare module m43 { +>m43 : typeof m43 + + export var b; +>b : any +} + +declare module m55 { +>m55 : typeof m55 + + export var c; +>c : any +} + +declare module "m3" { + export var b: number; +>b : number +} + +module exportTests { +>exportTests : typeof exportTests + + export class C1_public { +>C1_public : C1_public + + private f2() { +>f2 : () => number + + return 30; +>30 : number + } + + public f3() { +>f3 : () => string + + return "string"; +>"string" : string + } + } + class C2_private { +>C2_private : C2_private + + private f2() { +>f2 : () => number + + return 30; +>30 : number + } + + public f3() { +>f3 : () => string + + return "string"; +>"string" : string + } + } + + export class C3_public { +>C3_public : C3_public + + private getC2_private() { +>getC2_private : () => C2_private + + return new C2_private(); +>new C2_private() : C2_private +>C2_private : typeof C2_private + } + private setC2_private(arg: C2_private) { +>setC2_private : (arg: C2_private) => void +>arg : C2_private +>C2_private : C2_private + } + private get c2() { +>c2 : C2_private + + return new C2_private(); +>new C2_private() : C2_private +>C2_private : typeof C2_private + } + public getC1_public() { +>getC1_public : () => C1_public + + return new C1_public(); +>new C1_public() : C1_public +>C1_public : typeof C1_public + } + public setC1_public(arg: C1_public) { +>setC1_public : (arg: C1_public) => void +>arg : C1_public +>C1_public : C1_public + } + public get c1() { +>c1 : C1_public + + return new C1_public(); +>new C1_public() : C1_public +>C1_public : typeof C1_public + } + } +} + +declare module mAmbient { +>mAmbient : typeof mAmbient + + class C { +>C : C + + public myProp: number; +>myProp : number + } + + function foo() : C; +>foo : () => C +>C : C + + var aVar: C; +>aVar : C +>C : C + + interface B { +>B : B + + x: number; +>x : number + + y: C; +>y : C +>C : C + } + enum e { +>e : e + + x, +>x : e + + y, +>y : e + + z +>z : e + } + + module m3 { +>m3 : typeof m3 + + class C { +>C : C + + public myProp: number; +>myProp : number + } + + function foo(): C; +>foo : () => C +>C : C + + var aVar: C; +>aVar : C +>C : C + + interface B { +>B : B + + x: number; +>x : number + + y: C; +>y : C +>C : C + } + enum e { +>e : e + + x, +>x : e + + y, +>y : e + + z +>z : e + } + } +} + +function foo() { +>foo : () => mAmbient.C + + return mAmbient.foo(); +>mAmbient.foo() : mAmbient.C +>mAmbient.foo : () => mAmbient.C +>mAmbient : typeof mAmbient +>foo : () => mAmbient.C +} + +var cVar = new mAmbient.C(); +>cVar : mAmbient.C +>new mAmbient.C() : mAmbient.C +>mAmbient.C : typeof mAmbient.C +>mAmbient : typeof mAmbient +>C : typeof mAmbient.C + +var aVar = mAmbient.aVar; +>aVar : mAmbient.C +>mAmbient.aVar : mAmbient.C +>mAmbient : typeof mAmbient +>aVar : mAmbient.C + +var bB: mAmbient.B; +>bB : mAmbient.B +>mAmbient : any +>B : mAmbient.B + +var eVar: mAmbient.e; +>eVar : mAmbient.e +>mAmbient : any +>e : mAmbient.e + +function m3foo() { +>m3foo : () => mAmbient.m3.C + + return mAmbient.m3.foo(); +>mAmbient.m3.foo() : mAmbient.m3.C +>mAmbient.m3.foo : () => mAmbient.m3.C +>mAmbient.m3 : typeof mAmbient.m3 +>mAmbient : typeof mAmbient +>m3 : typeof mAmbient.m3 +>foo : () => mAmbient.m3.C +} + +var m3cVar = new mAmbient.m3.C(); +>m3cVar : mAmbient.m3.C +>new mAmbient.m3.C() : mAmbient.m3.C +>mAmbient.m3.C : typeof mAmbient.m3.C +>mAmbient.m3 : typeof mAmbient.m3 +>mAmbient : typeof mAmbient +>m3 : typeof mAmbient.m3 +>C : typeof mAmbient.m3.C + +var m3aVar = mAmbient.m3.aVar; +>m3aVar : mAmbient.m3.C +>mAmbient.m3.aVar : mAmbient.m3.C +>mAmbient.m3 : typeof mAmbient.m3 +>mAmbient : typeof mAmbient +>m3 : typeof mAmbient.m3 +>aVar : mAmbient.m3.C + +var m3bB: mAmbient.m3.B; +>m3bB : mAmbient.m3.B +>mAmbient : any +>m3 : any +>B : mAmbient.m3.B + +var m3eVar: mAmbient.m3.e; +>m3eVar : mAmbient.m3.e +>mAmbient : any +>m3 : any +>e : mAmbient.m3.e + + diff --git a/tests/baselines/reference/out-flag3.js b/tests/baselines/reference/out-flag3.js index 8327c3429d3..3ec03ecc841 100644 --- a/tests/baselines/reference/out-flag3.js +++ b/tests/baselines/reference/out-flag3.js @@ -21,10 +21,4 @@ var B = (function () { } return B; })(); -//# sourceMappingURL=c.js.map - -//// [c.d.ts] -declare class A { -} -declare class B { -} +//# sourceMappingURL=c.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json index 36eed6a6518..591a855b5c9 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json @@ -9,7 +9,6 @@ "DifferentNamesSpecified/a.ts" ], "emittedFiles": [ - "test.js", - "test.d.ts" + "test.js" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts deleted file mode 100644 index 4c0b8989316..00000000000 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json index 36eed6a6518..591a855b5c9 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json @@ -9,7 +9,6 @@ "DifferentNamesSpecified/a.ts" ], "emittedFiles": [ - "test.js", - "test.d.ts" + "test.js" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts deleted file mode 100644 index 4c0b8989316..00000000000 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare var test: number; diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/FolderC/fileC.d.ts b/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/FolderC/fileC.d.ts deleted file mode 100644 index 8147620b211..00000000000 --- a/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/FolderC/fileC.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare class C { -} diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/fileB.d.ts b/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/fileB.d.ts deleted file mode 100644 index 4ff813c3839..00000000000 --- a/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/fileB.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -declare class B { - c: C; -} diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json index 42f348a4b56..14f15bd6fdb 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json +++ b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json @@ -15,8 +15,6 @@ ], "emittedFiles": [ "outdir/simple/FolderC/fileC.js", - "outdir/simple/FolderC/fileC.d.ts", - "outdir/simple/fileB.js", - "outdir/simple/fileB.d.ts" + "outdir/simple/fileB.js" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/FolderC/fileC.d.ts b/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/FolderC/fileC.d.ts deleted file mode 100644 index 8147620b211..00000000000 --- a/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/FolderC/fileC.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare class C { -} diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/fileB.d.ts b/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/fileB.d.ts deleted file mode 100644 index 4ff813c3839..00000000000 --- a/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/fileB.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -declare class B { - c: C; -} diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json index 42f348a4b56..14f15bd6fdb 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json +++ b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json @@ -15,8 +15,6 @@ ], "emittedFiles": [ "outdir/simple/FolderC/fileC.js", - "outdir/simple/FolderC/fileC.d.ts", - "outdir/simple/fileB.js", - "outdir/simple/fileB.d.ts" + "outdir/simple/fileB.js" ] } \ No newline at end of file diff --git a/tests/baselines/reference/widenedTypes.js b/tests/baselines/reference/widenedTypes.js index a0ff6327f25..5d48d8f5636 100644 --- a/tests/baselines/reference/widenedTypes.js +++ b/tests/baselines/reference/widenedTypes.js @@ -41,17 +41,3 @@ var ob = { x: "" }; // Highlights the difference between array literals and object literals var arr = [3, null]; // not assignable because null is not widened. BCT is {} var obj = { x: 3, y: null }; // assignable because null is widened, and therefore BCT is any - - -//// [widenedTypes.d.ts] -declare var t: number[]; -declare var x: typeof undefined; -declare var y: any; -declare var u: number[]; -declare var ob: { - x: typeof undefined; -}; -declare var arr: string[]; -declare var obj: { - [x: string]: string; -}; diff --git a/tests/baselines/reference/withExportDecl.errors.txt b/tests/baselines/reference/withExportDecl.errors.txt deleted file mode 100644 index 77d185d207f..00000000000 --- a/tests/baselines/reference/withExportDecl.errors.txt +++ /dev/null @@ -1,64 +0,0 @@ -tests/cases/compiler/withExportDecl.ts(43,9): error TS1029: 'export' modifier must precede 'declare' modifier. - - -==== tests/cases/compiler/withExportDecl.ts (1 errors) ==== - var simpleVar; - export var exportedSimpleVar; - - var anotherVar: any; - var varWithSimpleType: number; - var varWithArrayType: number[]; - - var varWithInitialValue = 30; - export var exportedVarWithInitialValue = 70; - - var withComplicatedValue = { x: 30, y: 70, desc: "position" }; - export var exportedWithComplicatedValue = { x: 30, y: 70, desc: "position" }; - - declare var declaredVar; - declare var declareVar2 - - declare var declaredVar; - declare var deckareVarWithType: number; - export declare var exportedDeclaredVar: number; - - var arrayVar: string[] = ['a', 'b']; - - export var exportedArrayVar: { x: number; y: string; }[] ; - exportedArrayVar.push({ x: 30, y : 'hello world' }); - - function simpleFunction() { - return { - x: "Hello", - y: "word", - n: 2 - }; - } - - export function exportedFunction() { - return simpleFunction(); - } - - module m1 { - export function foo() { - return "Hello"; - } - } - declare export module m2 { - ~~~~~~ -!!! error TS1029: 'export' modifier must precede 'declare' modifier. - - export var a: number; - } - - - export module m3 { - - export function foo() { - return m1.foo(); - } - } - - export var eVar1, eVar2 = 10; - var eVar22; - export var eVar3 = 10, eVar4, eVar5; \ No newline at end of file diff --git a/tests/baselines/reference/withExportDecl.js b/tests/baselines/reference/withExportDecl.js index 8d8b8b817ea..085458717ec 100644 --- a/tests/baselines/reference/withExportDecl.js +++ b/tests/baselines/reference/withExportDecl.js @@ -41,7 +41,7 @@ module m1 { return "Hello"; } } -declare export module m2 { +export declare module m2 { export var a: number; } diff --git a/tests/baselines/reference/withExportDecl.symbols b/tests/baselines/reference/withExportDecl.symbols new file mode 100644 index 00000000000..4457abb76ea --- /dev/null +++ b/tests/baselines/reference/withExportDecl.symbols @@ -0,0 +1,129 @@ +=== tests/cases/compiler/withExportDecl.ts === +var simpleVar; +>simpleVar : Symbol(simpleVar, Decl(withExportDecl.ts, 0, 3)) + +export var exportedSimpleVar; +>exportedSimpleVar : Symbol(exportedSimpleVar, Decl(withExportDecl.ts, 1, 10)) + +var anotherVar: any; +>anotherVar : Symbol(anotherVar, Decl(withExportDecl.ts, 3, 3)) + +var varWithSimpleType: number; +>varWithSimpleType : Symbol(varWithSimpleType, Decl(withExportDecl.ts, 4, 3)) + +var varWithArrayType: number[]; +>varWithArrayType : Symbol(varWithArrayType, Decl(withExportDecl.ts, 5, 3)) + +var varWithInitialValue = 30; +>varWithInitialValue : Symbol(varWithInitialValue, Decl(withExportDecl.ts, 7, 3)) + +export var exportedVarWithInitialValue = 70; +>exportedVarWithInitialValue : Symbol(exportedVarWithInitialValue, Decl(withExportDecl.ts, 8, 10)) + +var withComplicatedValue = { x: 30, y: 70, desc: "position" }; +>withComplicatedValue : Symbol(withComplicatedValue, Decl(withExportDecl.ts, 10, 3)) +>x : Symbol(x, Decl(withExportDecl.ts, 10, 28)) +>y : Symbol(y, Decl(withExportDecl.ts, 10, 35)) +>desc : Symbol(desc, Decl(withExportDecl.ts, 10, 42)) + +export var exportedWithComplicatedValue = { x: 30, y: 70, desc: "position" }; +>exportedWithComplicatedValue : Symbol(exportedWithComplicatedValue, Decl(withExportDecl.ts, 11, 10)) +>x : Symbol(x, Decl(withExportDecl.ts, 11, 43)) +>y : Symbol(y, Decl(withExportDecl.ts, 11, 50)) +>desc : Symbol(desc, Decl(withExportDecl.ts, 11, 57)) + +declare var declaredVar; +>declaredVar : Symbol(declaredVar, Decl(withExportDecl.ts, 13, 11), Decl(withExportDecl.ts, 16, 11)) + +declare var declareVar2 +>declareVar2 : Symbol(declareVar2, Decl(withExportDecl.ts, 14, 11)) + +declare var declaredVar; +>declaredVar : Symbol(declaredVar, Decl(withExportDecl.ts, 13, 11), Decl(withExportDecl.ts, 16, 11)) + +declare var deckareVarWithType: number; +>deckareVarWithType : Symbol(deckareVarWithType, Decl(withExportDecl.ts, 17, 11)) + +export declare var exportedDeclaredVar: number; +>exportedDeclaredVar : Symbol(exportedDeclaredVar, Decl(withExportDecl.ts, 18, 18)) + +var arrayVar: string[] = ['a', 'b']; +>arrayVar : Symbol(arrayVar, Decl(withExportDecl.ts, 20, 3)) + +export var exportedArrayVar: { x: number; y: string; }[] ; +>exportedArrayVar : Symbol(exportedArrayVar, Decl(withExportDecl.ts, 22, 10)) +>x : Symbol(x, Decl(withExportDecl.ts, 22, 30)) +>y : Symbol(y, Decl(withExportDecl.ts, 22, 41)) + +exportedArrayVar.push({ x: 30, y : 'hello world' }); +>exportedArrayVar.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) +>exportedArrayVar : Symbol(exportedArrayVar, Decl(withExportDecl.ts, 22, 10)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(withExportDecl.ts, 23, 23)) +>y : Symbol(y, Decl(withExportDecl.ts, 23, 30)) + +function simpleFunction() { +>simpleFunction : Symbol(simpleFunction, Decl(withExportDecl.ts, 23, 52)) + + return { + x: "Hello", +>x : Symbol(x, Decl(withExportDecl.ts, 26, 12)) + + y: "word", +>y : Symbol(y, Decl(withExportDecl.ts, 27, 19)) + + n: 2 +>n : Symbol(n, Decl(withExportDecl.ts, 28, 18)) + + }; +} + +export function exportedFunction() { +>exportedFunction : Symbol(exportedFunction, Decl(withExportDecl.ts, 31, 1)) + + return simpleFunction(); +>simpleFunction : Symbol(simpleFunction, Decl(withExportDecl.ts, 23, 52)) +} + +module m1 { +>m1 : Symbol(m1, Decl(withExportDecl.ts, 35, 1)) + + export function foo() { +>foo : Symbol(foo, Decl(withExportDecl.ts, 37, 11)) + + return "Hello"; + } +} +export declare module m2 { +>m2 : Symbol(m2, Decl(withExportDecl.ts, 41, 1)) + + export var a: number; +>a : Symbol(a, Decl(withExportDecl.ts, 44, 14)) +} + + +export module m3 { +>m3 : Symbol(m3, Decl(withExportDecl.ts, 45, 1)) + + export function foo() { +>foo : Symbol(foo, Decl(withExportDecl.ts, 48, 18)) + + return m1.foo(); +>m1.foo : Symbol(m1.foo, Decl(withExportDecl.ts, 37, 11)) +>m1 : Symbol(m1, Decl(withExportDecl.ts, 35, 1)) +>foo : Symbol(m1.foo, Decl(withExportDecl.ts, 37, 11)) + } +} + +export var eVar1, eVar2 = 10; +>eVar1 : Symbol(eVar1, Decl(withExportDecl.ts, 55, 10)) +>eVar2 : Symbol(eVar2, Decl(withExportDecl.ts, 55, 17)) + +var eVar22; +>eVar22 : Symbol(eVar22, Decl(withExportDecl.ts, 56, 3)) + +export var eVar3 = 10, eVar4, eVar5; +>eVar3 : Symbol(eVar3, Decl(withExportDecl.ts, 57, 10)) +>eVar4 : Symbol(eVar4, Decl(withExportDecl.ts, 57, 22)) +>eVar5 : Symbol(eVar5, Decl(withExportDecl.ts, 57, 29)) + diff --git a/tests/baselines/reference/withExportDecl.types b/tests/baselines/reference/withExportDecl.types new file mode 100644 index 00000000000..099a6241f44 --- /dev/null +++ b/tests/baselines/reference/withExportDecl.types @@ -0,0 +1,156 @@ +=== tests/cases/compiler/withExportDecl.ts === +var simpleVar; +>simpleVar : any + +export var exportedSimpleVar; +>exportedSimpleVar : any + +var anotherVar: any; +>anotherVar : any + +var varWithSimpleType: number; +>varWithSimpleType : number + +var varWithArrayType: number[]; +>varWithArrayType : number[] + +var varWithInitialValue = 30; +>varWithInitialValue : number +>30 : number + +export var exportedVarWithInitialValue = 70; +>exportedVarWithInitialValue : number +>70 : number + +var withComplicatedValue = { x: 30, y: 70, desc: "position" }; +>withComplicatedValue : { x: number; y: number; desc: string; } +>{ x: 30, y: 70, desc: "position" } : { x: number; y: number; desc: string; } +>x : number +>30 : number +>y : number +>70 : number +>desc : string +>"position" : string + +export var exportedWithComplicatedValue = { x: 30, y: 70, desc: "position" }; +>exportedWithComplicatedValue : { x: number; y: number; desc: string; } +>{ x: 30, y: 70, desc: "position" } : { x: number; y: number; desc: string; } +>x : number +>30 : number +>y : number +>70 : number +>desc : string +>"position" : string + +declare var declaredVar; +>declaredVar : any + +declare var declareVar2 +>declareVar2 : any + +declare var declaredVar; +>declaredVar : any + +declare var deckareVarWithType: number; +>deckareVarWithType : number + +export declare var exportedDeclaredVar: number; +>exportedDeclaredVar : number + +var arrayVar: string[] = ['a', 'b']; +>arrayVar : string[] +>['a', 'b'] : string[] +>'a' : string +>'b' : string + +export var exportedArrayVar: { x: number; y: string; }[] ; +>exportedArrayVar : { x: number; y: string; }[] +>x : number +>y : string + +exportedArrayVar.push({ x: 30, y : 'hello world' }); +>exportedArrayVar.push({ x: 30, y : 'hello world' }) : number +>exportedArrayVar.push : (...items: { x: number; y: string; }[]) => number +>exportedArrayVar : { x: number; y: string; }[] +>push : (...items: { x: number; y: string; }[]) => number +>{ x: 30, y : 'hello world' } : { x: number; y: string; } +>x : number +>30 : number +>y : string +>'hello world' : string + +function simpleFunction() { +>simpleFunction : () => { x: string; y: string; n: number; } + + return { +>{ x: "Hello", y: "word", n: 2 } : { x: string; y: string; n: number; } + + x: "Hello", +>x : string +>"Hello" : string + + y: "word", +>y : string +>"word" : string + + n: 2 +>n : number +>2 : number + + }; +} + +export function exportedFunction() { +>exportedFunction : () => { x: string; y: string; n: number; } + + return simpleFunction(); +>simpleFunction() : { x: string; y: string; n: number; } +>simpleFunction : () => { x: string; y: string; n: number; } +} + +module m1 { +>m1 : typeof m1 + + export function foo() { +>foo : () => string + + return "Hello"; +>"Hello" : string + } +} +export declare module m2 { +>m2 : typeof m2 + + export var a: number; +>a : number +} + + +export module m3 { +>m3 : typeof m3 + + export function foo() { +>foo : () => string + + return m1.foo(); +>m1.foo() : string +>m1.foo : () => string +>m1 : typeof m1 +>foo : () => string + } +} + +export var eVar1, eVar2 = 10; +>eVar1 : any +>eVar2 : number +>10 : number + +var eVar22; +>eVar22 : any + +export var eVar3 = 10, eVar4, eVar5; +>eVar3 : number +>10 : number +>eVar4 : any +>eVar5 : any + diff --git a/tests/cases/compiler/classdecl.ts b/tests/cases/compiler/classdecl.ts index 785faf82865..2b9a55a1f3e 100644 --- a/tests/cases/compiler/classdecl.ts +++ b/tests/cases/compiler/classdecl.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 class a { //constructor (); constructor (n: number); @@ -13,7 +14,7 @@ class a { public get d() { return 30; } - public set d() { + public set d(a: number) { } public static get p2() { diff --git a/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts b/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts index 4d424e75d23..24b094b602d 100644 --- a/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts +++ b/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 function /*1*/makePoint(x: number) { return { diff --git a/tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts b/tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts index 545018c5a7f..79c9b581e5f 100644 --- a/tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts +++ b/tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 function /*1*/makePoint(x: number) { return { diff --git a/tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts b/tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts index b82cebc553f..de11cec9fe8 100644 --- a/tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts +++ b/tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 function /*1*/makePoint(x: number) { return { diff --git a/tests/cases/compiler/declFilePrivateStatic.ts b/tests/cases/compiler/declFilePrivateStatic.ts index 77edf963b69..0d64844ff99 100644 --- a/tests/cases/compiler/declFilePrivateStatic.ts +++ b/tests/cases/compiler/declFilePrivateStatic.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 class C { private static x = 1; diff --git a/tests/cases/compiler/moduledecl.ts b/tests/cases/compiler/moduledecl.ts index 0997f00eab4..eac2e9ff78c 100644 --- a/tests/cases/compiler/moduledecl.ts +++ b/tests/cases/compiler/moduledecl.ts @@ -1,4 +1,6 @@ // @declaration: true +// @target: es5 + module a { } diff --git a/tests/cases/compiler/withExportDecl.ts b/tests/cases/compiler/withExportDecl.ts index c7ae2f1bf38..f3c926ad707 100644 --- a/tests/cases/compiler/withExportDecl.ts +++ b/tests/cases/compiler/withExportDecl.ts @@ -42,7 +42,7 @@ module m1 { return "Hello"; } } -declare export module m2 { +export declare module m2 { export var a: number; } diff --git a/tests/cases/fourslash/getEmitOutputTsxFile_React.ts b/tests/cases/fourslash/getEmitOutputTsxFile_React.ts index ccfa3bcc0c2..0620f6d83ef 100644 --- a/tests/cases/fourslash/getEmitOutputTsxFile_React.ts +++ b/tests/cases/fourslash/getEmitOutputTsxFile_React.ts @@ -13,10 +13,18 @@ //// x : string; //// y : number //// } +//// /*1*/ // @Filename: inputFile2.tsx // @emitThisFile: true +//// declare var React: any; //// var y = "my div"; //// var x =
+//// /*2*/ + +goTo.marker("1"); +verify.numberOfErrorsInCurrentFile(0); +goTo.marker("2"); +verify.numberOfErrorsInCurrentFile(0); verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts index cbc83bb9c41..6ac9defb7d5 100644 --- a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts +++ b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts @@ -16,8 +16,7 @@ verify.getSemanticDiagnostics('[]'); goTo.marker("2"); verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); verify.verifyGetEmitOutputContentsForCurrentFile([ - { fileName: "out.js", content: "function foo() { return 10; }\r\nfunction foo() { return 30; }\r\n" }, - { fileName: "out.d.ts", content: "" }]); + { fileName: "out.js", content: "function foo() { return 10; }\r\nfunction foo() { return 30; }\r\n" }]); goTo.marker("2"); verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); goTo.marker("1"); From c26d2da5726ab16b738fa4a7da2166d42a878bb7 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 11:50:27 -0700 Subject: [PATCH 56/89] Do not emit declarations file if we reported error about inaccessible This type --- src/compiler/declarationEmitter.ts | 1 + tests/baselines/reference/declarationFiles.js | 45 ------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 8b4e1500a1c..efd5183ca6a 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -263,6 +263,7 @@ namespace ts { function reportInaccessibleThisError() { if (errorNameNode) { + reportedDeclarationError = true; diagnostics.push(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary, declarationNameToString(errorNameNode))); } diff --git a/tests/baselines/reference/declarationFiles.js b/tests/baselines/reference/declarationFiles.js index d7ed9bde8c7..7ef41a630cb 100644 --- a/tests/baselines/reference/declarationFiles.js +++ b/tests/baselines/reference/declarationFiles.js @@ -88,48 +88,3 @@ var C4 = (function () { }; return C4; })(); - - -//// [declarationFiles.d.ts] -declare class C1 { - x: this; - f(x: this): this; - constructor(x: this); -} -declare class C2 { - [x: string]: this; -} -interface Foo { - x: T; - y: this; -} -declare class C3 { - a: this[]; - b: [this, this]; - c: this | Date; - d: this & Date; - e: (((this))); - f: (x: this) => this; - g: new (x: this) => this; - h: Foo; - i: Foo this)>; - j: (x: any) => x is this; -} -declare class C4 { - x1: { - a: this; - }; - x2: this[]; - x3: { - a: this; - }[]; - x4: () => this; - f1(): { - a: this; - }; - f2(): this[]; - f3(): { - a: this; - }[]; - f4(): () => this; -} From 93cc1e530bcb4f9881a8cf955790638f7c65b205 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 13:40:34 -0700 Subject: [PATCH 57/89] Check source map files are being overwritten --- src/compiler/emitter.ts | 20 ++-- src/compiler/program.ts | 5 +- src/compiler/utilities.ts | 8 ++ .../reference/inlineSourceMap.sourcemap.txt | 2 +- .../reference/inlineSourceMap2.sourcemap.txt | 2 +- .../reference/inlineSources2.sourcemap.txt | 2 +- ...sFileCompilationWithMapFileAsJs.errors.txt | 18 +++ .../jsFileCompilationWithMapFileAsJs.js | 25 ++++ .../jsFileCompilationWithMapFileAsJs.js.map | 3 + ...leCompilationWithMapFileAsJs.sourcemap.txt | 84 +++++++++++++ ...hMapFileAsJsWithInlineSourceMap.errors.txt | 16 +++ ...ationWithMapFileAsJsWithInlineSourceMap.js | 25 ++++ ...pFileAsJsWithInlineSourceMap.sourcemap.txt | 84 +++++++++++++ ...ileCompilationWithMapFileAsJsWithOutDir.js | 28 +++++ ...ompilationWithMapFileAsJsWithOutDir.js.map | 4 + ...ionWithMapFileAsJsWithOutDir.sourcemap.txt | 110 ++++++++++++++++++ ...mpilationWithMapFileAsJsWithOutDir.symbols | 15 +++ ...CompilationWithMapFileAsJsWithOutDir.types | 15 +++ .../jsFileCompilationWithMapFileAsJs.ts | 14 +++ ...ationWithMapFileAsJsWithInlineSourceMap.ts | 14 +++ ...ileCompilationWithMapFileAsJsWithOutDir.ts | 15 +++ 21 files changed, 495 insertions(+), 14 deletions(-) create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.symbols create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.types create mode 100644 tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts create mode 100644 tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts create mode 100644 tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 3f741437609..29c7629e207 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -376,7 +376,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return true; } - function emitJavaScript(jsFilePath: string, root?: SourceFile) { + function emitJavaScript(jsFilePath: string, sourceMapFilePath: string, root?: SourceFile) { let writer = createTextWriter(newLine); let { write, writeTextOfNode, writeLine, increaseIndent, decreaseIndent } = writer; @@ -872,24 +872,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (compilerOptions.inlineSourceMap) { // Encode the sourceMap into the sourceMap url let base64SourceMapText = convertToBase64(sourceMapText); - sourceMapUrl = `//# sourceMappingURL=data:application/json;base64,${base64SourceMapText}`; + sourceMapData.jsSourceMappingURL = `data:application/json;base64,${base64SourceMapText}`; } else { // Write source map file writeFile(host, diagnostics, sourceMapData.sourceMapFilePath, sourceMapText, /*writeByteOrderMark*/ false); - sourceMapUrl = `//# sourceMappingURL=${sourceMapData.jsSourceMappingURL}`; } + sourceMapUrl = `//# sourceMappingURL=${sourceMapData.jsSourceMappingURL}`; // Write sourcemap url to the js file and write the js file writeJavaScriptFile(emitOutput + sourceMapUrl, writeByteOrderMark); } // Initialize source map data - let sourceMapJsFile = getBaseFileName(normalizeSlashes(jsFilePath)); sourceMapData = { - sourceMapFilePath: jsFilePath + ".map", - jsSourceMappingURL: sourceMapJsFile + ".map", - sourceMapFile: sourceMapJsFile, + sourceMapFilePath: sourceMapFilePath, + jsSourceMappingURL: !compilerOptions.inlineSourceMap ? getBaseFileName(normalizeSlashes(sourceMapFilePath)) : undefined, + sourceMapFile: getBaseFileName(normalizeSlashes(jsFilePath)), sourceMapSourceRoot: compilerOptions.sourceRoot || "", sourceMapSources: [], inputSourceFileNames: [], @@ -7596,9 +7595,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function emitFile({ jsFilePath, declarationFilePath}: { jsFilePath: string, declarationFilePath: string }, sourceFile?: SourceFile) { - if (!host.isEmitBlocked(jsFilePath)) { - emitJavaScript(jsFilePath, sourceFile); + function emitFile({ jsFilePath, sourceMapFilePath, declarationFilePath}: { jsFilePath: string, sourceMapFilePath: string, declarationFilePath: string }, sourceFile?: SourceFile) { + // Make sure not to write js File and source map file if any of them cannot be written + if (!host.isEmitBlocked(jsFilePath) && (!sourceMapFilePath || !host.isEmitBlocked(sourceMapFilePath))) { + emitJavaScript(jsFilePath, sourceMapFilePath, sourceFile); } if (compilerOptions.declaration) { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 4ab0bf4ccea..b4c9bc2eea7 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1292,11 +1292,14 @@ namespace ts { // Build map of files seen for (let file of files) { - let { jsFilePath, declarationFilePath } = getEmitFileNames(file, emitHost); + let { jsFilePath, sourceMapFilePath, declarationFilePath } = getEmitFileNames(file, emitHost); if (jsFilePath) { let filesEmittingJsFilePath = lookUp(emitFilesSeen, jsFilePath); if (!filesEmittingJsFilePath) { emitFilesSeen[jsFilePath] = [file]; + if (sourceMapFilePath) { + emitFilesSeen[sourceMapFilePath] = [file]; + } if (options.declaration) { emitFilesSeen[declarationFilePath] = [file]; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 0b0c9f2db33..b889e8b119d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1786,6 +1786,7 @@ namespace ts { sourceFile.languageVariant === LanguageVariant.JSX && options.jsx === JsxEmit.Preserve ? ".jsx" : ".js"); return { jsFilePath, + sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) }; } @@ -1795,18 +1796,25 @@ namespace ts { } return { jsFilePath: undefined, + sourceMapFilePath: undefined, declarationFilePath: undefined }; } export function getBundledEmitFileNames(options: CompilerOptions) { let jsFilePath = options.outFile || options.out; + return { jsFilePath, + sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) }; } + function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions) { + return options.sourceMap ? jsFilePath + ".map" : undefined; + } + function getDeclarationEmitFilePath(jsFilePath: string, options: CompilerOptions) { return options.declaration ? removeFileExtension(jsFilePath, getExtensionsToRemoveForEmitPath(options)) + ".d.ts" : undefined; } diff --git a/tests/baselines/reference/inlineSourceMap.sourcemap.txt b/tests/baselines/reference/inlineSourceMap.sourcemap.txt index 6625cc46b21..35bee4f1d4a 100644 --- a/tests/baselines/reference/inlineSourceMap.sourcemap.txt +++ b/tests/baselines/reference/inlineSourceMap.sourcemap.txt @@ -1,6 +1,6 @@ =================================================================== JsFile: inlineSourceMap.js -mapUrl: inlineSourceMap.js.map +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaW5saW5lU291cmNlTWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== sourceRoot: sources: inlineSourceMap.ts =================================================================== diff --git a/tests/baselines/reference/inlineSourceMap2.sourcemap.txt b/tests/baselines/reference/inlineSourceMap2.sourcemap.txt index 4d7f499b55a..e292a9b96b2 100644 --- a/tests/baselines/reference/inlineSourceMap2.sourcemap.txt +++ b/tests/baselines/reference/inlineSourceMap2.sourcemap.txt @@ -1,6 +1,6 @@ =================================================================== JsFile: outfile.js -mapUrl: file:///folder/outfile.js.map +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0ZmlsZS5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== sourceRoot: file:///folder/ sources: inlineSourceMap2.ts =================================================================== diff --git a/tests/baselines/reference/inlineSources2.sourcemap.txt b/tests/baselines/reference/inlineSources2.sourcemap.txt index e3e14d01e9e..e09af2f4221 100644 --- a/tests/baselines/reference/inlineSources2.sourcemap.txt +++ b/tests/baselines/reference/inlineSources2.sourcemap.txt @@ -1,6 +1,6 @@ =================================================================== JsFile: out.js -mapUrl: out.js.map +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVzdHMvY2FzZXMvY29tcGlsZXIvYS50cyIsInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQ0ZmLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbnZhciBhID0gMDtcbmNvbnNvbGUubG9nKGEpO1xuIiwidmFyIGIgPSAwO1xuY29uc29sZS5sb2coYik7Il19 sourceRoot: sources: tests/cases/compiler/a.ts,tests/cases/compiler/b.ts sourcesContent: ["\nvar a = 0;\nconsole.log(a);\n","var b = 0;\nconsole.log(b);"] diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt new file mode 100644 index 00000000000..2fdce65a6ab --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt @@ -0,0 +1,18 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js.map' which is one of the input files. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js.map' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + + class c { + } + +==== tests/cases/compiler/b.js.map (0 errors) ==== + function foo() { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js new file mode 100644 index 00000000000..ce13bf9d3f1 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts] //// + +//// [a.ts] + +class c { +} + +//// [b.js.map] +function foo() { +} + +//// [b.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//# sourceMappingURL=a.js.map//// [b.js.js] +function foo() { +} +//# sourceMappingURL=b.js.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map new file mode 100644 index 00000000000..54e54c5044a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map @@ -0,0 +1,3 @@ +//// [a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":["c","c.constructor"],"mappings":"AACA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}//// [b.js.js.map] +{"version":3,"file":"b.js.js","sourceRoot":"","sources":["b.js.map"],"names":["foo"],"mappings":"AAAA;AACAA,CAACA"} \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt new file mode 100644 index 00000000000..edb8c428744 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt @@ -0,0 +1,84 @@ +=================================================================== +JsFile: a.js +mapUrl: a.js.map +sourceRoot: +sources: a.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/a.js +sourceFile:a.ts +------------------------------------------------------------------- +>>>var c = (function () { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +--- +>>> function c() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) name (c) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1->class c { + > +2 > } +1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) name (c.constructor) +2 >Emitted(3, 6) Source(3, 2) + SourceIndex(0) name (c.constructor) +--- +>>> return c; +1->^^^^ +2 > ^^^^^^^^ +1-> +2 > } +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) +2 >Emitted(4, 13) Source(3, 2) + SourceIndex(0) name (c) +--- +>>>})(); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class c { + > } +1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) name (c) +2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) name (c) +3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=a.js.map=================================================================== +JsFile: b.js.js +mapUrl: b.js.js.map +sourceRoot: +sources: b.js.map +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/b.js.js +sourceFile:b.js.map +------------------------------------------------------------------- +>>>function foo() { +1 > +2 >^^-> +1 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +--- +>>>} +1-> +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->function foo() { + > +2 >} +1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) name (foo) +2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) name (foo) +--- +>>>//# sourceMappingURL=b.js.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt new file mode 100644 index 00000000000..35cc5dace16 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@ -0,0 +1,16 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + + class c { + } + +==== tests/cases/compiler/b.js.map (0 errors) ==== + function foo() { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js new file mode 100644 index 00000000000..2c9cc66836a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts] //// + +//// [a.ts] + +class c { +} + +//// [b.js.map] +function foo() { +} + +//// [b.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOlsiYyIsImMuY29uc3RydWN0b3IiXSwibWFwcGluZ3MiOiJBQUNBO0lBQUFBO0lBQ0FDLENBQUNBO0lBQURELFFBQUNBO0FBQURBLENBQUNBLEFBREQsSUFDQyJ9//// [b.js.js] +function foo() { +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIuanMubWFwIl0sIm5hbWVzIjpbImZvbyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQUEsQ0FBQ0EifQ== \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt new file mode 100644 index 00000000000..972c350c8e7 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt @@ -0,0 +1,84 @@ +=================================================================== +JsFile: a.js +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOlsiYyIsImMuY29uc3RydWN0b3IiXSwibWFwcGluZ3MiOiJBQUNBO0lBQUFBO0lBQ0FDLENBQUNBO0lBQURELFFBQUNBO0FBQURBLENBQUNBLEFBREQsSUFDQyJ9 +sourceRoot: +sources: a.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/a.js +sourceFile:a.ts +------------------------------------------------------------------- +>>>var c = (function () { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +--- +>>> function c() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) name (c) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1->class c { + > +2 > } +1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) name (c.constructor) +2 >Emitted(3, 6) Source(3, 2) + SourceIndex(0) name (c.constructor) +--- +>>> return c; +1->^^^^ +2 > ^^^^^^^^ +1-> +2 > } +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) +2 >Emitted(4, 13) Source(3, 2) + SourceIndex(0) name (c) +--- +>>>})(); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class c { + > } +1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) name (c) +2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) name (c) +3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOlsiYyIsImMuY29uc3RydWN0b3IiXSwibWFwcGluZ3MiOiJBQUNBO0lBQUFBO0lBQ0FDLENBQUNBO0lBQURELFFBQUNBO0FBQURBLENBQUNBLEFBREQsSUFDQyJ9=================================================================== +JsFile: b.js.js +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIuanMubWFwIl0sIm5hbWVzIjpbImZvbyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQUEsQ0FBQ0EifQ== +sourceRoot: +sources: b.js.map +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/b.js.js +sourceFile:b.js.map +------------------------------------------------------------------- +>>>function foo() { +1 > +2 >^^-> +1 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +--- +>>>} +1-> +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->function foo() { + > +2 >} +1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) name (foo) +2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) name (foo) +--- +>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIuanMubWFwIl0sIm5hbWVzIjpbImZvbyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQUEsQ0FBQ0EifQ== \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js new file mode 100644 index 00000000000..d0a35eb15f1 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts] //// + +//// [a.ts] + +class c { +} + +//// [b.js.map] +function foo() { +} + +//// [b.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//# sourceMappingURL=a.js.map//// [b.js.js] +function foo() { +} +//# sourceMappingURL=b.js.js.map//// [b.js] +function bar() { +} +//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map new file mode 100644 index 00000000000..ef19d2fc517 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map @@ -0,0 +1,4 @@ +//// [a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["../tests/cases/compiler/a.ts"],"names":["c","c.constructor"],"mappings":"AACA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}//// [b.js.js.map] +{"version":3,"file":"b.js.js","sourceRoot":"","sources":["../tests/cases/compiler/b.js.map"],"names":["foo"],"mappings":"AAAA;AACAA,CAACA"}//// [b.js.map] +{"version":3,"file":"b.js","sourceRoot":"","sources":["../tests/cases/compiler/b.js"],"names":["bar"],"mappings":"AAAA;AACAA,CAACA"} \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt new file mode 100644 index 00000000000..c3fb335e374 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt @@ -0,0 +1,110 @@ +=================================================================== +JsFile: a.js +mapUrl: a.js.map +sourceRoot: +sources: ../tests/cases/compiler/a.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:out/a.js +sourceFile:../tests/cases/compiler/a.ts +------------------------------------------------------------------- +>>>var c = (function () { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +--- +>>> function c() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) name (c) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1->class c { + > +2 > } +1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) name (c.constructor) +2 >Emitted(3, 6) Source(3, 2) + SourceIndex(0) name (c.constructor) +--- +>>> return c; +1->^^^^ +2 > ^^^^^^^^ +1-> +2 > } +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) +2 >Emitted(4, 13) Source(3, 2) + SourceIndex(0) name (c) +--- +>>>})(); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class c { + > } +1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) name (c) +2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) name (c) +3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=a.js.map=================================================================== +JsFile: b.js.js +mapUrl: b.js.js.map +sourceRoot: +sources: ../tests/cases/compiler/b.js.map +=================================================================== +------------------------------------------------------------------- +emittedFile:out/b.js.js +sourceFile:../tests/cases/compiler/b.js.map +------------------------------------------------------------------- +>>>function foo() { +1 > +2 >^^-> +1 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +--- +>>>} +1-> +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->function foo() { + > +2 >} +1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) name (foo) +2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) name (foo) +--- +>>>//# sourceMappingURL=b.js.js.map=================================================================== +JsFile: b.js +mapUrl: b.js.map +sourceRoot: +sources: ../tests/cases/compiler/b.js +=================================================================== +------------------------------------------------------------------- +emittedFile:out/b.js +sourceFile:../tests/cases/compiler/b.js +------------------------------------------------------------------- +>>>function bar() { +1 > +2 >^^-> +1 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +--- +>>>} +1-> +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->function bar() { + > +2 >} +1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) name (bar) +2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) name (bar) +--- +>>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.symbols b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.symbols new file mode 100644 index 00000000000..9974960bd2d --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.symbols @@ -0,0 +1,15 @@ +=== tests/cases/compiler/a.ts === + +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.js.map === +function foo() { +>foo : Symbol(foo, Decl(b.js.map, 0, 0)) +} + +=== tests/cases/compiler/b.js === +function bar() { +>bar : Symbol(bar, Decl(b.js, 0, 0)) +} diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.types b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.types new file mode 100644 index 00000000000..e4534a4cfd4 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.types @@ -0,0 +1,15 @@ +=== tests/cases/compiler/a.ts === + +class c { +>c : c +} + +=== tests/cases/compiler/b.js.map === +function foo() { +>foo : () => void +} + +=== tests/cases/compiler/b.js === +function bar() { +>bar : () => void +} diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts new file mode 100644 index 00000000000..6db2ffa3dc6 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts @@ -0,0 +1,14 @@ +// @jsExtensions: js,map +// @sourcemap: true + +// @filename: a.ts +class c { +} + +// @filename: b.js.map +function foo() { +} + +// @filename: b.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts new file mode 100644 index 00000000000..9c209ad1b95 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts @@ -0,0 +1,14 @@ +// @jsExtensions: js,map +// @inlineSourceMap: true + +// @filename: a.ts +class c { +} + +// @filename: b.js.map +function foo() { +} + +// @filename: b.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts new file mode 100644 index 00000000000..18b30bd5910 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts @@ -0,0 +1,15 @@ +// @jsExtensions: js,map +// @sourcemap: true +// @outdir: out + +// @filename: a.ts +class c { +} + +// @filename: b.js.map +function foo() { +} + +// @filename: b.js +function bar() { +} \ No newline at end of file From ff933be5ff251330d212fd5032d481bc65ffc912 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 15:51:37 -0700 Subject: [PATCH 58/89] Populate if emit was skipped correctly as part of emit result --- src/compiler/declarationEmitter.ts | 4 +++- src/compiler/emitter.ts | 18 +++++++++++------- src/compiler/program.ts | 2 +- src/harness/harness.ts | 4 ++-- ...ksWhenEmitBlockingErrorOnOtherFile.baseline | 8 ++++++++ .../getEmitOutputWithEmitterErrors.baseline | 4 +++- .../getEmitOutputWithEmitterErrors2.baseline | 4 +++- .../getEmitOutputWithSemanticErrors2.baseline | 4 +++- ...ithSemanticErrorsForMultipleFiles2.baseline | 4 +++- ...aveWorksWhenEmitBlockingErrorOnOtherFile.ts | 13 +++++++++++++ 10 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline create mode 100644 tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index efd5183ca6a..86c90ff6f1c 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -1608,12 +1608,14 @@ namespace ts { /* @internal */ export function writeDeclarationFile(declarationFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[]) { let emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, declarationFilePath, sourceFile); - if (!emitDeclarationResult.reportedDeclarationError && !host.isDeclarationEmitBlocked(declarationFilePath, sourceFile)) { + let emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isDeclarationEmitBlocked(declarationFilePath, sourceFile); + if (!emitSkipped) { let declarationOutput = emitDeclarationResult.referencePathsOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); let compilerOptions = host.getCompilerOptions(); writeFile(host, diagnostics, declarationFilePath, declarationOutput, compilerOptions.emitBOM); } + return emitSkipped; function getDeclarationOutput(synchronousDeclarationOutput: string, moduleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[]) { let appliedSyncOutputPos = 0; diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 29c7629e207..84a8eb7c6a6 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -323,27 +323,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None; let sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined; let diagnostics: Diagnostic[] = []; + let emitSkipped = false; let newLine = host.getNewLine(); if (targetSourceFile === undefined) { forEach(host.getSourceFiles(), sourceFile => { if (shouldEmitToOwnFile(sourceFile, compilerOptions)) { - emitFile(getEmitFileNames(sourceFile, host), sourceFile); + emitSkipped = emitFile(getEmitFileNames(sourceFile, host), sourceFile) || emitSkipped; } }); if (compilerOptions.outFile || compilerOptions.out) { - emitFile(getBundledEmitFileNames(compilerOptions)); + emitSkipped = emitFile(getBundledEmitFileNames(compilerOptions)) || emitSkipped; } } else { // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) if (shouldEmitToOwnFile(targetSourceFile, compilerOptions)) { - emitFile(getEmitFileNames(targetSourceFile, host), targetSourceFile); + emitSkipped = emitFile(getEmitFileNames(targetSourceFile, host), targetSourceFile) || emitSkipped; } else if (!isDeclarationFile(targetSourceFile) && (compilerOptions.outFile || compilerOptions.out)) { - emitFile(getBundledEmitFileNames(compilerOptions)); + emitSkipped = emitFile(getBundledEmitFileNames(compilerOptions)) || emitSkipped; } } @@ -351,7 +352,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi diagnostics = sortAndDeduplicateDiagnostics(diagnostics); return { - emitSkipped: false, + emitSkipped, diagnostics, sourceMaps: sourceMapDataList }; @@ -7597,13 +7598,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi function emitFile({ jsFilePath, sourceMapFilePath, declarationFilePath}: { jsFilePath: string, sourceMapFilePath: string, declarationFilePath: string }, sourceFile?: SourceFile) { // Make sure not to write js File and source map file if any of them cannot be written - if (!host.isEmitBlocked(jsFilePath) && (!sourceMapFilePath || !host.isEmitBlocked(sourceMapFilePath))) { + let emitSkipped = host.isEmitBlocked(jsFilePath) || (sourceMapFilePath && host.isEmitBlocked(sourceMapFilePath)); + if (!emitSkipped) { emitJavaScript(jsFilePath, sourceMapFilePath, sourceFile); } if (compilerOptions.declaration) { - writeDeclarationFile(declarationFilePath, sourceFile, host, resolver, diagnostics); + emitSkipped = writeDeclarationFile(declarationFilePath, sourceFile, host, resolver, diagnostics) || emitSkipped; } + + return emitSkipped; } } } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b4c9bc2eea7..87ca7fb2a44 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -293,7 +293,7 @@ namespace ts { program.getSemanticDiagnostics(sourceFile, cancellationToken)); if (program.getCompilerOptions().declaration) { - diagnostics.concat(program.getDeclarationDiagnostics(sourceFile, cancellationToken)); + diagnostics = diagnostics.concat(program.getDeclarationDiagnostics(sourceFile, cancellationToken)); } return sortAndDeduplicateDiagnostics(diagnostics); diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 4ebc1976217..fab3f649f2a 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1121,7 +1121,7 @@ namespace Harness { let emitResult = program.emit(); - let errors = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); + let errors = ts.getPreEmitDiagnostics(program); this.lastErrors = errors; let result = new CompilerResult(fileOutputs, errors, program, Harness.IO.getCurrentDirectory(), emitResult.sourceMaps); @@ -1666,7 +1666,7 @@ namespace Harness { let encoded_actual = Utils.encodeString(actual); if (expected != encoded_actual) { // Overwrite & issue error - let errMsg = "The baseline file " + relativeFileName + " has changed.\nExpected:\n" + expected + "\nActual:\n" + encoded_actual; + let errMsg = "The baseline file " + relativeFileName + " has changed."; throw new Error(errMsg); } } diff --git a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline new file mode 100644 index 00000000000..5db889dc01d --- /dev/null +++ b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline @@ -0,0 +1,8 @@ +EmitSkipped: true +Diagnostics: + Cannot write file 'tests/cases/fourslash/b.js' which is one of the input files. + +EmitSkipped: false +FileName : tests/cases/fourslash/a.js +function foo2() { return 30; } // no error - should emit a.js + diff --git a/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline b/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline index f854a619a47..2f27152892b 100644 --- a/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline +++ b/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline @@ -1,4 +1,6 @@ -EmitSkipped: false +EmitSkipped: true +Diagnostics: + Exported variable 'foo' has or is using private name 'C'. FileName : tests/cases/fourslash/inputFile.js var M; (function (M) { diff --git a/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline b/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline index 463dfe6899a..a3a9023f75b 100644 --- a/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline +++ b/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline @@ -1,4 +1,6 @@ -EmitSkipped: false +EmitSkipped: true +Diagnostics: + Exported variable 'foo' has or is using private name 'C'. FileName : tests/cases/fourslash/inputFile.js define(["require", "exports"], function (require, exports) { var C = (function () { diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline index b6249822131..88bc5c50727 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline @@ -1,4 +1,6 @@ -EmitSkipped: false +EmitSkipped: true +Diagnostics: + Type 'string' is not assignable to type 'number'. FileName : tests/cases/fourslash/inputFile.js var x = "hello world"; diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline index 38a695301d2..63747de55de 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline @@ -1,4 +1,6 @@ -EmitSkipped: false +EmitSkipped: true +Diagnostics: + Type 'string' is not assignable to type 'boolean'. FileName : out.js // File to emit, does not contain semantic errors, but --out is passed // expected to not generate declarations because of the semantic errors in the other file diff --git a/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts b/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts new file mode 100644 index 00000000000..138b4de6f46 --- /dev/null +++ b/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts @@ -0,0 +1,13 @@ +/// + +// @BaselineFile: compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline +// @jsExtensions: js +// @Filename: b.js +// @emitThisFile: true +////function foo() { } // This has error because js file cannot be overwritten - emitSkipped should be true + +// @Filename: a.ts +// @emitThisFile: true +////function foo2() { return 30; } // no error - should emit a.js + +verify.baselineGetEmitOutput(); \ No newline at end of file From bf05ea3b2f714a02440d27ff349e3823af2c3580 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 16:08:07 -0700 Subject: [PATCH 59/89] Some test cases to verify that declaration file overwrite is reported correctly --- .../declarationFileOverwriteError.errors.txt | 12 ++++++++++++ .../reference/declarationFileOverwriteError.js | 17 +++++++++++++++++ ...larationFileOverwriteErrorWithOut.errors.txt | 12 ++++++++++++ .../declarationFileOverwriteErrorWithOut.js | 17 +++++++++++++++++ .../compiler/declarationFileOverwriteError.ts | 9 +++++++++ .../declarationFileOverwriteErrorWithOut.ts | 10 ++++++++++ 6 files changed, 77 insertions(+) create mode 100644 tests/baselines/reference/declarationFileOverwriteError.errors.txt create mode 100644 tests/baselines/reference/declarationFileOverwriteError.js create mode 100644 tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt create mode 100644 tests/baselines/reference/declarationFileOverwriteErrorWithOut.js create mode 100644 tests/cases/compiler/declarationFileOverwriteError.ts create mode 100644 tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts diff --git a/tests/baselines/reference/declarationFileOverwriteError.errors.txt b/tests/baselines/reference/declarationFileOverwriteError.errors.txt new file mode 100644 index 00000000000..fbf4948c203 --- /dev/null +++ b/tests/baselines/reference/declarationFileOverwriteError.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' which is one of the input files. + + +!!! error TS5055: Cannot write file 'a.d.ts' which is one of the input files. +==== tests/cases/compiler/a.d.ts (0 errors) ==== + + declare class c { + } + +==== tests/cases/compiler/a.ts (0 errors) ==== + class d { + } \ No newline at end of file diff --git a/tests/baselines/reference/declarationFileOverwriteError.js b/tests/baselines/reference/declarationFileOverwriteError.js new file mode 100644 index 00000000000..a9ae79f8ed6 --- /dev/null +++ b/tests/baselines/reference/declarationFileOverwriteError.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/declarationFileOverwriteError.ts] //// + +//// [a.d.ts] + +declare class c { +} + +//// [a.ts] +class d { +} + +//// [a.js] +var d = (function () { + function d() { + } + return d; +})(); diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt new file mode 100644 index 00000000000..b90bccbaf94 --- /dev/null +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' which is one of the input files. + + +!!! error TS5055: Cannot write file 'out.d.ts' which is one of the input files. +==== tests/cases/compiler/out.d.ts (0 errors) ==== + + declare class c { + } + +==== tests/cases/compiler/a.ts (0 errors) ==== + class d { + } \ No newline at end of file diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js new file mode 100644 index 00000000000..34d9c95a005 --- /dev/null +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts] //// + +//// [out.d.ts] + +declare class c { +} + +//// [a.ts] +class d { +} + +//// [out.js] +var d = (function () { + function d() { + } + return d; +})(); diff --git a/tests/cases/compiler/declarationFileOverwriteError.ts b/tests/cases/compiler/declarationFileOverwriteError.ts new file mode 100644 index 00000000000..b7ecb654002 --- /dev/null +++ b/tests/cases/compiler/declarationFileOverwriteError.ts @@ -0,0 +1,9 @@ +// @declaration: true + +// @Filename: a.d.ts +declare class c { +} + +// @FileName: a.ts +class d { +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts b/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts new file mode 100644 index 00000000000..b43c9a8b2e0 --- /dev/null +++ b/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts @@ -0,0 +1,10 @@ +// @declaration: true +// @out: tests/cases/compiler/out.js + +// @Filename: out.d.ts +declare class c { +} + +// @FileName: a.ts +class d { +} \ No newline at end of file From 8f03d00dc0b7d80a16b4b2b3a5465b24583de4f1 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 16:27:13 -0700 Subject: [PATCH 60/89] Test cases to verify that declaration file is not emitted if any of the declaration file in program has error --- ...ithErrorsInInputDeclarationFile.errors.txt | 29 +++++++++++++++++++ ...eclFileWithErrorsInInputDeclarationFile.js | 21 ++++++++++++++ ...rsInInputDeclarationFileWithOut.errors.txt | 29 +++++++++++++++++++ ...WithErrorsInInputDeclarationFileWithOut.js | 21 ++++++++++++++ ...eclFileWithErrorsInInputDeclarationFile.ts | 15 ++++++++++ ...WithErrorsInInputDeclarationFileWithOut.ts | 16 ++++++++++ 6 files changed, 131 insertions(+) create mode 100644 tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.errors.txt create mode 100644 tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js create mode 100644 tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt create mode 100644 tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js create mode 100644 tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts create mode 100644 tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.errors.txt b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.errors.txt new file mode 100644 index 00000000000..97013301618 --- /dev/null +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/declFile.d.ts(3,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(4,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(6,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(8,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + +==== tests/cases/compiler/client.ts (0 errors) ==== + /// + var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + +==== tests/cases/compiler/declFile.d.ts (4 errors) ==== + + declare module M { + declare var x; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + declare function f(); + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + declare module N { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + declare class C { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + } + \ No newline at end of file diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js new file mode 100644 index 00000000000..e97312893ad --- /dev/null +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts] //// + +//// [declFile.d.ts] + +declare module M { + declare var x; + declare function f(); + + declare module N { } + + declare class C { } +} + +//// [client.ts] +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + + +//// [client.js] +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt new file mode 100644 index 00000000000..97013301618 --- /dev/null +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/declFile.d.ts(3,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(4,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(6,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(8,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + +==== tests/cases/compiler/client.ts (0 errors) ==== + /// + var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + +==== tests/cases/compiler/declFile.d.ts (4 errors) ==== + + declare module M { + declare var x; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + declare function f(); + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + declare module N { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + declare class C { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + } + \ No newline at end of file diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js new file mode 100644 index 00000000000..11dcc06380c --- /dev/null +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts] //// + +//// [declFile.d.ts] + +declare module M { + declare var x; + declare function f(); + + declare module N { } + + declare class C { } +} + +//// [client.ts] +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + + +//// [out.js] +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file diff --git a/tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts b/tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts new file mode 100644 index 00000000000..e7d3b592932 --- /dev/null +++ b/tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts @@ -0,0 +1,15 @@ +// @declaration: true + +// @Filename: declFile.d.ts +declare module M { + declare var x; + declare function f(); + + declare module N { } + + declare class C { } +} + +// @Filename: client.ts +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file diff --git a/tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts b/tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts new file mode 100644 index 00000000000..005b52d5bc9 --- /dev/null +++ b/tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts @@ -0,0 +1,16 @@ +// @declaration: true +// @out: out.js + +// @Filename: declFile.d.ts +declare module M { + declare var x; + declare function f(); + + declare module N { } + + declare class C { } +} + +// @Filename: client.ts +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file From 57362f60170528e269968023eab97fb962e43838 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 17:16:39 -0700 Subject: [PATCH 61/89] Some tests to cover transpilation of different syntax --- ...ationClassMethodContainingArrowFunction.js | 18 ++++++++++++++ ...ClassMethodContainingArrowFunction.symbols | 18 ++++++++++++++ ...onClassMethodContainingArrowFunction.types | 20 ++++++++++++++++ .../jsFileCompilationLetBeingRenamed.js | 13 ++++++++++ .../jsFileCompilationLetBeingRenamed.symbols | 14 +++++++++++ .../jsFileCompilationLetBeingRenamed.types | 18 ++++++++++++++ .../jsFileCompilationShortHandProperty.js | 20 ++++++++++++++++ ...jsFileCompilationShortHandProperty.symbols | 20 ++++++++++++++++ .../jsFileCompilationShortHandProperty.types | 24 +++++++++++++++++++ ...ationClassMethodContainingArrowFunction.ts | 9 +++++++ .../jsFileCompilationLetBeingRenamed.ts | 9 +++++++ .../jsFileCompilationShortHandProperty.ts | 12 ++++++++++ 12 files changed, 195 insertions(+) create mode 100644 tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.js create mode 100644 tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.symbols create mode 100644 tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types create mode 100644 tests/baselines/reference/jsFileCompilationLetBeingRenamed.js create mode 100644 tests/baselines/reference/jsFileCompilationLetBeingRenamed.symbols create mode 100644 tests/baselines/reference/jsFileCompilationLetBeingRenamed.types create mode 100644 tests/baselines/reference/jsFileCompilationShortHandProperty.js create mode 100644 tests/baselines/reference/jsFileCompilationShortHandProperty.symbols create mode 100644 tests/baselines/reference/jsFileCompilationShortHandProperty.types create mode 100644 tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts create mode 100644 tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts create mode 100644 tests/cases/compiler/jsFileCompilationShortHandProperty.ts diff --git a/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.js b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.js new file mode 100644 index 00000000000..836b39380ea --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.js @@ -0,0 +1,18 @@ +//// [a.js] + +class c { + method(a) { + let x = a => this.method(a); + } +} + +//// [out.js] +var c = (function () { + function c() { + } + c.prototype.method = function (a) { + var _this = this; + var x = function (a) { return _this.method(a); }; + }; + return c; +})(); diff --git a/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.symbols b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.symbols new file mode 100644 index 00000000000..8db5aa87a5b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/a.js === + +class c { +>c : Symbol(c, Decl(a.js, 0, 0)) + + method(a) { +>method : Symbol(method, Decl(a.js, 1, 9)) +>a : Symbol(a, Decl(a.js, 2, 11)) + + let x = a => this.method(a); +>x : Symbol(x, Decl(a.js, 3, 11)) +>a : Symbol(a, Decl(a.js, 3, 15)) +>this.method : Symbol(method, Decl(a.js, 1, 9)) +>this : Symbol(c, Decl(a.js, 0, 0)) +>method : Symbol(method, Decl(a.js, 1, 9)) +>a : Symbol(a, Decl(a.js, 3, 15)) + } +} diff --git a/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types new file mode 100644 index 00000000000..f429cc88516 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types @@ -0,0 +1,20 @@ +=== tests/cases/compiler/a.js === + +class c { +>c : c + + method(a) { +>method : (a: any) => void +>a : any + + let x = a => this.method(a); +>x : (a: any) => void +>a => this.method(a) : (a: any) => void +>a : any +>this.method(a) : void +>this.method : (a: any) => void +>this : this +>method : (a: any) => void +>a : any + } +} diff --git a/tests/baselines/reference/jsFileCompilationLetBeingRenamed.js b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.js new file mode 100644 index 00000000000..c9e16f35981 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.js @@ -0,0 +1,13 @@ +//// [a.js] + +function foo(a) { + for (let a = 0; a < 10; a++) { + // do something + } +} + +//// [out.js] +function foo(a) { + for (var a_1 = 0; a_1 < 10; a_1++) { + } +} diff --git a/tests/baselines/reference/jsFileCompilationLetBeingRenamed.symbols b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.symbols new file mode 100644 index 00000000000..6b0934c6591 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/a.js === + +function foo(a) { +>foo : Symbol(foo, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 1, 13)) + + for (let a = 0; a < 10; a++) { +>a : Symbol(a, Decl(a.js, 2, 12)) +>a : Symbol(a, Decl(a.js, 2, 12)) +>a : Symbol(a, Decl(a.js, 2, 12)) + + // do something + } +} diff --git a/tests/baselines/reference/jsFileCompilationLetBeingRenamed.types b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.types new file mode 100644 index 00000000000..094f59d2022 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/a.js === + +function foo(a) { +>foo : (a: any) => void +>a : any + + for (let a = 0; a < 10; a++) { +>a : number +>0 : number +>a < 10 : boolean +>a : number +>10 : number +>a++ : number +>a : number + + // do something + } +} diff --git a/tests/baselines/reference/jsFileCompilationShortHandProperty.js b/tests/baselines/reference/jsFileCompilationShortHandProperty.js new file mode 100644 index 00000000000..1dc269146a6 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationShortHandProperty.js @@ -0,0 +1,20 @@ +//// [a.js] + +function foo() { + var a = 10; + var b = "Hello"; + return { + a, + b + }; +} + +//// [out.js] +function foo() { + var a = 10; + var b = "Hello"; + return { + a: a, + b: b + }; +} diff --git a/tests/baselines/reference/jsFileCompilationShortHandProperty.symbols b/tests/baselines/reference/jsFileCompilationShortHandProperty.symbols new file mode 100644 index 00000000000..fb42d121c80 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationShortHandProperty.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/a.js === + +function foo() { +>foo : Symbol(foo, Decl(a.js, 0, 0)) + + var a = 10; +>a : Symbol(a, Decl(a.js, 2, 7)) + + var b = "Hello"; +>b : Symbol(b, Decl(a.js, 3, 7)) + + return { + a, +>a : Symbol(a, Decl(a.js, 4, 12)) + + b +>b : Symbol(b, Decl(a.js, 5, 10)) + + }; +} diff --git a/tests/baselines/reference/jsFileCompilationShortHandProperty.types b/tests/baselines/reference/jsFileCompilationShortHandProperty.types new file mode 100644 index 00000000000..e4dd1755ceb --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationShortHandProperty.types @@ -0,0 +1,24 @@ +=== tests/cases/compiler/a.js === + +function foo() { +>foo : () => { a: number; b: string; } + + var a = 10; +>a : number +>10 : number + + var b = "Hello"; +>b : string +>"Hello" : string + + return { +>{ a, b } : { a: number; b: string; } + + a, +>a : number + + b +>b : string + + }; +} diff --git a/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts b/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts new file mode 100644 index 00000000000..225d73324c7 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts @@ -0,0 +1,9 @@ +// @jsExtensions: js +// @out: out.js + +// @FileName: a.js +class c { + method(a) { + let x = a => this.method(a); + } +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts b/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts new file mode 100644 index 00000000000..6206ee8901b --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts @@ -0,0 +1,9 @@ +// @jsExtensions: js +// @out: out.js + +// @FileName: a.js +function foo(a) { + for (let a = 0; a < 10; a++) { + // do something + } +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationShortHandProperty.ts b/tests/cases/compiler/jsFileCompilationShortHandProperty.ts new file mode 100644 index 00000000000..13871de60d8 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationShortHandProperty.ts @@ -0,0 +1,12 @@ +// @jsExtensions: js +// @out: out.js + +// @FileName: a.js +function foo() { + var a = 10; + var b = "Hello"; + return { + a, + b + }; +} \ No newline at end of file From ba3d34f9df88f828bfd3a5eef56c62a0e3127769 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 14:02:46 -0700 Subject: [PATCH 62/89] Instead of --jsExtensions support --allowJs with .js and .jsx as supported extensions --- src/compiler/commandLineParser.ts | 8 +++----- src/compiler/core.ts | 4 +++- src/compiler/diagnosticMessages.json | 10 +--------- src/compiler/program.ts | 2 +- src/compiler/types.ts | 2 +- src/services/services.ts | 4 ++-- 6 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 16d7c8c3d93..8bc95d4e31b 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -249,11 +249,9 @@ namespace ts { error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic, }, { - name: "jsExtensions", - type: "string[]", - description: Diagnostics.Specifies_extensions_to_treat_as_javascript_file_To_specify_multiple_extensions_either_use_this_option_multiple_times_or_provide_comma_separated_list, - paramType: Diagnostics.EXTENSION_S, - error: Diagnostics.Argument_for_jsExtensions_option_must_be_either_extension_or_comma_separated_list_of_extensions, + name: "allowJs", + type: "boolean", + description: Diagnostics.Allow_javascript_files_to_be_compiled, } ]; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index de9a93ee679..bb07062ec57 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -729,9 +729,11 @@ namespace ts { * List of supported extensions in order of file resolution precedence. */ export const supportedTypeScriptExtensions = ["ts", "tsx", "d.ts"]; + export const supportedJavascriptExtensions = ["js", "jsx"]; + export const supportedExtensionsWhenAllowedJs = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); export function getSupportedExtensions(options?: CompilerOptions): string[] { - return options && options.jsExtensions ? supportedTypeScriptExtensions.concat(options.jsExtensions) : supportedTypeScriptExtensions; + return options && options.allowJs ? supportedExtensionsWhenAllowedJs : supportedTypeScriptExtensions; } export function isSupportedSourceFileName(fileName: string, compilerOptions?: CompilerOptions) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 12441058603..8998294732a 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2181,10 +2181,6 @@ "category": "Message", "code": 6038 }, - "EXTENSION[S]": { - "category": "Message", - "code": 6039 - }, "Compilation complete. Watching for file changes.": { "category": "Message", "code": 6042 @@ -2269,10 +2265,6 @@ "category": "Error", "code": 6063 }, - "Argument for '--jsExtensions' option must be either extension or comma separated list of extensions.": { - "category": "Error", - "code": 6064 - }, "Specify JSX code generation: 'preserve' or 'react'": { "category": "Message", @@ -2310,7 +2302,7 @@ "category": "Message", "code": 6072 }, - "Specifies extensions to treat as javascript file. To specify multiple extensions, either use this option multiple times or provide comma separated list.": { + "Allow javascript files to be compiled.": { "category": "Message", "code": 6073 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 87ca7fb2a44..ccb2d2c346e 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -359,7 +359,7 @@ namespace ts { (oldOptions.target !== options.target) || (oldOptions.noLib !== options.noLib) || (oldOptions.jsx !== options.jsx) || - (oldOptions.jsExtensions !== options.jsExtensions)) { + (oldOptions.allowJs !== options.allowJs)) { oldProgram = undefined; } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index b5451c3311d..15caa8b529c 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2089,7 +2089,7 @@ namespace ts { experimentalDecorators?: boolean; emitDecoratorMetadata?: boolean; moduleResolution?: ModuleResolutionKind; - jsExtensions?: string[]; + allowJs?: boolean; /* @internal */ stripInternal?: boolean; // Skip checking lib.d.ts to help speed up tests. diff --git a/src/services/services.ts b/src/services/services.ts index 05295529f71..dce341cc035 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2002,7 +2002,7 @@ namespace ts { let getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); function getKeyFromCompilationSettings(settings: CompilerOptions): string { - return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + +"|" + settings.jsExtensions; + return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + +"|" + settings.allowJs; } function getBucketForCompilationSettings(settings: CompilerOptions, createIfMissing: boolean): FileMap { @@ -2633,7 +2633,7 @@ namespace ts { oldSettings.module !== newSettings.module || oldSettings.noResolve !== newSettings.noResolve || oldSettings.jsx !== newSettings.jsx || - oldSettings.jsExtensions !== newSettings.jsExtensions); + oldSettings.allowJs !== newSettings.allowJs); // Now create a new compiler let compilerHost: CompilerHost = { From 382b86bd2c4feb423396920c0dc705d22d9dbdf1 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 13:56:47 -0700 Subject: [PATCH 63/89] Test update for using allowJs instead of --jsExtensions --- ...CompilationDifferentNamesNotSpecifiedWithAllowJs.json} | 6 +++--- .../amd/test.d.ts | 0 .../amd/test.js | 0 ...CompilationDifferentNamesNotSpecifiedWithAllowJs.json} | 6 +++--- .../node/test.d.ts | 0 .../node/test.js | 0 ...ileCompilationDifferentNamesSpecifiedWithAllowJs.json} | 6 +++--- .../amd/test.d.ts | 0 .../amd/test.js | 0 ...ileCompilationDifferentNamesSpecifiedWithAllowJs.json} | 6 +++--- .../node/test.d.ts | 0 .../node/test.js | 0 ...jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json} | 4 ++-- ...jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json} | 4 ++-- ...ileCompilationSameNameDtsNotSpecifiedWithAllowJs.json} | 4 ++-- ...ileCompilationSameNameDtsNotSpecifiedWithAllowJs.json} | 4 ++-- .../amd/SameNameFilesNotSpecifiedWithAllowJs}/a.d.ts | 0 .../amd/SameNameFilesNotSpecifiedWithAllowJs}/a.js | 0 ...eCompilationSameNameFilesNotSpecifiedWithAllowJs.json} | 8 ++++---- .../node/SameNameFilesNotSpecifiedWithAllowJs}/a.d.ts | 0 .../node/SameNameFilesNotSpecifiedWithAllowJs}/a.js | 0 ...eCompilationSameNameFilesNotSpecifiedWithAllowJs.json} | 8 ++++---- .../amd/SameNameTsSpecifiedWithAllowJs}/a.d.ts | 0 .../amd/SameNameTsSpecifiedWithAllowJs}/a.js | 0 ...FileCompilationSameNameFilesSpecifiedWithAllowJs.json} | 8 ++++---- .../node/SameNameTsSpecifiedWithAllowJs}/a.d.ts | 0 .../node/SameNameTsSpecifiedWithAllowJs}/a.js | 0 ...FileCompilationSameNameFilesSpecifiedWithAllowJs.json} | 8 ++++---- .../jsFileCompilationAmbientVarDeclarationSyntax.ts | 2 +- ...jsFileCompilationClassMethodContainingArrowFunction.ts | 2 +- tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts | 2 +- .../jsFileCompilationDuplicateFunctionImplementation.ts | 2 +- ...ionDuplicateFunctionImplementationFileOrderReversed.ts | 2 +- .../cases/compiler/jsFileCompilationDuplicateVariable.ts | 2 +- .../jsFileCompilationDuplicateVariableErrorReported.ts | 2 +- .../compiler/jsFileCompilationEmitBlockedCorrectly.ts | 2 +- tests/cases/compiler/jsFileCompilationEmitDeclarations.ts | 2 +- .../jsFileCompilationEmitTrippleSlashReference.ts | 2 +- tests/cases/compiler/jsFileCompilationEnumSyntax.ts | 2 +- ...tionErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts | 2 +- ...lationErrorOnDeclarationsWithJsFileReferenceWithOut.ts | 2 +- .../compiler/jsFileCompilationExportAssignmentSyntax.ts | 2 +- .../jsFileCompilationHeritageClauseSyntaxOfClass.ts | 2 +- .../cases/compiler/jsFileCompilationImportEqualsSyntax.ts | 2 +- tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts | 2 +- tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts | 2 +- .../compiler/jsFileCompilationLetDeclarationOrder.ts | 2 +- .../compiler/jsFileCompilationLetDeclarationOrder2.ts | 2 +- tests/cases/compiler/jsFileCompilationModuleSyntax.ts | 2 +- ...rrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts | 2 +- ...oErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts | 2 +- .../cases/compiler/jsFileCompilationOptionalParameter.ts | 2 +- .../compiler/jsFileCompilationPropertySyntaxOfClass.ts | 2 +- .../jsFileCompilationPublicMethodSyntaxOfClass.ts | 2 +- .../compiler/jsFileCompilationPublicParameterModifier.ts | 2 +- tests/cases/compiler/jsFileCompilationRestParameter.ts | 2 +- .../jsFileCompilationReturnTypeSyntaxOfFunction.ts | 2 +- .../cases/compiler/jsFileCompilationShortHandProperty.ts | 2 +- tests/cases/compiler/jsFileCompilationSyntaxError.ts | 2 +- tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts | 2 +- .../compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts | 2 +- tests/cases/compiler/jsFileCompilationTypeAssertions.ts | 2 +- tests/cases/compiler/jsFileCompilationTypeOfParameter.ts | 2 +- .../jsFileCompilationTypeParameterSyntaxOfClass.ts | 2 +- .../jsFileCompilationTypeParameterSyntaxOfFunction.ts | 2 +- tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts | 2 +- .../jsFileCompilationWithJsEmitPathSameAsInput.ts | 2 +- tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts | 2 +- ...jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts | 2 +- .../jsFileCompilationWithMapFileAsJsWithOutDir.ts | 2 +- tests/cases/compiler/jsFileCompilationWithOut.ts | 2 +- .../jsFileCompilationWithOutFileNameSameAsInputJsFile.ts | 2 +- tests/cases/compiler/jsFileCompilationWithoutOut.ts | 2 +- .../compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts | 2 +- .../jsFileCompilationDuplicateFunctionImplementation.ts | 2 +- ...CompilationDifferentNamesNotSpecifiedWithAllowJs.json} | 2 +- ...ileCompilationDifferentNamesSpecifiedWithAllowJs.json} | 2 +- ...jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json} | 2 +- ...ileCompilationSameNameDtsNotSpecifiedWithAllowJs.json} | 2 +- ...eCompilationSameNameFilesNotSpecifiedWithAllowJs.json} | 2 +- ...FileCompilationSameNameFilesSpecifiedWithAllowJs.json} | 2 +- .../a.ts | 0 .../b.js | 0 .../tsconfig.json | 2 +- .../a.ts | 0 .../b.js | 0 .../tsconfig.json | 2 +- .../a.d.ts | 0 .../a.js | 0 .../SameNameDTsNotSpecifiedWithAllowJs/tsconfig.json | 1 + .../SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json | 1 - .../a.d.ts | 0 .../a.js | 0 .../SameNameDTsSpecifiedWithAllowJs/tsconfig.json | 4 ++++ .../SameNameDTsSpecifiedWithJsExtensions/tsconfig.json | 4 ---- .../a.js | 0 .../a.ts | 0 .../SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json | 1 + .../tsconfig.json | 1 - .../a.js | 0 .../a.ts | 0 .../SameNameTsSpecifiedWithAllowJs/tsconfig.json | 4 ++++ .../SameNameTsSpecifiedWithJsExtensions/tsconfig.json | 4 ---- 103 files changed, 101 insertions(+), 101 deletions(-) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json => jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json} (68%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions => jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs}/amd/test.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions => jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs}/amd/test.js (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json => jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json} (68%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions => jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs}/node/test.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions => jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs}/node/test.js (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json => jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json} (68%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesSpecifiedWithJsExtensions => jsFileCompilationDifferentNamesSpecifiedWithAllowJs}/amd/test.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesSpecifiedWithJsExtensions => jsFileCompilationDifferentNamesSpecifiedWithAllowJs}/amd/test.js (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json => jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json} (68%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesSpecifiedWithJsExtensions => jsFileCompilationDifferentNamesSpecifiedWithAllowJs}/node/test.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationDifferentNamesSpecifiedWithJsExtensions => jsFileCompilationDifferentNamesSpecifiedWithAllowJs}/node/test.js (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json => jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json} (75%) rename tests/baselines/reference/project/{jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json => jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json} (75%) rename tests/baselines/reference/project/{jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json => jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json} (74%) rename tests/baselines/reference/project/{jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json => jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json} (74%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions => jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs}/a.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions => jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs}/a.js (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json => jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json} (59%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions => jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs}/a.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions => jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs}/a.js (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json => jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json} (59%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions => jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs}/a.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions => jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs}/a.js (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json => jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json} (62%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions => jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs}/a.d.ts (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions => jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs}/a.js (100%) rename tests/baselines/reference/project/{jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json => jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json} (62%) rename tests/cases/project/{jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json => jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json} (81%) rename tests/cases/project/{jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json => jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json} (81%) rename tests/cases/project/{jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json => jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json} (83%) rename tests/cases/project/{jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json => jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json} (82%) rename tests/cases/project/{jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json => jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json} (81%) rename tests/cases/project/{jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json => jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json} (83%) rename tests/cases/projects/jsFileCompilation/{DifferentNamesNotSpecifiedWithJsExtensions => DifferentNamesNotSpecifiedWithAllowJs}/a.ts (100%) rename tests/cases/projects/jsFileCompilation/{DifferentNamesNotSpecifiedWithJsExtensions => DifferentNamesNotSpecifiedWithAllowJs}/b.js (100%) rename tests/cases/projects/jsFileCompilation/{DifferentNamesNotSpecifiedWithJsExtensions => DifferentNamesNotSpecifiedWithAllowJs}/tsconfig.json (59%) rename tests/cases/projects/jsFileCompilation/{DifferentNamesSpecifiedWithJsExtensions => DifferentNamesSpecifiedWithAllowJs}/a.ts (100%) rename tests/cases/projects/jsFileCompilation/{DifferentNamesSpecifiedWithJsExtensions => DifferentNamesSpecifiedWithAllowJs}/b.js (100%) rename tests/cases/projects/jsFileCompilation/{DifferentNamesSpecifiedWithJsExtensions => DifferentNamesSpecifiedWithAllowJs}/tsconfig.json (69%) rename tests/cases/projects/jsFileCompilation/{SameNameDTsNotSpecifiedWithJsExtensions => SameNameDTsNotSpecifiedWithAllowJs}/a.d.ts (100%) rename tests/cases/projects/jsFileCompilation/{SameNameDTsNotSpecifiedWithJsExtensions => SameNameDTsNotSpecifiedWithAllowJs}/a.js (100%) create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/tsconfig.json delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json rename tests/cases/projects/jsFileCompilation/{SameNameDTsSpecifiedWithJsExtensions => SameNameDTsSpecifiedWithAllowJs}/a.d.ts (100%) rename tests/cases/projects/jsFileCompilation/{SameNameDTsSpecifiedWithJsExtensions => SameNameDTsSpecifiedWithAllowJs}/a.js (100%) create mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/tsconfig.json delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/tsconfig.json rename tests/cases/projects/jsFileCompilation/{SameNameFilesNotSpecifiedWithJsExtensions => SameNameFilesNotSpecifiedWithAllowJs}/a.js (100%) rename tests/cases/projects/jsFileCompilation/{SameNameFilesNotSpecifiedWithJsExtensions => SameNameFilesNotSpecifiedWithAllowJs}/a.ts (100%) create mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/tsconfig.json rename tests/cases/projects/jsFileCompilation/{SameNameTsSpecifiedWithJsExtensions => SameNameTsSpecifiedWithAllowJs}/a.js (100%) rename tests/cases/projects/jsFileCompilation/{SameNameTsSpecifiedWithJsExtensions => SameNameTsSpecifiedWithAllowJs}/a.ts (100%) create mode 100644 tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/tsconfig.json delete mode 100644 tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/tsconfig.json diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json similarity index 68% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json index eb3813ca142..4487623500b 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json @@ -3,11 +3,11 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesNotSpecifiedWithJsExtensions", + "project": "DifferentNamesNotSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesNotSpecifiedWithJsExtensions/a.ts", - "DifferentNamesNotSpecifiedWithJsExtensions/b.js" + "DifferentNamesNotSpecifiedWithAllowJs/a.ts", + "DifferentNamesNotSpecifiedWithAllowJs/b.js" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.d.ts rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/amd/test.js rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.js diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json similarity index 68% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json index eb3813ca142..4487623500b 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json @@ -3,11 +3,11 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesNotSpecifiedWithJsExtensions", + "project": "DifferentNamesNotSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesNotSpecifiedWithJsExtensions/a.ts", - "DifferentNamesNotSpecifiedWithJsExtensions/b.js" + "DifferentNamesNotSpecifiedWithAllowJs/a.ts", + "DifferentNamesNotSpecifiedWithAllowJs/b.js" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.d.ts rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions/node/test.js rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.js diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json similarity index 68% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json index 6c58345617a..e77cc5ad6bd 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json @@ -3,11 +3,11 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesSpecifiedWithJsExtensions", + "project": "DifferentNamesSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesSpecifiedWithJsExtensions/a.ts", - "DifferentNamesSpecifiedWithJsExtensions/b.js" + "DifferentNamesSpecifiedWithAllowJs/a.ts", + "DifferentNamesSpecifiedWithAllowJs/b.js" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.d.ts rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/amd/test.js rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.js diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json similarity index 68% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json index 6c58345617a..e77cc5ad6bd 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json @@ -3,11 +3,11 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesSpecifiedWithJsExtensions", + "project": "DifferentNamesSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "DifferentNamesSpecifiedWithJsExtensions/a.ts", - "DifferentNamesSpecifiedWithJsExtensions/b.js" + "DifferentNamesSpecifiedWithAllowJs/a.ts", + "DifferentNamesSpecifiedWithAllowJs/b.js" ], "emittedFiles": [ "test.js", diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.d.ts rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions/node/test.js rename to tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.js diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json similarity index 75% rename from tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json index 867227ec4e3..27ec20feb8d 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json @@ -3,10 +3,10 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsSpecifiedWithJsExtensions", + "project": "SameNameDTsSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameDTsSpecifiedWithJsExtensions/a.d.ts" + "SameNameDTsSpecifiedWithAllowJs/a.d.ts" ], "emittedFiles": [] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json similarity index 75% rename from tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json index 867227ec4e3..27ec20feb8d 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json @@ -3,10 +3,10 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsSpecifiedWithJsExtensions", + "project": "SameNameDTsSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameDTsSpecifiedWithJsExtensions/a.d.ts" + "SameNameDTsSpecifiedWithAllowJs/a.d.ts" ], "emittedFiles": [] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json similarity index 74% rename from tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json index ffdfdf24e39..77e1f227030 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json @@ -3,10 +3,10 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsNotSpecifiedWithJsExtensions", + "project": "SameNameDTsNotSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts" + "SameNameDTsNotSpecifiedWithAllowJs/a.d.ts" ], "emittedFiles": [] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json similarity index 74% rename from tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json index ffdfdf24e39..77e1f227030 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json @@ -3,10 +3,10 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsNotSpecifiedWithJsExtensions", + "project": "SameNameDTsNotSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts" + "SameNameDTsNotSpecifiedWithAllowJs/a.d.ts" ], "emittedFiles": [] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/SameNameFilesNotSpecifiedWithJsExtensions/a.js rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.js diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json similarity index 59% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json index 93fee268825..34d6768372f 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json @@ -3,13 +3,13 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameFilesNotSpecifiedWithJsExtensions", + "project": "SameNameFilesNotSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameFilesNotSpecifiedWithJsExtensions/a.ts" + "SameNameFilesNotSpecifiedWithAllowJs/a.ts" ], "emittedFiles": [ - "SameNameFilesNotSpecifiedWithJsExtensions/a.js", - "SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts" + "SameNameFilesNotSpecifiedWithAllowJs/a.js", + "SameNameFilesNotSpecifiedWithAllowJs/a.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/SameNameFilesNotSpecifiedWithJsExtensions/a.js rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.js diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json similarity index 59% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json index 93fee268825..34d6768372f 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json @@ -3,13 +3,13 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameFilesNotSpecifiedWithJsExtensions", + "project": "SameNameFilesNotSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameFilesNotSpecifiedWithJsExtensions/a.ts" + "SameNameFilesNotSpecifiedWithAllowJs/a.ts" ], "emittedFiles": [ - "SameNameFilesNotSpecifiedWithJsExtensions/a.js", - "SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts" + "SameNameFilesNotSpecifiedWithAllowJs/a.js", + "SameNameFilesNotSpecifiedWithAllowJs/a.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.d.ts rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/SameNameTsSpecifiedWithJsExtensions/a.js rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.js diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json similarity index 62% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json index 0adbe74627f..ae68fac44bd 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/amd/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json @@ -3,13 +3,13 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameTsSpecifiedWithJsExtensions", + "project": "SameNameTsSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameTsSpecifiedWithJsExtensions/a.ts" + "SameNameTsSpecifiedWithAllowJs/a.ts" ], "emittedFiles": [ - "SameNameTsSpecifiedWithJsExtensions/a.js", - "SameNameTsSpecifiedWithJsExtensions/a.d.ts" + "SameNameTsSpecifiedWithAllowJs/a.js", + "SameNameTsSpecifiedWithAllowJs/a.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.d.ts similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.d.ts rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.d.ts diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.js similarity index 100% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/SameNameTsSpecifiedWithJsExtensions/a.js rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.js diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json similarity index 62% rename from tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json rename to tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json index 0adbe74627f..ae68fac44bd 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions/node/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json @@ -3,13 +3,13 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameTsSpecifiedWithJsExtensions", + "project": "SameNameTsSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameTsSpecifiedWithJsExtensions/a.ts" + "SameNameTsSpecifiedWithAllowJs/a.ts" ], "emittedFiles": [ - "SameNameTsSpecifiedWithJsExtensions/a.js", - "SameNameTsSpecifiedWithJsExtensions/a.d.ts" + "SameNameTsSpecifiedWithAllowJs/a.js", + "SameNameTsSpecifiedWithAllowJs/a.d.ts" ] } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts b/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts index 6cb565e4c9f..2654dddf2bc 100644 --- a/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js declare var v; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts b/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts index 225d73324c7..50adc50388d 100644 --- a/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts +++ b/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @FileName: a.js diff --git a/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts b/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts index 1dd1cf453f2..2ef95db01fe 100644 --- a/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js @internal class C { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts index 1cc61edaf32..8517c9dbf8e 100644 --- a/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts +++ b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: b.js diff --git a/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts index af1d842d9b2..a02b7d9d88a 100644 --- a/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts +++ b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts b/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts index f3f69ee5ec3..cf2e27de885 100644 --- a/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts +++ b/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts b/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts index 77db6222a92..05b750fe608 100644 --- a/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts +++ b/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: b.js diff --git a/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts b/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts index 80f9358fb7f..55f1d0ad933 100644 --- a/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts +++ b/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.ts class c { } diff --git a/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts b/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts index 5e670172c15..9d6daeac6fa 100644 --- a/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts +++ b/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts b/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts index 2ac1ea3ba51..8d41ac2ef13 100644 --- a/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts +++ b/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationEnumSyntax.ts b/tests/cases/compiler/jsFileCompilationEnumSyntax.ts index 5a466ef5765..1c607d09cb6 100644 --- a/tests/cases/compiler/jsFileCompilationEnumSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationEnumSyntax.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js enum E { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts index 0b5545741b2..41d87d5f39b 100644 --- a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @declaration: true // @filename: a.ts class c { diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts index 22d9e3c269e..35228678bb7 100644 --- a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts b/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts index cea0dfe700d..c6fced0e2d3 100644 --- a/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js export = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts index bfebbfd9966..5e8587bb252 100644 --- a/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts +++ b/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js class C implements D { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts b/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts index 3c102270196..e7a38914931 100644 --- a/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js import a = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts b/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts index 172bf01b803..205e06395ac 100644 --- a/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js interface I { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts b/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts index 6206ee8901b..177b0f55e27 100644 --- a/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts +++ b/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @FileName: a.js diff --git a/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts index d3e342a2d4b..962267c5cab 100644 --- a/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts +++ b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: b.js diff --git a/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts index c71d87ac9d9..8f89c57ade2 100644 --- a/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts +++ b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @declaration: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationModuleSyntax.ts b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts index c9762553028..f7d1a9070f6 100644 --- a/tests/cases/compiler/jsFileCompilationModuleSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js module M { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts index c089979ecbc..111645d995e 100644 --- a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts +++ b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.ts class c { } diff --git a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts index 83c752f7292..8783b722f2a 100644 --- a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts +++ b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @filename: a.ts class c { diff --git a/tests/cases/compiler/jsFileCompilationOptionalParameter.ts b/tests/cases/compiler/jsFileCompilationOptionalParameter.ts index 962c7321475..541ff041c2a 100644 --- a/tests/cases/compiler/jsFileCompilationOptionalParameter.ts +++ b/tests/cases/compiler/jsFileCompilationOptionalParameter.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js function F(p?) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts index 24a0f2389dd..62a0058bcef 100644 --- a/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts +++ b/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js class C { v } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts index 8c678eed588..2016d4afdbd 100644 --- a/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts +++ b/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js class C { public foo() { diff --git a/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts b/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts index 8594e011d3c..0c17ea98ccc 100644 --- a/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts +++ b/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js class C { constructor(public x) { }} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationRestParameter.ts b/tests/cases/compiler/jsFileCompilationRestParameter.ts index 22ccf24bae3..560fc1ebd1a 100644 --- a/tests/cases/compiler/jsFileCompilationRestParameter.ts +++ b/tests/cases/compiler/jsFileCompilationRestParameter.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js // @target: es6 // @out: b.js diff --git a/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts b/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts index 183ace7ce10..8e9412d489a 100644 --- a/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts +++ b/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js function F(): number { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationShortHandProperty.ts b/tests/cases/compiler/jsFileCompilationShortHandProperty.ts index 13871de60d8..476658e0fa1 100644 --- a/tests/cases/compiler/jsFileCompilationShortHandProperty.ts +++ b/tests/cases/compiler/jsFileCompilationShortHandProperty.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @FileName: a.js diff --git a/tests/cases/compiler/jsFileCompilationSyntaxError.ts b/tests/cases/compiler/jsFileCompilationSyntaxError.ts index d6f10ce47c4..4d17d6d3aae 100644 --- a/tests/cases/compiler/jsFileCompilationSyntaxError.ts +++ b/tests/cases/compiler/jsFileCompilationSyntaxError.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js /** * @type {number} diff --git a/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts b/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts index d77d35c011a..d849ca5ea4b 100644 --- a/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js type a = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts b/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts index e2aca1007b2..a5bcdae904b 100644 --- a/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts +++ b/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js Foo(); \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeAssertions.ts b/tests/cases/compiler/jsFileCompilationTypeAssertions.ts index 45f76c78bfb..15f39b36d01 100644 --- a/tests/cases/compiler/jsFileCompilationTypeAssertions.ts +++ b/tests/cases/compiler/jsFileCompilationTypeAssertions.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js var v = undefined; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts b/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts index a989a8e2a30..d9e42c264da 100644 --- a/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts +++ b/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js function F(a: number) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts index 5242a2f7e7a..d0aa85f5993 100644 --- a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts +++ b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js class C { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts index a6f27b787eb..19a567fbdb5 100644 --- a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts +++ b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js function F() { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts b/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts index 1e2641dd8d1..14085ea9dfb 100644 --- a/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts +++ b/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts @@ -1,3 +1,3 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.js var v: () => number; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts b/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts index 27082e9a930..82dba88f785 100644 --- a/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts +++ b/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.ts class c { } diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts index 6db2ffa3dc6..4008204cd66 100644 --- a/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js,map +// @allowJs: true // @sourcemap: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts index 9c209ad1b95..ae510f9eec3 100644 --- a/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js,map +// @allowJs: true // @inlineSourceMap: true // @filename: a.ts diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts index 18b30bd5910..9e39ae274b4 100644 --- a/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js,map +// @allowJs: true,map // @sourcemap: true // @outdir: out diff --git a/tests/cases/compiler/jsFileCompilationWithOut.ts b/tests/cases/compiler/jsFileCompilationWithOut.ts index 595cba8ffd3..f76605b7fe6 100644 --- a/tests/cases/compiler/jsFileCompilationWithOut.ts +++ b/tests/cases/compiler/jsFileCompilationWithOut.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: out.js // @filename: a.ts class c { diff --git a/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts index ce97a6635c5..16410244004 100644 --- a/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts +++ b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @out: tests/cases/compiler/b.js // @filename: a.ts class c { diff --git a/tests/cases/compiler/jsFileCompilationWithoutOut.ts b/tests/cases/compiler/jsFileCompilationWithoutOut.ts index 6cc6c7b50b1..667315a55a9 100644 --- a/tests/cases/compiler/jsFileCompilationWithoutOut.ts +++ b/tests/cases/compiler/jsFileCompilationWithoutOut.ts @@ -1,4 +1,4 @@ -// @jsExtensions: js +// @allowJs: true // @filename: a.ts class c { } diff --git a/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts b/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts index 138b4de6f46..07f6316e4dd 100644 --- a/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts +++ b/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts @@ -1,7 +1,7 @@ /// // @BaselineFile: compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline -// @jsExtensions: js +// @allowJs: true // @Filename: b.js // @emitThisFile: true ////function foo() { } // This has error because js file cannot be overwritten - emitSkipped should be true diff --git a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts index 6ac9defb7d5..f94e15aee62 100644 --- a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts +++ b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts @@ -2,7 +2,7 @@ // @declaration: true // @out: out.js -// @jsExtensions: js +// @allowJs: true // @Filename: b.js // @emitThisFile: true ////function foo() { return 10; }/*1*/ diff --git a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json similarity index 81% rename from tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json rename to tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json index 50cd978a712..c25902b499e 100644 --- a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithJsExtensions.json +++ b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json @@ -3,5 +3,5 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesNotSpecifiedWithJsExtensions" + "project": "DifferentNamesNotSpecifiedWithAllowJs" } \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json similarity index 81% rename from tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json rename to tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json index a15686497c5..7e48c8b32d1 100644 --- a/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithJsExtensions.json +++ b/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json @@ -3,5 +3,5 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "DifferentNamesSpecifiedWithJsExtensions" + "project": "DifferentNamesSpecifiedWithAllowJs" } \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json similarity index 83% rename from tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json rename to tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json index f0341ee905f..9990f37cbd6 100644 --- a/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json +++ b/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json @@ -3,5 +3,5 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsSpecifiedWithJsExtensions" + "project": "SameNameDTsSpecifiedWithAllowJs" } \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json similarity index 82% rename from tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json rename to tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json index 4ce47779ea4..b96d4e758ff 100644 --- a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json +++ b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json @@ -3,5 +3,5 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameDTsNotSpecifiedWithJsExtensions" + "project": "SameNameDTsNotSpecifiedWithAllowJs" } \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json similarity index 81% rename from tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json rename to tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json index d151f7d499f..badca871288 100644 --- a/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json +++ b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json @@ -3,5 +3,5 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameFilesNotSpecifiedWithJsExtensions" + "project": "SameNameFilesNotSpecifiedWithAllowJs" } \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json b/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json similarity index 83% rename from tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json rename to tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json index da24d83de84..d3176d3f607 100644 --- a/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithJsExtensions.json +++ b/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json @@ -3,5 +3,5 @@ "projectRoot": "tests/cases/projects/jsFileCompilation", "baselineCheck": true, "declaration": true, - "project": "SameNameTsSpecifiedWithJsExtensions" + "project": "SameNameTsSpecifiedWithAllowJs" } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/a.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/a.ts rename to tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/a.ts diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/b.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/b.js rename to tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/b.js diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/tsconfig.json similarity index 59% rename from tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/tsconfig.json rename to tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/tsconfig.json index b3fb530a291..167eaebec3a 100644 --- a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/tsconfig.json +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { "out": "test.js", - "jsExtensions": [ "js" ] + "allowJs": true } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/a.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/a.ts rename to tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/a.ts diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/b.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/b.js rename to tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/b.js diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/tsconfig.json similarity index 69% rename from tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/tsconfig.json rename to tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/tsconfig.json index f52029d734e..1a5a6f6189f 100644 --- a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithJsExtensions/tsconfig.json +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "out": "test.js", - "jsExtensions": [ "js" ] + "allowJs": true }, "files": [ "a.ts", "b.js" ] } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.d.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts rename to tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.d.ts diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/a.js rename to tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.js diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 00000000000..05e6c95dddf --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "allowJs": true } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json deleted file mode 100644 index e14243307e2..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithJsExtensions/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -{ "compilerOptions": { "jsExtensions": [ "js" ] } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.d.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.d.ts rename to tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.d.ts diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/a.js rename to tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.js diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 00000000000..44fcccf5b22 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { "allowJs": true }, + "files": [ "a.d.ts" ] +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/tsconfig.json deleted file mode 100644 index de14c20c662..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithJsExtensions/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "compilerOptions": { "jsExtensions": [ "js" ] }, - "files": [ "a.d.ts" ] -} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.js b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.js rename to tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.js diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.ts b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/a.ts rename to tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.ts diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 00000000000..05e6c95dddf --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "allowJs": true } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/tsconfig.json deleted file mode 100644 index e14243307e2..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithJsExtensions/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -{ "compilerOptions": { "jsExtensions": [ "js" ] } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.js b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.js similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.js rename to tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.js diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.ts b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.ts similarity index 100% rename from tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/a.ts rename to tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.ts diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 00000000000..cbc35e9b9db --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { "allowJs": true }, + "files": [ "a.ts" ] +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/tsconfig.json deleted file mode 100644 index 8f3028a8ad1..00000000000 --- a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithJsExtensions/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "compilerOptions": { "jsExtensions": [ "js" ] }, - "files": [ "a.ts" ] -} \ No newline at end of file From ea57efa430f06c3ee439af4a7dd011897ac9cc51 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 14:09:03 -0700 Subject: [PATCH 64/89] Test baseline update because .map cannot be a valid js file anymore --- ...sFileCompilationWithMapFileAsJs.errors.txt | 4 +- .../jsFileCompilationWithMapFileAsJs.js | 5 +- .../jsFileCompilationWithMapFileAsJs.js.map | 3 +- ...leCompilationWithMapFileAsJs.sourcemap.txt | 28 +--------- ...hMapFileAsJsWithInlineSourceMap.errors.txt | 2 + ...ationWithMapFileAsJsWithInlineSourceMap.js | 5 +- ...pFileAsJsWithInlineSourceMap.sourcemap.txt | 28 +--------- ...lationWithMapFileAsJsWithOutDir.errors.txt | 18 +++++++ ...ileCompilationWithMapFileAsJsWithOutDir.js | 8 +-- ...ompilationWithMapFileAsJsWithOutDir.js.map | 4 +- ...ionWithMapFileAsJsWithOutDir.sourcemap.txt | 54 +------------------ ...mpilationWithMapFileAsJsWithOutDir.symbols | 15 ------ ...CompilationWithMapFileAsJsWithOutDir.types | 15 ------ 13 files changed, 30 insertions(+), 159 deletions(-) create mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt delete mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.types diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt index 2fdce65a6ab..aaeb023dbdb 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. -error TS5055: Cannot write file 'tests/cases/compiler/b.js.map' which is one of the input files. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts', 'js', 'jsx'. !!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js.map' which is one of the input files. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts', 'js', 'jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js index ce13bf9d3f1..a5351de087c 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js @@ -19,7 +19,4 @@ var c = (function () { } return c; })(); -//# sourceMappingURL=a.js.map//// [b.js.js] -function foo() { -} -//# sourceMappingURL=b.js.js.map \ No newline at end of file +//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map index 54e54c5044a..8692bc0bab3 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map @@ -1,3 +1,2 @@ //// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":["c","c.constructor"],"mappings":"AACA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}//// [b.js.js.map] -{"version":3,"file":"b.js.js","sourceRoot":"","sources":["b.js.map"],"names":["foo"],"mappings":"AAAA;AACAA,CAACA"} \ No newline at end of file +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":["c","c.constructor"],"mappings":"AACA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt index edb8c428744..bba59e2b178 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt @@ -55,30 +55,4 @@ sourceFile:a.ts 3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) --- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js.js -mapUrl: b.js.js.map -sourceRoot: -sources: b.js.map -=================================================================== -------------------------------------------------------------------- -emittedFile:tests/cases/compiler/b.js.js -sourceFile:b.js.map -------------------------------------------------------------------- ->>>function foo() { -1 > -2 >^^-> -1 > -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) ---- ->>>} -1-> -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->function foo() { - > -2 >} -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) name (foo) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) name (foo) ---- ->>>//# sourceMappingURL=b.js.js.map \ No newline at end of file +>>>//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt index 35cc5dace16..aaeb023dbdb 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@ -1,7 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts', 'js', 'jsx'. !!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts', 'js', 'jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js index 2c9cc66836a..e89e5d61e42 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js @@ -19,7 +19,4 @@ var c = (function () { } return c; })(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOlsiYyIsImMuY29uc3RydWN0b3IiXSwibWFwcGluZ3MiOiJBQUNBO0lBQUFBO0lBQ0FDLENBQUNBO0lBQURELFFBQUNBO0FBQURBLENBQUNBLEFBREQsSUFDQyJ9//// [b.js.js] -function foo() { -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIuanMubWFwIl0sIm5hbWVzIjpbImZvbyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQUEsQ0FBQ0EifQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOlsiYyIsImMuY29uc3RydWN0b3IiXSwibWFwcGluZ3MiOiJBQUNBO0lBQUFBO0lBQ0FDLENBQUNBO0lBQURELFFBQUNBO0FBQURBLENBQUNBLEFBREQsSUFDQyJ9 \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt index 972c350c8e7..ed64295bcb8 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt @@ -55,30 +55,4 @@ sourceFile:a.ts 3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) --- ->>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOlsiYyIsImMuY29uc3RydWN0b3IiXSwibWFwcGluZ3MiOiJBQUNBO0lBQUFBO0lBQ0FDLENBQUNBO0lBQURELFFBQUNBO0FBQURBLENBQUNBLEFBREQsSUFDQyJ9=================================================================== -JsFile: b.js.js -mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIuanMubWFwIl0sIm5hbWVzIjpbImZvbyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQUEsQ0FBQ0EifQ== -sourceRoot: -sources: b.js.map -=================================================================== -------------------------------------------------------------------- -emittedFile:tests/cases/compiler/b.js.js -sourceFile:b.js.map -------------------------------------------------------------------- ->>>function foo() { -1 > -2 >^^-> -1 > -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) ---- ->>>} -1-> -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->function foo() { - > -2 >} -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) name (foo) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) name (foo) ---- ->>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIuanMubWFwIl0sIm5hbWVzIjpbImZvbyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQUEsQ0FBQ0EifQ== \ No newline at end of file +>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOlsiYyIsImMuY29uc3RydWN0b3IiXSwibWFwcGluZ3MiOiJBQUNBO0lBQUFBO0lBQ0FDLENBQUNBO0lBQURELFFBQUNBO0FBQURBLENBQUNBLEFBREQsSUFDQyJ9 \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt new file mode 100644 index 00000000000..81d9b67d334 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt @@ -0,0 +1,18 @@ +error TS6054: File 'tests/cases/compiler/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. + + +!!! error TS6054: File 'tests/cases/compiler/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +==== tests/cases/compiler/a.ts (0 errors) ==== + + class c { + } + +==== tests/cases/compiler/b.js.map (0 errors) ==== + function foo() { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js index d0a35eb15f1..742e7af2799 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js @@ -19,10 +19,4 @@ var c = (function () { } return c; })(); -//# sourceMappingURL=a.js.map//// [b.js.js] -function foo() { -} -//# sourceMappingURL=b.js.js.map//// [b.js] -function bar() { -} -//# sourceMappingURL=b.js.map \ No newline at end of file +//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map index ef19d2fc517..9a3b0f30f85 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map @@ -1,4 +1,2 @@ //// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["../tests/cases/compiler/a.ts"],"names":["c","c.constructor"],"mappings":"AACA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}//// [b.js.js.map] -{"version":3,"file":"b.js.js","sourceRoot":"","sources":["../tests/cases/compiler/b.js.map"],"names":["foo"],"mappings":"AAAA;AACAA,CAACA"}//// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["../tests/cases/compiler/b.js"],"names":["bar"],"mappings":"AAAA;AACAA,CAACA"} \ No newline at end of file +{"version":3,"file":"a.js","sourceRoot":"","sources":["../tests/cases/compiler/a.ts"],"names":["c","c.constructor"],"mappings":"AACA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt index c3fb335e374..32a123d434d 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt @@ -55,56 +55,4 @@ sourceFile:../tests/cases/compiler/a.ts 3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) --- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js.js -mapUrl: b.js.js.map -sourceRoot: -sources: ../tests/cases/compiler/b.js.map -=================================================================== -------------------------------------------------------------------- -emittedFile:out/b.js.js -sourceFile:../tests/cases/compiler/b.js.map -------------------------------------------------------------------- ->>>function foo() { -1 > -2 >^^-> -1 > -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) ---- ->>>} -1-> -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->function foo() { - > -2 >} -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) name (foo) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) name (foo) ---- ->>>//# sourceMappingURL=b.js.js.map=================================================================== -JsFile: b.js -mapUrl: b.js.map -sourceRoot: -sources: ../tests/cases/compiler/b.js -=================================================================== -------------------------------------------------------------------- -emittedFile:out/b.js -sourceFile:../tests/cases/compiler/b.js -------------------------------------------------------------------- ->>>function bar() { -1 > -2 >^^-> -1 > -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) ---- ->>>} -1-> -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->function bar() { - > -2 >} -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) name (bar) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) name (bar) ---- ->>>//# sourceMappingURL=b.js.map \ No newline at end of file +>>>//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.symbols b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.symbols deleted file mode 100644 index 9974960bd2d..00000000000 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.symbols +++ /dev/null @@ -1,15 +0,0 @@ -=== tests/cases/compiler/a.ts === - -class c { ->c : Symbol(c, Decl(a.ts, 0, 0)) -} - -=== tests/cases/compiler/b.js.map === -function foo() { ->foo : Symbol(foo, Decl(b.js.map, 0, 0)) -} - -=== tests/cases/compiler/b.js === -function bar() { ->bar : Symbol(bar, Decl(b.js, 0, 0)) -} diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.types b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.types deleted file mode 100644 index e4534a4cfd4..00000000000 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.types +++ /dev/null @@ -1,15 +0,0 @@ -=== tests/cases/compiler/a.ts === - -class c { ->c : c -} - -=== tests/cases/compiler/b.js.map === -function foo() { ->foo : () => void -} - -=== tests/cases/compiler/b.js === -function bar() { ->bar : () => void -} From a8eb76fde13d15dd0de8a0b670abc6cf2eed95b7 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 15:26:48 -0700 Subject: [PATCH 65/89] Remove the logic for parsing compilation of comma seperated list of strings on command line Also removed logic to accept multiple values for the option --- src/compiler/commandLineParser.ts | 154 ++++++++---------------------- src/compiler/tsc.ts | 8 +- src/compiler/types.ts | 6 +- src/harness/harness.ts | 28 +++--- src/harness/projectsRunner.ts | 28 +++--- 5 files changed, 77 insertions(+), 147 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 8bc95d4e31b..d1a6e56d818 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -312,23 +312,31 @@ namespace ts { if (hasProperty(optionNameMap, s)) { let opt = optionNameMap[s]; - if (opt.type === "boolean") { - // This needs to be treated specially since it doesnt accept argument - options[opt.name] = true; + // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). + if (!args[i] && opt.type !== "boolean") { + errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); } - else { - // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). - if (!args[i]) { - errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); - } - let { hasError, value} = parseOption(opt, args[i++], options[opt.name]); - if (hasError) { - errors.push(createCompilerDiagnostic((opt).error)); - } - else { - options[opt.name] = value; - } + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i++]); + break; + case "boolean": + options[opt.name] = true; + break; + case "string": + options[opt.name] = args[i++] || ""; + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + let map = >opt.type; + let key = (args[i++] || "").toLowerCase(); + if (hasProperty(map, key)) { + options[opt.name] = map[key]; + } + else { + errors.push(createCompilerDiagnostic((opt).error)); + } } } else { @@ -375,68 +383,6 @@ namespace ts { } } - /** - * Parses non quoted strings separated by comma e.g. "a,b" would result in string array ["a", "b"] - * @param s - * @param existingValue - */ - function parseMultiValueStringArray(s: string, existingValue: string[]) { - let value: string[] = existingValue || []; - let hasError = false; - let currentString = ""; - if (s) { - for (let i = 0; i < s.length; i++) { - let ch = s.charCodeAt(i); - if (ch === CharacterCodes.comma) { - pushCurrentStringToResult(); - } - else { - currentString += s.charAt(i); - } - } - // push last string - pushCurrentStringToResult(); - } - return { value, hasError }; - - function pushCurrentStringToResult() { - if (currentString) { - value.push(currentString); - currentString = ""; - } - else { - hasError = true; - } - } - } - - /* @internal */ - export function parseOption(option: CommandLineOption, stringValue: string, existingValue: CompilerOptionsValueType) { - let hasError: boolean; - let value: CompilerOptionsValueType; - switch (option.type) { - case "number": - value = parseInt(stringValue); - break; - case "string": - value = stringValue || ""; - break; - case "string[]": - return parseMultiValueStringArray(stringValue, existingValue); - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - let map = >option.type; - let key = (stringValue || "").toLowerCase(); - if (hasProperty(map, key)) { - value = map[key]; - } - else { - hasError = true; - } - } - return { hasError, value }; - } - /** * Read tsconfig.json file * @param fileName The path to the config file @@ -466,44 +412,11 @@ namespace ts { } } - /* @internal */ - export function parseJsonCompilerOption(opt: CommandLineOption, jsonValue: any, errors: Diagnostic[]) { - let optType = opt.type; - let expectedType = typeof optType === "string" ? optType : "string"; - let hasValidValue = true; - if (typeof jsonValue === expectedType) { - if (typeof optType !== "string") { - let key = jsonValue.toLowerCase(); - if (hasProperty(optType, key)) { - jsonValue = optType[key]; - } - else { - errors.push(createCompilerDiagnostic((opt).error)); - jsonValue = 0; - } - } - } - // Check if the value asked was string[] and value provided was not string[] - else if (expectedType !== "string[]" || - !(jsonValue instanceof Array) || - forEach(jsonValue, individualValue => typeof individualValue !== "string")) { - // Not expectedType - errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, expectedType)); - hasValidValue = false; - } - - return { - value: jsonValue, - hasValidValue - }; - } - /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir - * @param existingOptions optional existing options to extend into */ export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}): ParsedCommandLine { let errors: Diagnostic[] = []; @@ -526,16 +439,31 @@ namespace ts { for (let id in jsonOptions) { if (hasProperty(optionNameMap, id)) { let opt = optionNameMap[id]; - let { hasValidValue, value } = parseJsonCompilerOption(opt, jsonOptions[id], errors); - if (hasValidValue) { + let optType = opt.type; + let value = jsonOptions[id]; + let expectedType = typeof optType === "string" ? optType : "string"; + if (typeof value === expectedType) { + if (typeof optType !== "string") { + let key = value.toLowerCase(); + if (hasProperty(optType, key)) { + value = optType[key]; + } + else { + errors.push(createCompilerDiagnostic((opt).error)); + value = 0; + } + } if (opt.isFilePath) { - value = normalizePath(combinePaths(basePath, value)); + value = normalizePath(combinePaths(basePath, value)); if (value === "") { value = "."; } } options[opt.name] = value; } + else { + errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, id, expectedType)); + } } else { errors.push(createCompilerDiagnostic(Diagnostics.Unknown_compiler_option_0, id)); diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index e05f4f3f5db..90e15d61c46 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -588,8 +588,8 @@ namespace ts { return; - function serializeCompilerOptions(options: CompilerOptions): Map { - let result: Map = {}; + function serializeCompilerOptions(options: CompilerOptions): Map { + let result: Map = {}; let optionsNameMap = getOptionNameMap().optionNameMap; for (let name in options) { @@ -606,8 +606,8 @@ namespace ts { let optionDefinition = optionsNameMap[name.toLowerCase()]; if (optionDefinition) { if (typeof optionDefinition.type === "string") { - // string, number, boolean or string[] - result[name] = value; + // string, number or boolean + result[name] = value; } else { // Enum diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 15caa8b529c..5d41a60526a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2095,11 +2095,9 @@ namespace ts { // Skip checking lib.d.ts to help speed up tests. /* @internal */ skipDefaultLibCheck?: boolean; - [option: string]: CompilerOptionsValueType; + [option: string]: string | number | boolean; } - export type CompilerOptionsValueType = string | number | boolean | string[]; - export const enum ModuleKind { None = 0, CommonJS = 1, @@ -2166,7 +2164,7 @@ namespace ts { /* @internal */ export interface CommandLineOptionOfCustomType extends CommandLineOptionBase { - type: Map | string; // an object literal mapping named values to actual values | string if it is string[] + type: Map; // an object literal mapping named values to actual values error: DiagnosticMessage; // The error given when the argument does not fit a customized 'type' } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index fab3f649f2a..7fac374c09c 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1006,17 +1006,23 @@ namespace Harness { } let option = getCommandLineOption(name); if (option) { - if (option.type === "boolean") { - options[option.name] = value.toLowerCase() === "true"; - } - else { - let { hasError, value: parsedValue } = ts.parseOption(option, value, options[option.name]); - if (hasError) { - throw new Error(`Unknown value '${value}' for compiler option '${name}'.`); - } - else { - options[option.name] = parsedValue; - } + switch (option.type) { + case "boolean": + options[option.name] = value.toLowerCase() === "true"; + break; + case "string": + options[option.name] = value; + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + let map = >option.type; + let key = value.toLowerCase(); + if (ts.hasProperty(map, key)) { + options[option.name] = map[key]; + } + else { + throw new Error(`Unknown value '${value}' for compiler option '${name}'.`); + } } } else { diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index 51b8ddbf86e..f596b421e18 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -3,7 +3,7 @@ /* tslint:disable:no-null */ // Test case is json of below type in tests/cases/project/ -interface ProjectRunnerTestCase extends ts.CompilerOptions { +interface ProjectRunnerTestCase { scenario: string; projectRoot: string; // project where it lives - this also is the current directory when compiling inputFiles: string[]; // list of input files to be given to program @@ -51,7 +51,7 @@ class ProjectRunner extends RunnerBase { } private runProjectTestCase(testCaseFileName: string) { - let testCase: ProjectRunnerTestCase; + let testCase: ProjectRunnerTestCase & ts.CompilerOptions; let testFileText: string = null; try { @@ -62,7 +62,7 @@ class ProjectRunner extends RunnerBase { } try { - testCase = JSON.parse(testFileText); + testCase = JSON.parse(testFileText); } catch (e) { assert(false, "Testcase: " + testCaseFileName + " does not contain valid json format: " + e.message); @@ -183,13 +183,7 @@ class ProjectRunner extends RunnerBase { let outputFiles: BatchCompileProjectTestCaseEmittedFile[] = []; let inputFiles = testCase.inputFiles; - let { errors, compilerOptions } = createCompilerOptions(); - if (errors.length) { - return { - moduleKind, - errors - }; - } + let compilerOptions = createCompilerOptions(); let configFileName: string; if (compilerOptions.project) { @@ -240,7 +234,6 @@ class ProjectRunner extends RunnerBase { module: moduleKind, moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future }; - let errors: ts.Diagnostic[] = []; // Set the values specified using json let optionNameMap: ts.Map = {}; ts.forEach(ts.optionDeclarations, option => { @@ -249,14 +242,19 @@ class ProjectRunner extends RunnerBase { for (let name in testCase) { if (name !== "mapRoot" && name !== "sourceRoot" && ts.hasProperty(optionNameMap, name)) { let option = optionNameMap[name]; - let { hasValidValue, value } = ts.parseJsonCompilerOption(option, testCase[name], errors); - if (hasValidValue) { - compilerOptions[option.name] = value; + let optType = option.type; + let value = testCase[name]; + if (typeof optType !== "string") { + let key = value.toLowerCase(); + if (ts.hasProperty(optType, key)) { + value = optType[key]; + } } + compilerOptions[option.name] = value; } } - return { errors, compilerOptions }; + return compilerOptions; } function getFileNameInTheProjectTest(fileName: string): string { From 45b995d03083e1624f07e300cd29bb66ef8edb5b Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 15:45:00 -0700 Subject: [PATCH 66/89] Remove extensions doesnt need to depend on compiler options any more --- src/compiler/binder.ts | 8 ++++---- src/compiler/checker.ts | 2 +- src/compiler/core.ts | 6 ++---- src/compiler/utilities.ts | 13 ++++--------- src/harness/harness.ts | 2 +- src/harness/projectsRunner.ts | 6 +++--- src/harness/test262Runner.ts | 2 +- src/services/navigationBar.ts | 2 +- tests/cases/unittests/transpile.ts | 2 +- 9 files changed, 18 insertions(+), 25 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 2b9183e7115..c12a9afad62 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -77,13 +77,13 @@ namespace ts { IsContainerWithLocals = IsContainer | HasLocals } - export function bindSourceFile(file: SourceFile, compilerOptions: CompilerOptions) { + export function bindSourceFile(file: SourceFile) { let start = new Date().getTime(); - bindSourceFileWorker(file, compilerOptions); + bindSourceFileWorker(file); bindTime += new Date().getTime() - start; } - function bindSourceFileWorker(file: SourceFile, compilerOptions: CompilerOptions) { + function bindSourceFileWorker(file: SourceFile) { let parent: Node; let container: Node; let blockScopeContainer: Node; @@ -949,7 +949,7 @@ namespace ts { function bindSourceFileIfExternalModule() { setExportContextFlag(file); if (isExternalModule(file)) { - bindAnonymousDeclaration(file, SymbolFlags.ValueModule, `"${removeFileExtension(file.fileName, getSupportedExtensions(compilerOptions))}"`); + bindAnonymousDeclaration(file, SymbolFlags.ValueModule, `"${removeFileExtension(file.fileName)}"`); } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ec9a8e67f2f..c329ff729f9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14871,7 +14871,7 @@ namespace ts { function initializeTypeChecker() { // Bind all source files and propagate errors forEach(host.getSourceFiles(), file => { - bindSourceFile(file, compilerOptions); + bindSourceFile(file); }); // Initialize global symbol table diff --git a/src/compiler/core.ts b/src/compiler/core.ts index bb07062ec57..26e53aebab1 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -747,10 +747,8 @@ namespace ts { return false; } - export function removeFileExtension(path: string, supportedExtensions: string[]): string { - // Sort the extensions in descending order of their length - let extensionsToRemove = supportedExtensions.slice(0, supportedExtensions.length) // Get duplicate array - .sort((ext1, ext2) => compareValues(ext2.length, ext1.length)); // Sort in descending order of extension length + export const extensionsToRemove = ["d.ts", "ts", "js", "tsx", "jsx"]; + export function removeFileExtension(path: string): string { for (let ext of extensionsToRemove) { if (fileExtensionIs(path, ext)) { return path.substr(0, path.length - ext.length - 1); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b889e8b119d..7c88e1a9417 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1759,19 +1759,14 @@ namespace ts { }; } - export function getExtensionsToRemoveForEmitPath(compilerOptons: CompilerOptions) { - return getSupportedExtensions(compilerOptons).concat("jsx", "js"); - } - export function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string) { let compilerOptions = host.getCompilerOptions(); let emitOutputFilePathWithoutExtension: string; if (compilerOptions.outDir) { - emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir), - getExtensionsToRemoveForEmitPath(compilerOptions)); + emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); } else { - emitOutputFilePathWithoutExtension = removeFileExtension(sourceFile.fileName, getExtensionsToRemoveForEmitPath(compilerOptions)); + emitOutputFilePathWithoutExtension = removeFileExtension(sourceFile.fileName); } return emitOutputFilePathWithoutExtension + extension; @@ -1816,7 +1811,7 @@ namespace ts { } function getDeclarationEmitFilePath(jsFilePath: string, options: CompilerOptions) { - return options.declaration ? removeFileExtension(jsFilePath, getExtensionsToRemoveForEmitPath(options)) + ".d.ts" : undefined; + return options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : undefined; } export function hasFile(sourceFiles: SourceFile[], fileName: string) { @@ -2144,7 +2139,7 @@ namespace ts { export function isJavaScript(fileName: string) { // Treat file as typescript if the extension is not supportedTypeScript - return hasExtension(fileName) && !forEach(supportedTypeScriptExtensions, extension => fileExtensionIs(fileName, extension)); + return hasExtension(fileName) && forEach(supportedJavascriptExtensions, extension => fileExtensionIs(fileName, extension)); } export function isTsx(fileName: string) { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 7fac374c09c..f19ed70b40d 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1193,7 +1193,7 @@ namespace Harness { sourceFileName = outFile; } - let dTsFileName = ts.removeFileExtension(sourceFileName, ts.getExtensionsToRemoveForEmitPath(options)) + ".d.ts"; + let dTsFileName = ts.removeFileExtension(sourceFileName) + ".d.ts"; return ts.forEach(result.declFilesCode, declFile => declFile.fileName === dTsFileName ? declFile : undefined); } diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index f596b421e18..286409672d0 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -354,17 +354,17 @@ class ProjectRunner extends RunnerBase { if (compilerOptions.outDir) { let sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, compilerResult.program.getCurrentDirectory()); sourceFilePath = sourceFilePath.replace(compilerResult.program.getCommonSourceDirectory(), ""); - emitOutputFilePathWithoutExtension = ts.removeFileExtension(ts.combinePaths(compilerOptions.outDir, sourceFilePath), ts.getExtensionsToRemoveForEmitPath(compilerOptions)); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(ts.combinePaths(compilerOptions.outDir, sourceFilePath)); } else { - emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName, ts.getExtensionsToRemoveForEmitPath(compilerOptions)); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); } let outputDtsFileName = emitOutputFilePathWithoutExtension + ".d.ts"; allInputFiles.unshift(findOutpuDtsFile(outputDtsFileName)); } else { - let outputDtsFileName = ts.removeFileExtension(compilerOptions.outFile || compilerOptions.out, ts.getExtensionsToRemoveForEmitPath(compilerOptions)) + ".d.ts"; + let outputDtsFileName = ts.removeFileExtension(compilerOptions.outFile || compilerOptions.out) + ".d.ts"; let outputDtsFile = findOutpuDtsFile(outputDtsFileName); if (!ts.contains(allInputFiles, outputDtsFile)) { allInputFiles.unshift(outputDtsFile); diff --git a/src/harness/test262Runner.ts b/src/harness/test262Runner.ts index 1e95fc4ae74..491c71a5839 100644 --- a/src/harness/test262Runner.ts +++ b/src/harness/test262Runner.ts @@ -37,7 +37,7 @@ class Test262BaselineRunner extends RunnerBase { before(() => { let content = Harness.IO.readFile(filePath); - let testFilename = ts.removeFileExtension(filePath, ["js"]).replace(/\//g, "_") + ".test"; + let testFilename = ts.removeFileExtension(filePath).replace(/\//g, "_") + ".test"; let testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, testFilename); let inputFiles = testCaseContent.testUnitData.map(unit => { diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index 5dbc514d462..46ec807a881 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -442,7 +442,7 @@ namespace ts.NavigationBar { hasGlobalNode = true; let rootName = isExternalModule(node) - ? "\"" + escapeString(getBaseFileName(removeFileExtension(normalizePath(node.fileName), getSupportedExtensions(compilerOptions)))) + "\"" + ? "\"" + escapeString(getBaseFileName(removeFileExtension(normalizePath(node.fileName)))) + "\"" : "" return getNavigationBarItem(rootName, diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index 06949e174c1..1d688f091a4 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -64,7 +64,7 @@ module ts { let transpileModuleResultWithSourceMap = transpileModule(input, transpileOptions); assert.isTrue(transpileModuleResultWithSourceMap.sourceMapText !== undefined); - let expectedSourceMapFileName = removeFileExtension(getBaseFileName(normalizeSlashes(transpileOptions.fileName)), ts.getExtensionsToRemoveForEmitPath(transpileOptions.compilerOptions)) + ".js.map"; + let expectedSourceMapFileName = removeFileExtension(getBaseFileName(normalizeSlashes(transpileOptions.fileName))) + ".js.map"; let expectedSourceMappingUrlLine = `//# sourceMappingURL=${expectedSourceMapFileName}`; if (testSettings.expectedOutput !== undefined) { From 2d3a345fd3a5aa26e0e6a9d5788d807b8edcca67 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 16:24:53 -0700 Subject: [PATCH 67/89] Since there arent any user given extensions, have extensions start with "." like before --- src/compiler/commandLineParser.ts | 2 +- src/compiler/core.ts | 12 ++++++------ src/compiler/parser.ts | 2 +- src/compiler/program.ts | 10 +++++----- src/compiler/utilities.ts | 2 +- src/harness/compilerRunner.ts | 2 +- src/services/services.ts | 2 +- .../jsFileCompilationWithMapFileAsJs.errors.txt | 4 ++-- ...tionWithMapFileAsJsWithInlineSourceMap.errors.txt | 4 ++-- ...leCompilationWithMapFileAsJsWithOutDir.errors.txt | 8 ++++---- .../jsFileCompilationWithoutJsExtensions.errors.txt | 4 ++-- .../invalidRootFile/amd/invalidRootFile.errors.txt | 4 ++-- .../invalidRootFile/node/invalidRootFile.errors.txt | 4 ++-- ...FileCompilationDifferentNamesSpecified.errors.txt | 4 ++-- ...FileCompilationDifferentNamesSpecified.errors.txt | 4 ++-- tests/cases/unittests/moduleResolution.ts | 4 ++-- 16 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index d1a6e56d818..fb58384c469 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -515,7 +515,7 @@ namespace ts { if (!hasConflictingExtension) { // Add the file only if there is no higher priority extension file already included // eg. when a.d.ts and a.js are present in the folder, include only a.d.ts not a.js - const baseName = fileName.substr(0, fileName.length - currentExtension.length - 1); + const baseName = fileName.substr(0, fileName.length - currentExtension.length); if (!hasProperty(filesSeen, baseName)) { filesSeen[baseName] = true; fileNames.push(fileName); diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 26e53aebab1..018f3022191 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -721,15 +721,15 @@ namespace ts { export function fileExtensionIs(path: string, extension: string): boolean { let pathLen = path.length; - let extLen = extension.length + 1; - return pathLen > extLen && path.substr(pathLen - extLen, extLen) === "." + extension; + let extLen = extension.length; + return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension; } /** * List of supported extensions in order of file resolution precedence. */ - export const supportedTypeScriptExtensions = ["ts", "tsx", "d.ts"]; - export const supportedJavascriptExtensions = ["js", "jsx"]; + export const supportedTypeScriptExtensions = [".ts", ".tsx", ".d.ts"]; + export const supportedJavascriptExtensions = [".js", ".jsx"]; export const supportedExtensionsWhenAllowedJs = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); export function getSupportedExtensions(options?: CompilerOptions): string[] { @@ -747,11 +747,11 @@ namespace ts { return false; } - export const extensionsToRemove = ["d.ts", "ts", "js", "tsx", "jsx"]; + export const extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; export function removeFileExtension(path: string): string { for (let ext of extensionsToRemove) { if (fileExtensionIs(path, ext)) { - return path.substr(0, path.length - ext.length - 1); + return path.substr(0, path.length - ext.length); } } return path; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index d8d2b2fdb26..a1076464bbd 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -669,7 +669,7 @@ namespace ts { sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = normalizePath(fileName); - sourceFile.flags = fileExtensionIs(sourceFile.fileName, "d.ts") ? NodeFlags.DeclarationFile : 0; + sourceFile.flags = fileExtensionIs(sourceFile.fileName, ".d.ts") ? NodeFlags.DeclarationFile : 0; sourceFile.languageVariant = getLanguageVariant(sourceFile.fileName); return sourceFile; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index ccb2d2c346e..db56f86e93b 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -73,7 +73,7 @@ namespace ts { return forEach(supportedExtensions, tryLoad); function tryLoad(ext: string): string { - let fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + "." + ext; + let fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + ext; if (host.fileExists(fileName)) { return fileName; } @@ -165,13 +165,13 @@ namespace ts { while (true) { searchName = normalizePath(combinePaths(searchPath, moduleName)); referencedSourceFile = forEach(getSupportedExtensions(compilerOptions), extension => { - if (extension === "tsx" && !compilerOptions.jsx) { + if (extension === ".tsx" && !compilerOptions.jsx) { // resolve .tsx files only if jsx support is enabled // 'logical not' handles both undefined and None cases return undefined; } - let candidate = searchName + "." + extension; + let candidate = searchName + extension; if (host.fileExists(candidate)) { return candidate; } @@ -964,7 +964,7 @@ namespace ts { diagnostic = Diagnostics.File_0_not_found; diagnosticArgument = [fileName]; } - else if (!forEach(getSupportedExtensions(options), extension => findSourceFile(fileName + "." + extension, isDefaultLib, supportedExtensions, refFile, refPos, refEnd))) { + else if (!forEach(getSupportedExtensions(options), extension => findSourceFile(fileName + extension, isDefaultLib, supportedExtensions, refFile, refPos, refEnd))) { // (TODO: shkamat) Should this message be different given we support multiple extensions diagnostic = Diagnostics.File_0_not_found; fileName += ".ts"; @@ -1077,7 +1077,7 @@ namespace ts { let start = getTokenPosOfNode(file.imports[i], file); fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName)); } - else if (!fileExtensionIs(importedFile.fileName, "d.ts")) { + else if (!fileExtensionIs(importedFile.fileName, ".d.ts")) { let start = getTokenPosOfNode(file.imports[i], file); fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_can_only_be_in_d_ts_files_Please_contact_the_package_author_to_update_the_package_definition)); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7c88e1a9417..885d529f69e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2143,7 +2143,7 @@ namespace ts { } export function isTsx(fileName: string) { - return fileExtensionIs(fileName, "tsx"); + return fileExtensionIs(fileName, ".tsx"); } /** diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index e3c48e33e5c..11c1b9a8029 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -151,7 +151,7 @@ class CompilerBaselineRunner extends RunnerBase { }); it("Correct JS output for " + fileName, () => { - if (!(units.length === 1 && ts.fileExtensionIs(lastUnit.name, "d.ts")) && this.emit) { + if (!(units.length === 1 && ts.fileExtensionIs(lastUnit.name, ".d.ts")) && this.emit) { if (result.files.length === 0 && result.errors.length === 0) { throw new Error("Expected at least one js file to be emitted or at least one error to be created."); } diff --git a/src/services/services.ts b/src/services/services.ts index dce341cc035..d80e60d171b 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1875,7 +1875,7 @@ namespace ts { let compilerHost: CompilerHost = { getSourceFile: (fileName, target) => fileName === normalizeSlashes(inputFileName) ? sourceFile : undefined, writeFile: (name, text, writeByteOrderMark) => { - if (fileExtensionIs(name, "map")) { + if (fileExtensionIs(name, ".map")) { Debug.assert(sourceMapText === undefined, `Unexpected multiple source map outputs for the file '${name}'`); sourceMapText = text; } diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt index aaeb023dbdb..a97dc2c3cd6 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. -error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts', 'js', 'jsx'. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. !!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. -!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts', 'js', 'jsx'. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt index aaeb023dbdb..a97dc2c3cd6 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. -error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts', 'js', 'jsx'. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. !!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. -!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts', 'js', 'jsx'. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt index 81d9b67d334..c9a4408f423 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt @@ -1,9 +1,9 @@ -error TS6054: File 'tests/cases/compiler/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. -error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +error TS6054: File 'tests/cases/compiler/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. -!!! error TS6054: File 'tests/cases/compiler/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. -!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +!!! error TS6054: File 'tests/cases/compiler/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { diff --git a/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt index 4276669ff76..0b1a757d4fd 100644 --- a/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt @@ -1,6 +1,6 @@ -error TS6054: File 'tests/cases/compiler/a.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +error TS6054: File 'tests/cases/compiler/a.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. -!!! error TS6054: File 'tests/cases/compiler/a.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +!!! error TS6054: File 'tests/cases/compiler/a.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. ==== tests/cases/compiler/a.js (0 errors) ==== declare var v; \ No newline at end of file diff --git a/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt b/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt index 76d5def7b5c..9cd0dd7b0cf 100644 --- a/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt +++ b/tests/baselines/reference/project/invalidRootFile/amd/invalidRootFile.errors.txt @@ -1,6 +1,6 @@ error TS6053: File 'a.ts' not found. -error TS6054: File 'a.t' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. !!! error TS6053: File 'a.ts' not found. -!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. \ No newline at end of file +!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. \ No newline at end of file diff --git a/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt b/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt index 76d5def7b5c..9cd0dd7b0cf 100644 --- a/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt +++ b/tests/baselines/reference/project/invalidRootFile/node/invalidRootFile.errors.txt @@ -1,6 +1,6 @@ error TS6053: File 'a.ts' not found. -error TS6054: File 'a.t' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. !!! error TS6053: File 'a.ts' not found. -!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. \ No newline at end of file +!!! error TS6054: File 'a.t' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt index a7fd60e03d5..5fa60d18af9 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt @@ -1,6 +1,6 @@ -error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. -!!! error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +!!! error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. ==== DifferentNamesSpecified/a.ts (0 errors) ==== var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt index a7fd60e03d5..5fa60d18af9 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt @@ -1,6 +1,6 @@ -error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. -!!! error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are 'ts', 'tsx', 'd.ts'. +!!! error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. ==== DifferentNamesSpecified/a.ts (0 errors) ==== var test = 10; \ No newline at end of file diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index 6f9497fde1d..a1767f58026 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -38,7 +38,7 @@ module ts { function testLoadAsFile(containingFileName: string, moduleFileNameNoExt: string, moduleName: string): void { for (let ext of supportedTypeScriptExtensions) { let containingFile = { name: containingFileName } - let moduleFile = { name: moduleFileNameNoExt + "." + ext } + let moduleFile = { name: moduleFileNameNoExt + ext } let resolution = nodeModuleNameResolver(moduleName, containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); @@ -50,7 +50,7 @@ module ts { break; } else { - failedLookupLocations.push(normalizePath(getRootLength(moduleName) === 0 ? combinePaths(dir, moduleName) : moduleName) + "." + e); + failedLookupLocations.push(normalizePath(getRootLength(moduleName) === 0 ? combinePaths(dir, moduleName) : moduleName) + e); } } From 0c3c7f1a1bcab95c704d50f2709a2655df133c08 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 16:39:22 -0700 Subject: [PATCH 68/89] Treat the .jsx and .tsx files as jsx when parsing and .js files are parsed in standard mode --- src/compiler/parser.ts | 3 ++- src/compiler/utilities.ts | 4 ---- .../jsFileCompilationTypeAssertions.errors.txt | 6 +++--- .../getJavaScriptSemanticDiagnostics20.ts | 14 +++++++------- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a1076464bbd..b0a9e02ed7c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -537,7 +537,8 @@ namespace ts { } function getLanguageVariant(fileName: string) { - return isTsx(fileName) || isJavaScript(fileName) ? LanguageVariant.JSX : LanguageVariant.Standard; + // .tsx and .jsx files are treated as jsx language variant. + return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") ? LanguageVariant.JSX : LanguageVariant.Standard; } function initializeState(fileName: string, _sourceText: string, languageVersion: ScriptTarget, _syntaxCursor: IncrementalParser.SyntaxCursor) { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 885d529f69e..838ff097933 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2142,10 +2142,6 @@ namespace ts { return hasExtension(fileName) && forEach(supportedJavascriptExtensions, extension => fileExtensionIs(fileName, extension)); } - export function isTsx(fileName: string) { - return fileExtensionIs(fileName, ".tsx"); - } - /** * Replace each instance of non-ascii characters by one, two, three, or four escape sequences * representing the UTF-8 encoding of the character, and return the expanded char code list. diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index 669e83688cc..50d6416a62b 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -tests/cases/compiler/a.js(1,27): error TS17002: Expected corresponding JSX closing tag for 'string'. +tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. ==== tests/cases/compiler/a.js (1 errors) ==== var v = undefined; - -!!! error TS17002: Expected corresponding JSX closing tag for 'string'. \ No newline at end of file + ~~~~~~ +!!! error TS8016: 'type assertion expressions' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts index 5172ee7701c..c0c519cb24c 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts @@ -4,13 +4,13 @@ // @Filename: a.js //// var v = undefined; -verify.getSyntacticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[]`); +verify.getSemanticDiagnostics(`[ { - "message": "Expected corresponding JSX closing tag for 'string'.", - "start": 26, - "length": 0, + "message": "'type assertion expressions' can only be used in a .ts file.", + "start": 9, + "length": 6, "category": "error", - "code": 17002 + "code": 8016 } -]`); -verify.getSemanticDiagnostics(`[]`); \ No newline at end of file +]`); \ No newline at end of file From fdb7a3e452299dbc7159b9c4908d81a6b097b1ea Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 16:52:05 -0700 Subject: [PATCH 69/89] Revert the change to block declaration emit in case of syntax or semantic errors --- src/compiler/core.ts | 2 +- src/compiler/declarationEmitter.ts | 2 +- src/compiler/program.ts | 38 ++---------------------------- src/compiler/types.ts | 1 - src/compiler/utilities.ts | 1 - 5 files changed, 4 insertions(+), 40 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 018f3022191..18b7425e02d 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -747,7 +747,7 @@ namespace ts { return false; } - export const extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; + const extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; export function removeFileExtension(path: string): string { for (let ext of extensionsToRemove) { if (fileExtensionIs(path, ext)) { diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 86c90ff6f1c..eb329c67b0b 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -1608,7 +1608,7 @@ namespace ts { /* @internal */ export function writeDeclarationFile(declarationFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[]) { let emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, declarationFilePath, sourceFile); - let emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isDeclarationEmitBlocked(declarationFilePath, sourceFile); + let emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath); if (!emitSkipped) { let declarationOutput = emitDeclarationResult.referencePathsOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); diff --git a/src/compiler/program.ts b/src/compiler/program.ts index db56f86e93b..acac0ca4e5f 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -394,7 +394,6 @@ namespace ts { getDiagnosticsProducingTypeChecker, getCommonSourceDirectory: () => commonSourceDirectory, emit, - isDeclarationEmitBlocked, getCurrentDirectory: () => host.getCurrentDirectory(), getNodeCount: () => getDiagnosticsProducingTypeChecker().getNodeCount(), getIdentifierCount: () => getDiagnosticsProducingTypeChecker().getIdentifierCount(), @@ -512,7 +511,7 @@ namespace ts { return true; } - function getEmitHost(writeFileCallback?: WriteFileCallback, cancellationToken?: CancellationToken): EmitHost { + function getEmitHost(writeFileCallback?: WriteFileCallback): EmitHost { return { getCanonicalFileName: fileName => host.getCanonicalFileName(fileName), getCommonSourceDirectory: program.getCommonSourceDirectory, @@ -524,7 +523,6 @@ namespace ts { writeFile: writeFileCallback || ( (fileName, data, writeByteOrderMark, onError) => host.writeFile(fileName, data, writeByteOrderMark, onError)), isEmitBlocked, - isDeclarationEmitBlocked: (emitFileName, sourceFile) => program.isDeclarationEmitBlocked(emitFileName, sourceFile, cancellationToken), }; } @@ -540,38 +538,6 @@ namespace ts { return runWithCancellationToken(() => emitWorker(this, sourceFile, writeFileCallback, cancellationToken)); } - function isDeclarationEmitBlocked(emitFileName: string, sourceFile?: SourceFile, cancellationToken?: CancellationToken): boolean { - if (isEmitBlocked(emitFileName)) { - return true; - } - - // Dont check for emit blocking options diagnostics because that check per emit file is already covered in isEmitBlocked - // We dont want to end up blocking declaration emit of one file because other file results in emit blocking error - if (getOptionsDiagnostics(cancellationToken, /*includeEmitBlockingDiagnostics*/false).length || - getGlobalDiagnostics().length) { - return true; - } - - if (sourceFile) { - // Do not generate declaration file for this if there are any errors in this file or any of the declaration files - return hasSyntaxOrSemanticDiagnostics(sourceFile) || - forEach(files, sourceFile => isDeclarationFile(sourceFile) && hasSyntaxOrSemanticDiagnostics(sourceFile)); - } - - // Check if the bundled emit source files have errors - return forEach(files, sourceFile => { - // Check all the files that will be bundled together as well as all the included declaration files are error free - if (!isExternalModule(sourceFile)) { - return hasSyntaxOrSemanticDiagnostics(sourceFile); - } - }); - - function hasSyntaxOrSemanticDiagnostics(file: SourceFile) { - return !!getSyntacticDiagnostics(file, cancellationToken).length || - !!getSemanticDiagnostics(file, cancellationToken).length; - } - } - function isEmitBlocked(emitFileName: string): boolean { return hasProperty(hasEmitBlockingDiagnostics, emitFileName); } @@ -598,7 +564,7 @@ namespace ts { let emitResult = emitFiles( emitResolver, - getEmitHost(writeFileCallback, cancellationToken), + getEmitHost(writeFileCallback), sourceFile); emitTime += new Date().getTime() - start; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5d41a60526a..928524b2ac7 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1358,7 +1358,6 @@ namespace ts { getTypeChecker(): TypeChecker; /* @internal */ getCommonSourceDirectory(): string; - /* @internal */ isDeclarationEmitBlocked(emitFileName: string, sourceFile?: SourceFile, cancellationToken?: CancellationToken): boolean; // For testing purposes only. Should not be used by any other consumers (including the // language service). diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 838ff097933..f9489a9ddac 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -40,7 +40,6 @@ namespace ts { getNewLine(): string; isEmitBlocked(emitFileName: string): boolean; - isDeclarationEmitBlocked(emitFileName: string, sourceFile?: SourceFile): boolean; writeFile: WriteFileCallback; } From 38ebb1d835d007714b25f7496925bbdb3428c032 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 28 Oct 2015 16:59:52 -0700 Subject: [PATCH 70/89] Tests update after declaration file emit revert --- ...mputedPropertyNamesDeclarationEmit3_ES5.js | 5 + ...mputedPropertyNamesDeclarationEmit3_ES6.js | 5 + ...mputedPropertyNamesDeclarationEmit4_ES5.js | 5 + ...mputedPropertyNamesDeclarationEmit4_ES6.js | 5 + tests/baselines/reference/constEnum2.js | 10 + .../reference/constEnumPropertyAccess2.js | 13 + ...eclFileWithErrorsInInputDeclarationFile.js | 5 + ...WithErrorsInInputDeclarationFileWithOut.js | 5 + .../declarationEmitDestructuring2.js | 24 ++ .../declarationEmitDestructuring4.js | 10 + ...clarationEmitDestructuringArrayPattern2.js | 12 + ...onEmitDestructuringObjectLiteralPattern.js | 19 ++ ...nEmitDestructuringObjectLiteralPattern1.js | 9 + ...ionEmitDestructuringParameterProperties.js | 21 ++ ...tructuringWithOptionalBindingParameters.js | 9 + .../declarationEmit_invalidReference2.js | 4 + ...uplicateIdentifiersAcrossFileBoundaries.js | 33 ++ .../emptyObjectBindingPatternParameter04.js | 8 + ...ariableDeclarationBindingPatterns02_ES5.js | 3 + ...ariableDeclarationBindingPatterns02_ES6.js | 3 + tests/baselines/reference/es5ExportEquals.js | 5 + tests/baselines/reference/es6ExportEquals.js | 5 + ...tDefaultBindingFollowedWithNamedImport1.js | 1 + ...ultBindingFollowedWithNamedImport1InEs5.js | 1 + ...ndingFollowedWithNamedImport1WithExport.js | 7 + ...efaultBindingFollowedWithNamedImportDts.js | 12 + ...faultBindingFollowedWithNamedImportDts1.js | 8 + ...aultBindingFollowedWithNamedImportInEs5.js | 1 + ...indingFollowedWithNamedImportWithExport.js | 7 + ...aultBindingFollowedWithNamespaceBinding.js | 1 + ...FollowedWithNamespaceBinding1WithExport.js | 2 + ...tBindingFollowedWithNamespaceBindingDts.js | 3 + ...indingFollowedWithNamespaceBindingInEs5.js | 1 + ...gFollowedWithNamespaceBindingWithExport.js | 2 + .../reference/es6ImportDefaultBindingInEs5.js | 1 + .../es6ImportDefaultBindingWithExport.js | 2 + .../es6ImportNameSpaceImportWithExport.js | 2 + .../es6ImportNamedImportWithExport.js | 13 + .../es6ImportWithoutFromClauseWithExport.js | 2 + .../exportDeclarationInInternalModule.js | 17 + .../reference/exportStarFromEmptyModule.js | 7 + .../getEmitOutputWithSemanticErrors2.baseline | 6 +- ...thSemanticErrorsForMultipleFiles2.baseline | 7 +- tests/baselines/reference/giant.js | 304 ++++++++++++++++++ .../reference/isolatedModulesDeclaration.js | 4 + ...pilationDuplicateFunctionImplementation.js | 3 + ...FunctionImplementationFileOrderReversed.js | 3 + ...mpilationDuplicateVariableErrorReported.js | 5 + ...eclarationsWithJsFileReferenceWithNoOut.js | 10 + .../jsFileCompilationLetDeclarationOrder2.js | 5 + tests/baselines/reference/letAsIdentifier.js | 6 + tests/baselines/reference/out-flag3.js | 8 +- ...ileCompilationDifferentNamesSpecified.json | 3 +- .../amd/test.d.ts | 1 + ...ileCompilationDifferentNamesSpecified.json | 3 +- .../node/test.d.ts | 1 + .../amd/outdir/simple/FolderC/fileC.d.ts | 2 + .../amd/outdir/simple/fileB.d.ts | 4 + .../amd/rootDirectoryErrors.json | 4 +- .../node/outdir/simple/FolderC/fileC.d.ts | 2 + .../node/outdir/simple/fileB.d.ts | 4 + .../node/rootDirectoryErrors.json | 4 +- tests/baselines/reference/widenedTypes.js | 14 + ...pilationDuplicateFunctionImplementation.ts | 3 +- 64 files changed, 702 insertions(+), 12 deletions(-) create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts create mode 100644 tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/FolderC/fileC.d.ts create mode 100644 tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/fileB.d.ts create mode 100644 tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/FolderC/fileC.d.ts create mode 100644 tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/fileB.d.ts diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js index 1f339b36faf..c24eaf68a6f 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js @@ -4,3 +4,8 @@ interface I { } //// [computedPropertyNamesDeclarationEmit3_ES5.js] + + +//// [computedPropertyNamesDeclarationEmit3_ES5.d.ts] +interface I { +} diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js index 55e657c2325..dc54ff2cbb2 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js @@ -4,3 +4,8 @@ interface I { } //// [computedPropertyNamesDeclarationEmit3_ES6.js] + + +//// [computedPropertyNamesDeclarationEmit3_ES6.d.ts] +interface I { +} diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js index bca1ddbfdc7..c57c0384afc 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js @@ -5,3 +5,8 @@ var v: { //// [computedPropertyNamesDeclarationEmit4_ES5.js] var v; + + +//// [computedPropertyNamesDeclarationEmit4_ES5.d.ts] +declare var v: { +}; diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js index c3b26b97c9b..903687d0780 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js @@ -5,3 +5,8 @@ var v: { //// [computedPropertyNamesDeclarationEmit4_ES6.js] var v; + + +//// [computedPropertyNamesDeclarationEmit4_ES6.d.ts] +declare var v: { +}; diff --git a/tests/baselines/reference/constEnum2.js b/tests/baselines/reference/constEnum2.js index 5c46778c7ce..c0c640b87fd 100644 --- a/tests/baselines/reference/constEnum2.js +++ b/tests/baselines/reference/constEnum2.js @@ -20,3 +20,13 @@ const enum D { // it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression. // Error : not a constant enum expression var CONST = 9000 % 2; + + +//// [constEnum2.d.ts] +declare const CONST: number; +declare const enum D { + d = 10, + e, + f, + g, +} diff --git a/tests/baselines/reference/constEnumPropertyAccess2.js b/tests/baselines/reference/constEnumPropertyAccess2.js index f2d63ba1389..46a1d918b94 100644 --- a/tests/baselines/reference/constEnumPropertyAccess2.js +++ b/tests/baselines/reference/constEnumPropertyAccess2.js @@ -31,3 +31,16 @@ var g; g = "string"; function foo(x) { } 2 /* B */ = 3; + + +//// [constEnumPropertyAccess2.d.ts] +declare const enum G { + A = 1, + B = 2, + C = 3, + D = 2, +} +declare var z: typeof G; +declare var z1: any; +declare var g: G; +declare function foo(x: G): void; diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js index e97312893ad..30e80ef4e6f 100644 --- a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js @@ -19,3 +19,8 @@ var x = new M.C(); // Declaration file wont get emitted because there are errors //// [client.js] /// var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + + +//// [client.d.ts] +/// +declare var x: M.C; diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js index 11dcc06380c..99dd625760f 100644 --- a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js @@ -19,3 +19,8 @@ var x = new M.C(); // Declaration file wont get emitted because there are errors //// [out.js] /// var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + + +//// [out.d.ts] +/// +declare var x: M.C; diff --git a/tests/baselines/reference/declarationEmitDestructuring2.js b/tests/baselines/reference/declarationEmitDestructuring2.js index 31329ded304..09980c5c9dd 100644 --- a/tests/baselines/reference/declarationEmitDestructuring2.js +++ b/tests/baselines/reference/declarationEmitDestructuring2.js @@ -17,3 +17,27 @@ function h(_a) { function h1(_a) { var a = _a[0], b = _a[1][0], c = _a[2][0][0], _b = _a[3], _c = _b.x, x = _c === void 0 ? 10 : _c, _d = _b.y, y = _d === void 0 ? [1, 2, 3] : _d, _e = _b.z, a1 = _e.a1, b1 = _e.b1; } + + +//// [declarationEmitDestructuring2.d.ts] +declare function f({x, y: [a, b, c, d]}?: { + x?: number; + y?: [number, number, number, number]; +}): void; +declare function g([a, b, c, d]?: [number, number, number, number]): void; +declare function h([a, [b], [[c]], {x, y: [a, b, c], z: {a1, b1}}]: [any, [any], [[any]], { + x?: number; + y: [any, any, any]; + z: { + a1: any; + b1: any; + }; +}]): void; +declare function h1([a, [b], [[c]], {x, y, z: {a1, b1}}]: [any, [any], [[any]], { + x?: number; + y?: number[]; + z: { + a1: any; + b1: any; + }; +}]): void; diff --git a/tests/baselines/reference/declarationEmitDestructuring4.js b/tests/baselines/reference/declarationEmitDestructuring4.js index 58cf0e0b2f9..16e6b49a4cf 100644 --- a/tests/baselines/reference/declarationEmitDestructuring4.js +++ b/tests/baselines/reference/declarationEmitDestructuring4.js @@ -26,3 +26,13 @@ function baz3(_a) { } function baz4(_a) { var _a = { x: 10 }; } + + +//// [declarationEmitDestructuring4.d.ts] +declare function baz([]: any[]): void; +declare function baz1([]?: number[]): void; +declare function baz2([[]]?: [number[]]): void; +declare function baz3({}: {}): void; +declare function baz4({}?: { + x: number; +}): void; diff --git a/tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js b/tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js index cac419605ba..662b4625ec8 100644 --- a/tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js +++ b/tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js @@ -17,3 +17,15 @@ var _f = [], a11 = _f[0], b11 = _f[1], c11 = _f[2]; var _g = [1, ["hello", { x12: 5, y12: true }]], a2 = _g[0], _h = _g[1], _j = _h === void 0 ? ["abc", { x12: 10, y12: false }] : _h, b2 = _j[0], _k = _j[1], x12 = _k.x12, c2 = _k.y12; var _l = [1, "hello"], x13 = _l[0], y13 = _l[1]; var _m = [[x13, y13], { x: x13, y: y13 }], a3 = _m[0], b3 = _m[1]; + + +//// [declarationEmitDestructuringArrayPattern2.d.ts] +declare var x10: number, y10: string, z10: boolean; +declare var x11: number, y11: string; +declare var a11: any, b11: any, c11: any; +declare var a2: number, b2: string, x12: number, c2: boolean; +declare var x13: number, y13: string; +declare var a3: (number | string)[], b3: { + x: number; + y: string; +}; diff --git a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.js b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.js index d102ad30173..38b0a14af5c 100644 --- a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.js +++ b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.js @@ -43,3 +43,22 @@ var m; _a = f15(), m.a4 = _a.a4, m.b4 = _a.b4, m.c4 = _a.c4; var _a; })(m || (m = {})); + + +//// [declarationEmitDestructuringObjectLiteralPattern.d.ts] +declare var x4: number; +declare var y5: string; +declare var x6: number, y6: string; +declare var a1: number; +declare var b1: string; +declare var a2: number, b2: string; +declare var x11: number, y11: string, z11: boolean; +declare function f15(): { + a4: string; + b4: number; + c4: boolean; +}; +declare var a4: string, b4: number, c4: boolean; +declare module m { + var a4: string, b4: number, c4: boolean; +} diff --git a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern1.js b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern1.js index 2c7cf979c9c..264e56fe58c 100644 --- a/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern1.js +++ b/tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern1.js @@ -16,3 +16,12 @@ var _b = { x6: 5, y6: "hello" }, x6 = _b.x6, y6 = _b.y6; var a1 = { x7: 5, y7: "hello" }.x7; var b1 = { x8: 5, y8: "hello" }.y8; var _c = { x9: 5, y9: "hello" }, a2 = _c.x9, b2 = _c.y9; + + +//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts] +declare var x4: number; +declare var y5: string; +declare var x6: number, y6: string; +declare var a1: number; +declare var b1: string; +declare var a2: number, b2: string; diff --git a/tests/baselines/reference/declarationEmitDestructuringParameterProperties.js b/tests/baselines/reference/declarationEmitDestructuringParameterProperties.js index 9fc1943eae6..a98620c8529 100644 --- a/tests/baselines/reference/declarationEmitDestructuringParameterProperties.js +++ b/tests/baselines/reference/declarationEmitDestructuringParameterProperties.js @@ -38,3 +38,24 @@ var C3 = (function () { } return C3; })(); + + +//// [declarationEmitDestructuringParameterProperties.d.ts] +declare class C1 { + x: string, y: string, z: string; + constructor([x, y, z]: string[]); +} +declare type TupleType1 = [string, number, boolean]; +declare class C2 { + x: string, y: number, z: boolean; + constructor([x, y, z]: TupleType1); +} +declare type ObjType1 = { + x: number; + y: string; + z: boolean; +}; +declare class C3 { + x: number, y: string, z: boolean; + constructor({x, y, z}: ObjType1); +} diff --git a/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.js b/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.js index ab42602a035..5c7f4d2cec5 100644 --- a/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.js +++ b/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.js @@ -11,3 +11,12 @@ function foo(_a) { function foo1(_a) { var x = _a.x, y = _a.y, z = _a.z; } + + +//// [declarationEmitDestructuringWithOptionalBindingParameters.d.ts] +declare function foo([x, y, z]?: [string, number, boolean]): void; +declare function foo1({x, y, z}?: { + x: string; + y: number; + z: boolean; +}): void; diff --git a/tests/baselines/reference/declarationEmit_invalidReference2.js b/tests/baselines/reference/declarationEmit_invalidReference2.js index 0f8d5d4c07d..78fb232cca7 100644 --- a/tests/baselines/reference/declarationEmit_invalidReference2.js +++ b/tests/baselines/reference/declarationEmit_invalidReference2.js @@ -5,3 +5,7 @@ var x = 0; //// [declarationEmit_invalidReference2.js] /// var x = 0; + + +//// [declarationEmit_invalidReference2.d.ts] +declare var x: number; diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js index bdb7a1148f0..a2509ea97f4 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js @@ -75,3 +75,36 @@ var v = 3; var Foo; (function (Foo) { })(Foo || (Foo = {})); + + +//// [file1.d.ts] +interface I { +} +declare class C1 { +} +declare class C2 { +} +declare function f(): void; +declare var v: number; +declare class Foo { + static x: number; +} +declare module N { + module F { + } +} +//// [file2.d.ts] +declare class I { +} +interface C1 { +} +declare function C2(): void; +declare class f { +} +declare var v: number; +declare module Foo { + var x: number; +} +declare module N { + function F(): any; +} diff --git a/tests/baselines/reference/emptyObjectBindingPatternParameter04.js b/tests/baselines/reference/emptyObjectBindingPatternParameter04.js index d9b0e6bc402..8c128bb806e 100644 --- a/tests/baselines/reference/emptyObjectBindingPatternParameter04.js +++ b/tests/baselines/reference/emptyObjectBindingPatternParameter04.js @@ -9,3 +9,11 @@ function f(_a) { var _a = { a: 1, b: "2", c: true }; var x, y, z; } + + +//// [emptyObjectBindingPatternParameter04.d.ts] +declare function f({}?: { + a: number; + b: string; + c: boolean; +}): void; diff --git a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES5.js b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES5.js index 9b26893b424..7710b5e26c1 100644 --- a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES5.js +++ b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES5.js @@ -19,3 +19,6 @@ var _e = void 0; var _f = void 0; })(); + + +//// [emptyVariableDeclarationBindingPatterns02_ES5.d.ts] diff --git a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES6.js b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES6.js index 9fbdd269912..8b2df68ed70 100644 --- a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES6.js +++ b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns02_ES6.js @@ -19,3 +19,6 @@ let []; const []; })(); + + +//// [emptyVariableDeclarationBindingPatterns02_ES6.d.ts] diff --git a/tests/baselines/reference/es5ExportEquals.js b/tests/baselines/reference/es5ExportEquals.js index d3929792409..88d1da4201d 100644 --- a/tests/baselines/reference/es5ExportEquals.js +++ b/tests/baselines/reference/es5ExportEquals.js @@ -9,3 +9,8 @@ export = f; function f() { } exports.f = f; module.exports = f; + + +//// [es5ExportEquals.d.ts] +export declare function f(): void; +export = f; diff --git a/tests/baselines/reference/es6ExportEquals.js b/tests/baselines/reference/es6ExportEquals.js index ba838296f9d..e4cf13758ff 100644 --- a/tests/baselines/reference/es6ExportEquals.js +++ b/tests/baselines/reference/es6ExportEquals.js @@ -7,3 +7,8 @@ export = f; //// [es6ExportEquals.js] export function f() { } + + +//// [es6ExportEquals.d.ts] +export declare function f(): void; +export = f; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js index a733eba1045..755af6f4fdb 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js @@ -41,3 +41,4 @@ var x1 = defaultBinding6; //// [es6ImportDefaultBindingFollowedWithNamedImport1_0.d.ts] declare var a: number; export default a; +//// [es6ImportDefaultBindingFollowedWithNamedImport1_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js index 53f701cb0c1..7eda76622de 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js @@ -42,3 +42,4 @@ var x = es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0_6.default; //// [es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0.d.ts] declare var a: number; export default a; +//// [es6ImportDefaultBindingFollowedWithNamedImport1InEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js index c724eade06c..b83571066f0 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js @@ -42,3 +42,10 @@ exports.x1 = server_6.default; //// [server.d.ts] declare var a: number; export default a; +//// [client.d.ts] +export declare var x1: number; +export declare var x1: number; +export declare var x1: number; +export declare var x1: number; +export declare var x1: number; +export declare var x1: number; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js index 1dc0013ecbe..9314190e786 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js @@ -88,3 +88,15 @@ export declare class a12 { } export declare class x11 { } +//// [client.d.ts] +import { a } from "./server"; +export declare var x1: a; +import { a11 as b } from "./server"; +export declare var x2: b; +import { x, a12 as y } from "./server"; +export declare var x4: x; +export declare var x5: y; +import { x11 as z } from "./server"; +export declare var x3: z; +import { m } from "./server"; +export declare var x6: m; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js index 3451176bdb2..71d35fd85a1 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js @@ -46,3 +46,11 @@ exports.x6 = new server_6.default(); declare class a { } export default a; +//// [client.d.ts] +import defaultBinding1 from "./server"; +export declare var x1: defaultBinding1; +export declare var x2: defaultBinding1; +export declare var x3: defaultBinding1; +export declare var x4: defaultBinding1; +export declare var x5: defaultBinding1; +export declare var x6: defaultBinding1; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js index d4b1b45d5a7..9674f8c12f4 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js @@ -43,3 +43,4 @@ var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_5.m; export declare var a: number; export declare var x: number; export declare var m: number; +//// [es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js index 2d8be87a3d1..b7da05d7dbb 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js @@ -47,3 +47,10 @@ export declare var x: number; export declare var m: number; declare var _default: {}; export default _default; +//// [client.d.ts] +export declare var x1: number; +export declare var x1: number; +export declare var x1: number; +export declare var x1: number; +export declare var x1: number; +export declare var x1: number; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js index f6607da3397..2b24fda0755 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js @@ -17,3 +17,4 @@ var x = nameSpaceBinding.a; //// [es6ImportDefaultBindingFollowedWithNamespaceBinding_0.d.ts] export declare var a: number; +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js index caeaa76ab4a..a032325fbb4 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js @@ -25,3 +25,5 @@ define(["require", "exports", "server"], function (require, exports, server_1) { //// [server.d.ts] declare var a: number; export default a; +//// [client.d.ts] +export declare var x: number; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js index 86514091f6c..93918f6171a 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js @@ -23,3 +23,6 @@ exports.x = new nameSpaceBinding.a(); //// [server.d.ts] export declare class a { } +//// [client.d.ts] +import * as nameSpaceBinding from "./server"; +export declare var x: nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js index 35811288691..49717c588b7 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js @@ -17,3 +17,4 @@ var x = nameSpaceBinding.a; //// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.d.ts] export declare var a: number; +//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js index 9a02028e431..dec9b8cfebe 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js @@ -17,3 +17,5 @@ exports.x = nameSpaceBinding.a; //// [server.d.ts] export declare var a: number; +//// [client.d.ts] +export declare var x: number; diff --git a/tests/baselines/reference/es6ImportDefaultBindingInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingInEs5.js index 4420397ac61..34323b2752b 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingInEs5.js @@ -17,3 +17,4 @@ module.exports = a; //// [es6ImportDefaultBindingInEs5_0.d.ts] declare var a: number; export = a; +//// [es6ImportDefaultBindingInEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingWithExport.js index c3a7315929d..2fb7f0644b9 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingWithExport.js @@ -25,3 +25,5 @@ define(["require", "exports", "server"], function (require, exports, server_1) { //// [server.d.ts] declare var a: number; export default a; +//// [client.d.ts] +export declare var x: number; diff --git a/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js b/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js index 9da18ee7d0c..84f6936d4b0 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js @@ -22,3 +22,5 @@ define(["require", "exports", "server"], function (require, exports, nameSpaceBi //// [server.d.ts] export declare var a: number; +//// [client.d.ts] +export declare var x: number; diff --git a/tests/baselines/reference/es6ImportNamedImportWithExport.js b/tests/baselines/reference/es6ImportNamedImportWithExport.js index d51e677381a..5175554f0f9 100644 --- a/tests/baselines/reference/es6ImportNamedImportWithExport.js +++ b/tests/baselines/reference/es6ImportNamedImportWithExport.js @@ -82,3 +82,16 @@ export declare var x1: number; export declare var z1: number; export declare var z2: number; export declare var aaaa: number; +//// [client.d.ts] +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var z111: number; +export declare var z2: number; diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js b/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js index 0089dd2b3df..208f71bcbfe 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js +++ b/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js @@ -15,3 +15,5 @@ require("server"); //// [server.d.ts] export declare var a: number; +//// [client.d.ts] +export import "server"; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index bcfb7d8347d..4a1ee9b739f 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -56,3 +56,20 @@ var Bbb; __export(require()); // this line causes the nullref })(Bbb || (Bbb = {})); var a; + + +//// [exportDeclarationInInternalModule.d.ts] +declare class Bbb { +} +declare class Aaa extends Bbb { +} +declare module Aaa { + class SomeType { + } +} +declare module Bbb { + class SomeType { + } + export * from Aaa; +} +declare var a: Bbb.SomeType; diff --git a/tests/baselines/reference/exportStarFromEmptyModule.js b/tests/baselines/reference/exportStarFromEmptyModule.js index e6db992f8f8..d433e7b3682 100644 --- a/tests/baselines/reference/exportStarFromEmptyModule.js +++ b/tests/baselines/reference/exportStarFromEmptyModule.js @@ -56,3 +56,10 @@ export declare class A { static r: any; } //// [exportStarFromEmptyModule_module2.d.ts] +//// [exportStarFromEmptyModule_module3.d.ts] +export * from "./exportStarFromEmptyModule_module2"; +export * from "./exportStarFromEmptyModule_module1"; +export declare class A { + static q: any; +} +//// [exportStarFromEmptyModule_module4.d.ts] diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline index 88bc5c50727..396e220bdb6 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline @@ -1,6 +1,6 @@ -EmitSkipped: true -Diagnostics: - Type 'string' is not assignable to type 'number'. +EmitSkipped: false FileName : tests/cases/fourslash/inputFile.js var x = "hello world"; +FileName : tests/cases/fourslash/inputFile.d.ts +declare var x: number; diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline index 63747de55de..6a58015c1b3 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline @@ -1,10 +1,11 @@ -EmitSkipped: true -Diagnostics: - Type 'string' is not assignable to type 'boolean'. +EmitSkipped: false FileName : out.js // File to emit, does not contain semantic errors, but --out is passed // expected to not generate declarations because of the semantic errors in the other file var noErrors = true; // File not emitted, and contains semantic errors var semanticError = "string"; +FileName : out.d.ts +declare var noErrors: boolean; +declare var semanticError: boolean; diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index 096f1ecd600..46bdaf827d5 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -1107,3 +1107,307 @@ define(["require", "exports"], function (require, exports) { })(eM = exports.eM || (exports.eM = {})); ; }); + + +//// [giant.d.ts] +export declare var eV: any; +export declare function eF(): void; +export declare class eC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF(); + pgF(): void; + pgF: any; + psF(param: any): void; + psF: any; + private rgF(); + private rgF; + private rsF(param); + private rsF; + static tV: any; + static tF(): void; + static tsF(param: any): void; + static tsF: any; + static tgF(): void; + static tgF: any; +} +export interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; +} +export declare module eM { + var eV: any; + function eF(): void; + class eC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF(); + pgF(): void; + pgF: any; + psF(param: any): void; + psF: any; + private rgF(); + private rgF; + private rsF(param); + private rsF; + static tV: any; + static tF(): void; + static tsF(param: any): void; + static tsF: any; + static tgF(): void; + static tgF: any; + } + interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + module eM { + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + module eM { + } + var eaV: any; + function eaF(): void; + class eaC { + } + module eaM { + } + } + var eaV: any; + function eaF(): void; + class eaC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF(); + pgF(): void; + pgF: any; + psF(param: any): void; + psF: any; + private rgF(); + private rgF; + private rsF(param); + private rsF; + static tV: any; + static tF(): void; + static tsF(param: any): void; + static tsF: any; + static tgF(): void; + static tgF: any; + } + module eaM { + var V: any; + function F(): void; + class C { + } + interface I { + } + module M { + } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + module eM { + } + } +} +export declare var eaV: any; +export declare function eaF(): void; +export declare class eaC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF(); + pgF(): void; + pgF: any; + psF(param: any): void; + psF: any; + private rgF(); + private rgF; + private rsF(param); + private rsF; + static tV: any; + static tF(): void; + static tsF(param: any): void; + static tsF: any; + static tgF(): void; + static tgF: any; +} +export declare module eaM { + var V: any; + function F(): void; + class C { + constructor(); + pV: any; + private rV; + pF(): void; + static tV: any; + static tF(): void; + } + interface I { + (): any; + (): number; + (p: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + module M { + var V: any; + function F(): void; + class C { + } + interface I { + } + module M { + } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + module eM { + } + var eaV: any; + function eaF(): void; + class eaC { + } + module eaM { + } + } + var eV: any; + function eF(): void; + class eC { + constructor(); + pV: any; + private rV; + pF(): void; + static tV: any; + static tF(): void; + } + interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + module eM { + var V: any; + function F(): void; + class C { + } + module M { + } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + module eM { + } + } +} diff --git a/tests/baselines/reference/isolatedModulesDeclaration.js b/tests/baselines/reference/isolatedModulesDeclaration.js index 4a24f0e201f..bb3e560a2f8 100644 --- a/tests/baselines/reference/isolatedModulesDeclaration.js +++ b/tests/baselines/reference/isolatedModulesDeclaration.js @@ -4,3 +4,7 @@ export var x; //// [file1.js] export var x; + + +//// [file1.d.ts] +export declare var x: any; diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js index 2392b461ebf..9b644509361 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js @@ -18,3 +18,6 @@ function foo() { function foo() { return 30; } + + +//// [out.d.ts] diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js index 807cdbf0925..d7965e91be1 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js @@ -19,3 +19,6 @@ function foo() { function foo() { return 10; } + + +//// [out.d.ts] diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js index aab4ba6af81..7b2643c13d3 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js @@ -9,3 +9,8 @@ var x = 10; // Error reported so no declaration file generated? //// [out.js] var x = "hello"; var x = 10; // Error reported so no declaration file generated? + + +//// [out.d.ts] +declare var x: string; +declare var x: string; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js index fc8c7b44165..07d6fb812c0 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js @@ -25,3 +25,13 @@ var c = (function () { // error on above reference path when emitting declarations function foo() { } + + +//// [a.d.ts] +declare class c { +} +//// [c.d.ts] +declare function bar(): void; +//// [b.d.ts] +/// +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js index 87fccf56d50..641a89c1c50 100644 --- a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js @@ -13,3 +13,8 @@ var b = 30; a = 10; var a = 10; b = 30; + + +//// [out.d.ts] +declare let b: number; +declare let a: number; diff --git a/tests/baselines/reference/letAsIdentifier.js b/tests/baselines/reference/letAsIdentifier.js index 9e0bce41c83..05811ce1088 100644 --- a/tests/baselines/reference/letAsIdentifier.js +++ b/tests/baselines/reference/letAsIdentifier.js @@ -11,3 +11,9 @@ var let = 10; var a = 10; let = 30; var a; + + +//// [letAsIdentifier.d.ts] +declare var let: number; +declare var a: number; +declare let a: any; diff --git a/tests/baselines/reference/out-flag3.js b/tests/baselines/reference/out-flag3.js index 3ec03ecc841..8327c3429d3 100644 --- a/tests/baselines/reference/out-flag3.js +++ b/tests/baselines/reference/out-flag3.js @@ -21,4 +21,10 @@ var B = (function () { } return B; })(); -//# sourceMappingURL=c.js.map \ No newline at end of file +//# sourceMappingURL=c.js.map + +//// [c.d.ts] +declare class A { +} +declare class B { +} diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json index 591a855b5c9..36eed6a6518 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json @@ -9,6 +9,7 @@ "DifferentNamesSpecified/a.ts" ], "emittedFiles": [ - "test.js" + "test.js", + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json index 591a855b5c9..36eed6a6518 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json @@ -9,6 +9,7 @@ "DifferentNamesSpecified/a.ts" ], "emittedFiles": [ - "test.js" + "test.js", + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts new file mode 100644 index 00000000000..4c0b8989316 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/FolderC/fileC.d.ts b/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/FolderC/fileC.d.ts new file mode 100644 index 00000000000..8147620b211 --- /dev/null +++ b/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/FolderC/fileC.d.ts @@ -0,0 +1,2 @@ +declare class C { +} diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/fileB.d.ts b/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/fileB.d.ts new file mode 100644 index 00000000000..4ff813c3839 --- /dev/null +++ b/tests/baselines/reference/project/rootDirectoryErrors/amd/outdir/simple/fileB.d.ts @@ -0,0 +1,4 @@ +/// +declare class B { + c: C; +} diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json index 14f15bd6fdb..42f348a4b56 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json +++ b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json @@ -15,6 +15,8 @@ ], "emittedFiles": [ "outdir/simple/FolderC/fileC.js", - "outdir/simple/fileB.js" + "outdir/simple/FolderC/fileC.d.ts", + "outdir/simple/fileB.js", + "outdir/simple/fileB.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/FolderC/fileC.d.ts b/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/FolderC/fileC.d.ts new file mode 100644 index 00000000000..8147620b211 --- /dev/null +++ b/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/FolderC/fileC.d.ts @@ -0,0 +1,2 @@ +declare class C { +} diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/fileB.d.ts b/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/fileB.d.ts new file mode 100644 index 00000000000..4ff813c3839 --- /dev/null +++ b/tests/baselines/reference/project/rootDirectoryErrors/node/outdir/simple/fileB.d.ts @@ -0,0 +1,4 @@ +/// +declare class B { + c: C; +} diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json index 14f15bd6fdb..42f348a4b56 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json +++ b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json @@ -15,6 +15,8 @@ ], "emittedFiles": [ "outdir/simple/FolderC/fileC.js", - "outdir/simple/fileB.js" + "outdir/simple/FolderC/fileC.d.ts", + "outdir/simple/fileB.js", + "outdir/simple/fileB.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/widenedTypes.js b/tests/baselines/reference/widenedTypes.js index 5d48d8f5636..a0ff6327f25 100644 --- a/tests/baselines/reference/widenedTypes.js +++ b/tests/baselines/reference/widenedTypes.js @@ -41,3 +41,17 @@ var ob = { x: "" }; // Highlights the difference between array literals and object literals var arr = [3, null]; // not assignable because null is not widened. BCT is {} var obj = { x: 3, y: null }; // assignable because null is widened, and therefore BCT is any + + +//// [widenedTypes.d.ts] +declare var t: number[]; +declare var x: typeof undefined; +declare var y: any; +declare var u: number[]; +declare var ob: { + x: typeof undefined; +}; +declare var arr: string[]; +declare var obj: { + [x: string]: string; +}; diff --git a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts index f94e15aee62..6ab8ab9ad07 100644 --- a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts +++ b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts @@ -16,7 +16,8 @@ verify.getSemanticDiagnostics('[]'); goTo.marker("2"); verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); verify.verifyGetEmitOutputContentsForCurrentFile([ - { fileName: "out.js", content: "function foo() { return 10; }\r\nfunction foo() { return 30; }\r\n" }]); + { fileName: "out.js", content: "function foo() { return 10; }\r\nfunction foo() { return 30; }\r\n" }, + { fileName: "out.d.ts", content: "" }]); goTo.marker("2"); verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); goTo.marker("1"); From 94a647b72b48609ce752f1f9fd72cd451e3d88cf Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 11:36:39 -0700 Subject: [PATCH 71/89] Do not emit declarations for javascript files --- src/compiler/declarationEmitter.ts | 20 ++++++++++++++----- src/compiler/emitter.ts | 2 +- src/compiler/program.ts | 2 +- src/compiler/utilities.ts | 2 +- .../jsFileCompilationDuplicateVariable.js | 1 - ...mpilationDuplicateVariableErrorReported.js | 1 - .../jsFileCompilationEmitDeclarations.js | 1 - ...ileCompilationEmitTrippleSlashReference.js | 2 -- ...onsWithJsFileReferenceWithNoOut.errors.txt | 2 +- ...eclarationsWithJsFileReferenceWithNoOut.js | 8 +++----- ...nDeclarationsWithJsFileReferenceWithOut.js | 1 - ...tionsWithJsFileReferenceWithOutDir.symbols | 16 +++++++++++++++ ...rationsWithJsFileReferenceWithOutDir.types | 16 +++++++++++++++ .../jsFileCompilationLetDeclarationOrder.js | 1 - .../jsFileCompilationLetDeclarationOrder2.js | 1 - .../amd/test.d.ts | 1 - .../node/test.d.ts | 1 - .../amd/test.d.ts | 1 - .../node/test.d.ts | 1 - ...eclarationsWithJsFileReferenceWithNoOut.ts | 2 +- ...clarationsWithJsFileReferenceWithOutDir.ts | 16 +++++++++++++++ 21 files changed, 71 insertions(+), 27 deletions(-) create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.symbols create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.types create mode 100644 tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index eb329c67b0b..89ab4027ed8 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -33,7 +33,9 @@ namespace ts { export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, targetSourceFile: SourceFile): Diagnostic[] { let diagnostics: Diagnostic[] = []; let { declarationFilePath } = getEmitFileNames(targetSourceFile, host); - emitDeclarations(host, resolver, diagnostics, declarationFilePath, targetSourceFile); + if (declarationFilePath) { + emitDeclarations(host, resolver, diagnostics, declarationFilePath, targetSourceFile); + } return diagnostics; } @@ -105,7 +107,7 @@ namespace ts { // Emit references corresponding to this file let emittedReferencedFiles: SourceFile[] = []; forEach(host.getSourceFiles(), sourceFile => { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { + if (!isExternalModuleOrDeclarationFile(sourceFile) && !isJavaScript(sourceFile.fileName)) { // Check what references need to be added if (!compilerOptions.noResolve) { forEach(sourceFile.referencedFiles, fileReference => { @@ -1590,9 +1592,17 @@ namespace ts { } function writeReferencePath(referencedFile: SourceFile) { - let declFileName = referencedFile.flags & NodeFlags.DeclarationFile - ? referencedFile.fileName // Declaration file, use declaration file name - : getEmitFileNames(referencedFile, host).declarationFilePath; // declaration file name + let declFileName: string; + if (referencedFile.flags & NodeFlags.DeclarationFile) { + // Declaration file, use declaration file name + declFileName = referencedFile.fileName; + } + else { + // declaration file name + let { declarationFilePath, jsFilePath } = getEmitFileNames(referencedFile, host); + Debug.assert(!!declarationFilePath || isJavaScript(referencedFile.fileName), "Declaration file is not present only for javascript files"); + declFileName = declarationFilePath || jsFilePath; + } declFileName = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizeSlashes(declarationFilePath)), diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 872c9c74bec..cd6525a6bc3 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -8158,7 +8158,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitJavaScript(jsFilePath, sourceMapFilePath, sourceFile); } - if (compilerOptions.declaration) { + if (declarationFilePath) { emitSkipped = writeDeclarationFile(declarationFilePath, sourceFile, host, resolver, diagnostics) || emitSkipped; } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index e569c69cccf..a191c9f3e1c 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1272,7 +1272,7 @@ namespace ts { if (sourceMapFilePath) { emitFilesSeen[sourceMapFilePath] = [file]; } - if (options.declaration) { + if (declarationFilePath) { emitFilesSeen[declarationFilePath] = [file]; } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 5fe6c8d38a6..d5c60805d70 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1797,7 +1797,7 @@ namespace ts { return { jsFilePath, sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), - declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) + declarationFilePath: !isJavaScript(sourceFile.fileName) ? getDeclarationEmitFilePath(jsFilePath, options) : undefined }; } else if (options.outFile || options.out) { diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.js b/tests/baselines/reference/jsFileCompilationDuplicateVariable.js index 3e3d0b9802a..a70637bc7c0 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateVariable.js +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariable.js @@ -13,4 +13,3 @@ var x = "hello"; // No error is recorded here and declaration file will show thi //// [out.d.ts] declare var x: number; -declare var x: number; diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js index 7b2643c13d3..fd9da7c7106 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js @@ -13,4 +13,3 @@ var x = 10; // Error reported so no declaration file generated? //// [out.d.ts] declare var x: string; -declare var x: string; diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.js b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js index c6711e4e85f..d45ae325b0a 100644 --- a/tests/baselines/reference/jsFileCompilationEmitDeclarations.js +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js @@ -22,4 +22,3 @@ function foo() { //// [out.d.ts] declare class c { } -declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js index 04f36213b1b..2d7d2743805 100644 --- a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js @@ -29,5 +29,3 @@ function foo() { //// [out.d.ts] declare class c { } -declare function bar(): void; -declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 9be6b3f1ccd..273717d151c 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -8,7 +8,7 @@ error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the ==== tests/cases/compiler/b.ts (0 errors) ==== /// - // error on above reference path when emitting declarations + // b.d.ts should have c.js as the reference path since we dont emit declarations for js files function foo() { } diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js index 07d6fb812c0..cf2caab3600 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js @@ -6,7 +6,7 @@ class c { //// [b.ts] /// -// error on above reference path when emitting declarations +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files function foo() { } @@ -22,7 +22,7 @@ var c = (function () { })(); //// [b.js] /// -// error on above reference path when emitting declarations +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files function foo() { } @@ -30,8 +30,6 @@ function foo() { //// [a.d.ts] declare class c { } -//// [c.d.ts] -declare function bar(): void; //// [b.d.ts] -/// +/// declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js index 0d1939d7208..67989f3e3e7 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js @@ -31,5 +31,4 @@ function foo() { //// [out.d.ts] declare class c { } -declare function bar(): void; declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.symbols b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.symbols new file mode 100644 index 00000000000..424fd85c165 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.ts === +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +>foo : Symbol(foo, Decl(b.ts, 0, 0)) +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : Symbol(bar, Decl(c.js, 0, 0)) +} diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.types b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.types new file mode 100644 index 00000000000..f8b82383ac4 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.types @@ -0,0 +1,16 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.ts === +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +>foo : () => void +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : () => void +} diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js index 15a1e8d7533..16e4b7a3011 100644 --- a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js @@ -17,5 +17,4 @@ a = 10; //// [out.d.ts] -declare let a: number; declare let b: number; diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js index 641a89c1c50..890b1c22f71 100644 --- a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js @@ -17,4 +17,3 @@ b = 30; //// [out.d.ts] declare let b: number; -declare let a: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts index bbae04a30bf..4c0b8989316 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts @@ -1,2 +1 @@ declare var test: number; -declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts index bbae04a30bf..4c0b8989316 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts @@ -1,2 +1 @@ declare var test: number; -declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts index bbae04a30bf..4c0b8989316 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts @@ -1,2 +1 @@ declare var test: number; -declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts index bbae04a30bf..4c0b8989316 100644 --- a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts @@ -1,2 +1 @@ declare var test: number; -declare var test2: number; diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts index 41d87d5f39b..1741e3c2802 100644 --- a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts @@ -6,7 +6,7 @@ class c { // @filename: b.ts /// -// error on above reference path when emitting declarations +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files function foo() { } diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts new file mode 100644 index 00000000000..64e009c2515 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts @@ -0,0 +1,16 @@ +// @allowJs: true +// @declaration: true +// @outDir: outDir +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file From daba9016194833bc1a222e15a3ce34e6b78aa0e3 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 11:50:07 -0700 Subject: [PATCH 72/89] Report error if --allowJs option is used along with --declaration --- src/compiler/program.ts | 3 ++ ...DuplicateFunctionImplementation.errors.txt | 2 + ...ImplementationFileOrderReversed.errors.txt | 2 + ...ileCompilationDuplicateVariable.errors.txt | 9 +++++ ...jsFileCompilationDuplicateVariable.symbols | 8 ---- .../jsFileCompilationDuplicateVariable.types | 10 ----- ...nDuplicateVariableErrorReported.errors.txt | 2 + ...FileCompilationEmitDeclarations.errors.txt | 12 ++++++ .../jsFileCompilationEmitDeclarations.symbols | 10 ----- .../jsFileCompilationEmitDeclarations.types | 10 ----- ...lationEmitTrippleSlashReference.errors.txt | 16 ++++++++ ...mpilationEmitTrippleSlashReference.symbols | 15 -------- ...CompilationEmitTrippleSlashReference.types | 15 -------- ...onsWithJsFileReferenceWithNoOut.errors.txt | 2 + ...tionsWithJsFileReferenceWithOut.errors.txt | 17 +++++++++ ...arationsWithJsFileReferenceWithOut.symbols | 16 -------- ...clarationsWithJsFileReferenceWithOut.types | 16 -------- ...nsWithJsFileReferenceWithOutDir.errors.txt | 17 +++++++++ ...clarationsWithJsFileReferenceWithOutDir.js | 38 +++++++++++++++++++ ...tionsWithJsFileReferenceWithOutDir.symbols | 16 -------- ...rationsWithJsFileReferenceWithOutDir.types | 16 -------- ...eCompilationLetDeclarationOrder.errors.txt | 12 ++++++ ...FileCompilationLetDeclarationOrder.symbols | 14 ------- ...jsFileCompilationLetDeclarationOrder.types | 20 ---------- ...CompilationLetDeclarationOrder2.errors.txt | 2 + ...entNamesNotSpecifiedWithAllowJs.errors.txt | 8 ++++ ...entNamesNotSpecifiedWithAllowJs.errors.txt | 8 ++++ ...ferentNamesSpecifiedWithAllowJs.errors.txt | 8 ++++ ...ferentNamesSpecifiedWithAllowJs.errors.txt | 8 ++++ ...SameNameDTsSpecifiedWithAllowJs.errors.txt | 6 +++ ...SameNameDTsSpecifiedWithAllowJs.errors.txt | 6 +++ ...eNameDtsNotSpecifiedWithAllowJs.errors.txt | 6 +++ ...eNameDtsNotSpecifiedWithAllowJs.errors.txt | 6 +++ ...ameFilesNotSpecifiedWithAllowJs.errors.txt | 6 +++ ...ameFilesNotSpecifiedWithAllowJs.errors.txt | 6 +++ ...meNameFilesSpecifiedWithAllowJs.errors.txt | 6 +++ ...meNameFilesSpecifiedWithAllowJs.errors.txt | 6 +++ 37 files changed, 214 insertions(+), 166 deletions(-) create mode 100644 tests/baselines/reference/jsFileCompilationDuplicateVariable.errors.txt delete mode 100644 tests/baselines/reference/jsFileCompilationDuplicateVariable.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationDuplicateVariable.types create mode 100644 tests/baselines/reference/jsFileCompilationEmitDeclarations.errors.txt delete mode 100644 tests/baselines/reference/jsFileCompilationEmitDeclarations.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationEmitDeclarations.types create mode 100644 tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.errors.txt delete mode 100644 tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.types create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt delete mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.types create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js delete mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.types create mode 100644 tests/baselines/reference/jsFileCompilationLetDeclarationOrder.errors.txt delete mode 100644 tests/baselines/reference/jsFileCompilationLetDeclarationOrder.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationLetDeclarationOrder.types create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt create mode 100644 tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a191c9f3e1c..a029a481d19 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1252,6 +1252,9 @@ namespace ts { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "declaration")); } } + else if (options.allowJs && options.declaration) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration")); + } if (options.emitDecoratorMetadata && !options.experimentalDecorators) { diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt index fb0c214ddf6..b05fc6fa6d9 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt @@ -1,6 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. tests/cases/compiler/a.ts(1,10): error TS2393: Duplicate function implementation. +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. ==== tests/cases/compiler/b.js (0 errors) ==== function foo() { return 10; diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt index 78eb22546e8..82dbc27db0f 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt @@ -1,6 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. tests/cases/compiler/a.ts(1,10): error TS2393: Duplicate function implementation. +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. ==== tests/cases/compiler/a.ts (1 errors) ==== function foo() { ~~~ diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateVariable.errors.txt new file mode 100644 index 00000000000..f8ae4a1ba74 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariable.errors.txt @@ -0,0 +1,9 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + var x = 10; + +==== tests/cases/compiler/b.js (0 errors) ==== + var x = "hello"; // No error is recorded here and declaration file will show this as number \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.symbols b/tests/baselines/reference/jsFileCompilationDuplicateVariable.symbols deleted file mode 100644 index 9bfc61a64f8..00000000000 --- a/tests/baselines/reference/jsFileCompilationDuplicateVariable.symbols +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/compiler/a.ts === -var x = 10; ->x : Symbol(x, Decl(a.ts, 0, 3), Decl(b.js, 0, 3)) - -=== tests/cases/compiler/b.js === -var x = "hello"; // No error is recorded here and declaration file will show this as number ->x : Symbol(x, Decl(a.ts, 0, 3), Decl(b.js, 0, 3)) - diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.types b/tests/baselines/reference/jsFileCompilationDuplicateVariable.types deleted file mode 100644 index fefad3f6dda..00000000000 --- a/tests/baselines/reference/jsFileCompilationDuplicateVariable.types +++ /dev/null @@ -1,10 +0,0 @@ -=== tests/cases/compiler/a.ts === -var x = 10; ->x : number ->10 : number - -=== tests/cases/compiler/b.js === -var x = "hello"; // No error is recorded here and declaration file will show this as number ->x : number ->"hello" : string - diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt index a3abc114118..f1374d95767 100644 --- a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt @@ -1,6 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. tests/cases/compiler/a.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'. +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. ==== tests/cases/compiler/b.js (0 errors) ==== var x = "hello"; diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.errors.txt b/tests/baselines/reference/jsFileCompilationEmitDeclarations.errors.txt new file mode 100644 index 00000000000..3e89f9c9436 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.errors.txt @@ -0,0 +1,12 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.symbols b/tests/baselines/reference/jsFileCompilationEmitDeclarations.symbols deleted file mode 100644 index 5260b8d6cf3..00000000000 --- a/tests/baselines/reference/jsFileCompilationEmitDeclarations.symbols +++ /dev/null @@ -1,10 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : Symbol(c, Decl(a.ts, 0, 0)) -} - -=== tests/cases/compiler/b.js === -function foo() { ->foo : Symbol(foo, Decl(b.js, 0, 0)) -} - diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.types b/tests/baselines/reference/jsFileCompilationEmitDeclarations.types deleted file mode 100644 index dce83eeb8eb..00000000000 --- a/tests/baselines/reference/jsFileCompilationEmitDeclarations.types +++ /dev/null @@ -1,10 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : c -} - -=== tests/cases/compiler/b.js === -function foo() { ->foo : () => void -} - diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.errors.txt b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.errors.txt new file mode 100644 index 00000000000..0cefa2eedac --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.errors.txt @@ -0,0 +1,16 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + /// + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.symbols b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.symbols deleted file mode 100644 index 805d202a14c..00000000000 --- a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.symbols +++ /dev/null @@ -1,15 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : Symbol(c, Decl(a.ts, 0, 0)) -} - -=== tests/cases/compiler/b.js === -/// -function foo() { ->foo : Symbol(foo, Decl(b.js, 0, 0)) -} - -=== tests/cases/compiler/c.js === -function bar() { ->bar : Symbol(bar, Decl(c.js, 0, 0)) -} diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.types b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.types deleted file mode 100644 index b206a486351..00000000000 --- a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.types +++ /dev/null @@ -1,15 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : c -} - -=== tests/cases/compiler/b.js === -/// -function foo() { ->foo : () => void -} - -=== tests/cases/compiler/c.js === -function bar() { ->bar : () => void -} diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 273717d151c..433a3c6b7be 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -1,6 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. !!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt new file mode 100644 index 00000000000..44151401479 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt @@ -0,0 +1,17 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + /// + // error on above reference when emitting declarations + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.symbols b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.symbols deleted file mode 100644 index 544fe53f425..00000000000 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.symbols +++ /dev/null @@ -1,16 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : Symbol(c, Decl(a.ts, 0, 0)) -} - -=== tests/cases/compiler/b.ts === -/// -// error on above reference when emitting declarations -function foo() { ->foo : Symbol(foo, Decl(b.ts, 0, 0)) -} - -=== tests/cases/compiler/c.js === -function bar() { ->bar : Symbol(bar, Decl(c.js, 0, 0)) -} diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.types b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.types deleted file mode 100644 index 8aafb9f61d0..00000000000 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.types +++ /dev/null @@ -1,16 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : c -} - -=== tests/cases/compiler/b.ts === -/// -// error on above reference when emitting declarations -function foo() { ->foo : () => void -} - -=== tests/cases/compiler/c.js === -function bar() { ->bar : () => void -} diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.errors.txt new file mode 100644 index 00000000000..fb6c801b42e --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.errors.txt @@ -0,0 +1,17 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + /// + // b.d.ts should have c.js as the reference path since we dont emit declarations for js files + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js new file mode 100644 index 00000000000..afed8cd42e3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//// [c.js] +function bar() { +} +//// [b.js] +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + + +//// [a.d.ts] +declare class c { +} +//// [b.d.ts] +/// +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.symbols b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.symbols deleted file mode 100644 index 424fd85c165..00000000000 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.symbols +++ /dev/null @@ -1,16 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : Symbol(c, Decl(a.ts, 0, 0)) -} - -=== tests/cases/compiler/b.ts === -/// -// b.d.ts should have c.js as the reference path since we dont emit declarations for js files -function foo() { ->foo : Symbol(foo, Decl(b.ts, 0, 0)) -} - -=== tests/cases/compiler/c.js === -function bar() { ->bar : Symbol(bar, Decl(c.js, 0, 0)) -} diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.types b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.types deleted file mode 100644 index f8b82383ac4..00000000000 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.types +++ /dev/null @@ -1,16 +0,0 @@ -=== tests/cases/compiler/a.ts === -class c { ->c : c -} - -=== tests/cases/compiler/b.ts === -/// -// b.d.ts should have c.js as the reference path since we dont emit declarations for js files -function foo() { ->foo : () => void -} - -=== tests/cases/compiler/c.js === -function bar() { ->bar : () => void -} diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.errors.txt b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.errors.txt new file mode 100644 index 00000000000..20a9c81ea9c --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.errors.txt @@ -0,0 +1,12 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/b.js (0 errors) ==== + let a = 10; + b = 30; + +==== tests/cases/compiler/a.ts (0 errors) ==== + let b = 30; + a = 10; + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.symbols b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.symbols deleted file mode 100644 index c1e97340dc9..00000000000 --- a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.symbols +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/compiler/b.js === -let a = 10; ->a : Symbol(a, Decl(b.js, 0, 3)) - -b = 30; ->b : Symbol(b, Decl(a.ts, 0, 3)) - -=== tests/cases/compiler/a.ts === -let b = 30; ->b : Symbol(b, Decl(a.ts, 0, 3)) - -a = 10; ->a : Symbol(a, Decl(b.js, 0, 3)) - diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.types b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.types deleted file mode 100644 index a28c62813de..00000000000 --- a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.types +++ /dev/null @@ -1,20 +0,0 @@ -=== tests/cases/compiler/b.js === -let a = 10; ->a : number ->10 : number - -b = 30; ->b = 30 : number ->b : number ->30 : number - -=== tests/cases/compiler/a.ts === -let b = 30; ->b : number ->30 : number - -a = 10; ->a = 10 : number ->a : number ->10 : number - diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt index fb213ec4433..b88c73e0439 100644 --- a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt @@ -1,6 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. tests/cases/compiler/a.ts(2,1): error TS2448: Block-scoped variable 'a' used before its declaration. +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. ==== tests/cases/compiler/a.ts (1 errors) ==== let b = 30; a = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..67b0592c05f --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== DifferentNamesNotSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; +==== DifferentNamesNotSpecifiedWithAllowJs/b.js (0 errors) ==== + var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..67b0592c05f --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== DifferentNamesNotSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; +==== DifferentNamesNotSpecifiedWithAllowJs/b.js (0 errors) ==== + var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..35c913a5835 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== DifferentNamesSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; +==== DifferentNamesSpecifiedWithAllowJs/b.js (0 errors) ==== + var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..35c913a5835 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== DifferentNamesSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; +==== DifferentNamesSpecifiedWithAllowJs/b.js (0 errors) ==== + var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..cdec4ffb398 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameDTsSpecifiedWithAllowJs/a.d.ts (0 errors) ==== + declare var test: number; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..cdec4ffb398 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameDTsSpecifiedWithAllowJs/a.d.ts (0 errors) ==== + declare var test: number; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..8da5b629ca8 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameDTsNotSpecifiedWithAllowJs/a.d.ts (0 errors) ==== + declare var a: number; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..8da5b629ca8 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameDTsNotSpecifiedWithAllowJs/a.d.ts (0 errors) ==== + declare var a: number; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..9eb81a5f9f1 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameFilesNotSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..9eb81a5f9f1 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameFilesNotSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..ddfb63686b4 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameTsSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt new file mode 100644 index 00000000000..ddfb63686b4 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameTsSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file From 6ea74ae7f1ee00d49012ef8f65934ecb3b526631 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 11:56:44 -0700 Subject: [PATCH 73/89] Update the error messages as per PR feedback --- src/compiler/diagnosticMessages.json | 4 ++-- src/compiler/program.ts | 6 +++--- ...leOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline | 2 +- .../reference/declarationFileOverwriteError.errors.txt | 4 ++-- .../declarationFileOverwriteErrorWithOut.errors.txt | 4 ++-- .../reference/filesEmittingIntoSameOutput.errors.txt | 4 ++-- .../filesEmittingIntoSameOutputWithOutOption.errors.txt | 4 ++-- ...sFileCompilationAmbientVarDeclarationSyntax.errors.txt | 4 ++-- .../reference/jsFileCompilationDecoratorSyntax.errors.txt | 4 ++-- .../jsFileCompilationEmitBlockedCorrectly.errors.txt | 8 ++++---- .../reference/jsFileCompilationEnumSyntax.errors.txt | 4 ++-- ...rOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt | 4 ++-- .../jsFileCompilationExportAssignmentSyntax.errors.txt | 4 ++-- ...sFileCompilationHeritageClauseSyntaxOfClass.errors.txt | 4 ++-- .../jsFileCompilationImportEqualsSyntax.errors.txt | 4 ++-- .../reference/jsFileCompilationInterfaceSyntax.errors.txt | 4 ++-- .../reference/jsFileCompilationModuleSyntax.errors.txt | 4 ++-- ...outDeclarationsWithJsFileReferenceWithNoOut.errors.txt | 4 ++-- .../jsFileCompilationOptionalParameter.errors.txt | 4 ++-- .../jsFileCompilationPropertySyntaxOfClass.errors.txt | 4 ++-- .../jsFileCompilationPublicMethodSyntaxOfClass.errors.txt | 4 ++-- .../jsFileCompilationPublicParameterModifier.errors.txt | 4 ++-- ...jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt | 4 ++-- .../reference/jsFileCompilationSyntaxError.errors.txt | 4 ++-- .../reference/jsFileCompilationTypeAliasSyntax.errors.txt | 4 ++-- .../jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt | 4 ++-- .../reference/jsFileCompilationTypeAssertions.errors.txt | 4 ++-- .../reference/jsFileCompilationTypeOfParameter.errors.txt | 4 ++-- ...jsFileCompilationTypeParameterSyntaxOfClass.errors.txt | 4 ++-- ...ileCompilationTypeParameterSyntaxOfFunction.errors.txt | 4 ++-- .../reference/jsFileCompilationTypeSyntaxOfVar.errors.txt | 4 ++-- ...mpilationWithDeclarationEmitPathSameAsInput.errors.txt | 4 ++-- .../jsFileCompilationWithJsEmitPathSameAsInput.errors.txt | 8 ++++---- .../reference/jsFileCompilationWithMapFileAsJs.errors.txt | 4 ++-- ...mpilationWithMapFileAsJsWithInlineSourceMap.errors.txt | 4 ++-- ...WithOutDeclarationFileNameSameAsInputJsFile.errors.txt | 4 ++-- ...CompilationWithOutFileNameSameAsInputJsFile.errors.txt | 4 ++-- .../reference/jsFileCompilationWithoutOut.errors.txt | 4 ++-- 38 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 5b57556af00..6cb5858f8ee 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2060,11 +2060,11 @@ "category": "Error", "code": 5054 }, - "Cannot write file '{0}' which is one of the input files.": { + "Cannot write file '{0}' because it would overwrite input file.": { "category": "Error", "code": 5055 }, - "Cannot write file '{0}' since one or more input files would emit into it.": { + "Cannot write file '{0}' because it would be overwritten by multiple input files.": { "category": "Error", "code": 5056 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a029a481d19..0fab35dacb3 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1289,20 +1289,20 @@ namespace ts { forEachKey(emitFilesSeen, emitFilePath => { // Report error if the output overwrites input file if (hasFile(files, emitFilePath)) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_which_is_one_of_the_input_files); + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file); } // Report error if multiple files write into same file (except if specified by --out or --outFile) if (emitFilePath !== (options.outFile || options.out)) { // Not --out or --outFile emit, There should be single file emitting to this file if (emitFilesSeen[emitFilePath].length > 1) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_since_one_or_more_input_files_would_emit_into_it); + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); } } else { // --out or --outFile, error if there exist file emitting to single file colliding with --out if (forEach(emitFilesSeen[emitFilePath], sourceFile => shouldEmitToOwnFile(sourceFile, options))) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_since_one_or_more_input_files_would_emit_into_it); + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); } } }); diff --git a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline index 5db889dc01d..f9bcca268ec 100644 --- a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline +++ b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline @@ -1,6 +1,6 @@ EmitSkipped: true Diagnostics: - Cannot write file 'tests/cases/fourslash/b.js' which is one of the input files. + Cannot write file 'tests/cases/fourslash/b.js' because it would overwrite input file. EmitSkipped: false FileName : tests/cases/fourslash/a.js diff --git a/tests/baselines/reference/declarationFileOverwriteError.errors.txt b/tests/baselines/reference/declarationFileOverwriteError.errors.txt index fbf4948c203..a12c60482e9 100644 --- a/tests/baselines/reference/declarationFileOverwriteError.errors.txt +++ b/tests/baselines/reference/declarationFileOverwriteError.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file. -!!! error TS5055: Cannot write file 'a.d.ts' which is one of the input files. +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. ==== tests/cases/compiler/a.d.ts (0 errors) ==== declare class c { diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt index b90bccbaf94..02251900345 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would overwrite input file. -!!! error TS5055: Cannot write file 'out.d.ts' which is one of the input files. +!!! error TS5055: Cannot write file 'out.d.ts' because it would overwrite input file. ==== tests/cases/compiler/out.d.ts (0 errors) ==== declare class c { diff --git a/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt b/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt index 3a4c7eaad45..013a1445b0d 100644 --- a/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt +++ b/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt @@ -1,7 +1,7 @@ -error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. -!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt index 77cd91b9a7f..087a159a9bf 100644 --- a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt +++ b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt @@ -1,7 +1,7 @@ -error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. -!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== export class c { } diff --git a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt index b0732afea72..19bfd5d1c02 100644 --- a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== declare var v; ~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt index b7fec2eefc6..a39d2e1665c 100644 --- a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8017: 'decorators' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== @internal class C { } ~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt index 5861e73f49b..0aa9d5733d5 100644 --- a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt @@ -1,9 +1,9 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt index e9fd9cc31b7..538dfb38972 100644 --- a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== enum E { } ~ diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 433a3c6b7be..641731936f8 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -1,9 +1,9 @@ error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. -error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. !!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. -!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt index 27371222dce..f537941c55c 100644 --- a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== export = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt index c7d080404a2..33b8a45f1aa 100644 --- a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C implements D { } ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt index 36ab7aab188..b4161367037 100644 --- a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== import a = b; ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt index 3089aeecb49..17fb8fcb187 100644 --- a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== interface I { } ~ diff --git a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt index d85819b8588..662028c53ed 100644 --- a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== module M { } ~ diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 06bfd61c7ab..f2f4142b993 100644 --- a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt index 6d9e3c5919d..295f827dd2d 100644 --- a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== function F(p?) { } ~ diff --git a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt index 5a35e68bcec..fd5ea666459 100644 --- a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,11): error TS8014: 'property declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C { v } ~ diff --git a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt index a6d47e5fbe3..d67c9baea70 100644 --- a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C { public foo() { diff --git a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt index fa3e0e34a77..bc4913f6217 100644 --- a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C { constructor(public x) { }} ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt index 8b83a9d1f90..6dad5a29485 100644 --- a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== function F(): number { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt index b06375e8a6a..6e55ff30f04 100644 --- a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt +++ b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(3,6): error TS1223: 'type' tag already specified. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== /** * @type {number} diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt index a0724e452b7..bc4d8e903ad 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8008: 'type aliases' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== type a = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt index acefc2ff569..8ac59196ed9 100644 --- a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,5): error TS8011: 'type arguments' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== Foo(); ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index 50d6416a62b..e73ee46fb89 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== var v = undefined; ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt index 69fa6251942..680b32a64f1 100644 --- a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== function F(a: number) { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt index f279896c4ed..161c832ffd5 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt index 9b056bcae50..d7626f68564 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== function F() { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt index 080cb580bf2..2c6ac3771be 100644 --- a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== var v: () => number; ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt index a9c60c0748f..84900bccc88 100644 --- a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file. -!!! error TS5055: Cannot write file 'a.d.ts' which is one of the input files. +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt index 134c95dee15..4cc2cc2ab45 100644 --- a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt @@ -1,9 +1,9 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt index a97dc2c3cd6..06186b9f0b2 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. !!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt index a97dc2c3cd6..06186b9f0b2 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. !!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt index ed23a30c3fa..826f906538f 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' because it would overwrite input file. -!!! error TS5055: Cannot write file 'b.d.ts' which is one of the input files. +!!! error TS5055: Cannot write file 'b.d.ts' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt index 3531296e019..0f6852b21a0 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt index 3531296e019..0f6852b21a0 100644 --- a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } From 67bed265b7f29162aa68a8979efeff6b6f75c633 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 11:57:20 -0700 Subject: [PATCH 74/89] Since js extensions are not user specified, no need to check if source map file will overwrite input file --- src/compiler/program.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 0fab35dacb3..2a451b90860 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1267,14 +1267,11 @@ namespace ts { // Build map of files seen for (let file of files) { - let { jsFilePath, sourceMapFilePath, declarationFilePath } = getEmitFileNames(file, emitHost); + let { jsFilePath, declarationFilePath } = getEmitFileNames(file, emitHost); if (jsFilePath) { let filesEmittingJsFilePath = lookUp(emitFilesSeen, jsFilePath); if (!filesEmittingJsFilePath) { emitFilesSeen[jsFilePath] = [file]; - if (sourceMapFilePath) { - emitFilesSeen[sourceMapFilePath] = [file]; - } if (declarationFilePath) { emitFilesSeen[declarationFilePath] = [file]; } From 4d3457ca4d8cc7c87d27a00deedef6a8c0617c9e Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 12:03:59 -0700 Subject: [PATCH 75/89] Some refactoring as per PR feedback --- src/compiler/checker.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 78b89cc8ee9..2ba61ac713d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11854,12 +11854,10 @@ namespace ts { let symbol = getSymbolOfNode(node); let localSymbol = node.localSymbol || symbol; - let firstDeclaration = forEach(symbol.declarations, declaration => { + let firstDeclaration = forEach(symbol.declarations, // Get first non javascript function declaration - if (declaration.kind === node.kind && !isJavaScript(getSourceFile(declaration).fileName)) { - return declaration; - } - }); + declaration => declaration.kind === node.kind && !isJavaScript(getSourceFile(declaration).fileName) ? + declaration : undefined); // Only type check the symbol once if (node === firstDeclaration) { From a0318c7b6333315a7ee9cc26b918036518c68539 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 12:54:30 -0700 Subject: [PATCH 76/89] Create a utility to iterate over each emitFileName and use it in emitter TODO: declaration emitter to use this utility TODO: emit file name compiler option verification to use this utility --- src/compiler/emitter.ts | 57 +++++++++++---------------------------- src/compiler/utilities.ts | 44 ++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 44 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index cd6525a6bc3..0be2549b969 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -326,27 +326,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let emitSkipped = false; let newLine = host.getNewLine(); - if (targetSourceFile === undefined) { - forEach(host.getSourceFiles(), sourceFile => { - if (shouldEmitToOwnFile(sourceFile, compilerOptions)) { - emitSkipped = emitFile(getEmitFileNames(sourceFile, host), sourceFile) || emitSkipped; - } - }); - - if (compilerOptions.outFile || compilerOptions.out) { - emitSkipped = emitFile(getBundledEmitFileNames(compilerOptions)) || emitSkipped; - } - } - else { - // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) - if (shouldEmitToOwnFile(targetSourceFile, compilerOptions)) { - emitSkipped = emitFile(getEmitFileNames(targetSourceFile, host), targetSourceFile) || emitSkipped; - } - else if (!isDeclarationFile(targetSourceFile) && - (compilerOptions.outFile || compilerOptions.out)) { - emitSkipped = emitFile(getBundledEmitFileNames(compilerOptions)) || emitSkipped; - } - } + forEachExpectedEmitFile(host, emitFile, targetSourceFile); // Sort and make the unique list of diagnostics diagnostics = sortAndDeduplicateDiagnostics(diagnostics); @@ -476,7 +456,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function emitJavaScript(jsFilePath: string, sourceMapFilePath: string, root?: SourceFile) { + function emitJavaScript(jsFilePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean) { let writer = createTextWriter(newLine); let { write, writeTextOfNode, writeLine, increaseIndent, decreaseIndent } = writer; @@ -557,17 +537,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi initializeEmitterWithSourceMaps(); } - if (root) { - // Do not call emit directly. It does not set the currentSourceFile. - emitSourceFile(root); - } - else { - forEach(host.getSourceFiles(), sourceFile => { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emitSourceFile(sourceFile); - } - }); - } + // Do not call emit directly. It does not set the currentSourceFile. + forEach(sourceFiles, emitSourceFile); writeLine(); writeEmittedFiles(writer.getText(), /*writeByteOrderMark*/ compilerOptions.emitBOM); @@ -1009,10 +980,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (compilerOptions.mapRoot) { sourceMapDir = normalizeSlashes(compilerOptions.mapRoot); - if (root) { // emitting single module file + if (!isBundledEmit) { // emitting single module file + Debug.assert(sourceFiles.length === 1); // For modules or multiple emit files the mapRoot will have directory structure like the sources // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map - sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(root, host, sourceMapDir)); + sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFiles[0], host, sourceMapDir)); } if (!isRootedDiskPath(sourceMapDir) && !isUrl(sourceMapDir)) { @@ -8151,18 +8123,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function emitFile({ jsFilePath, sourceMapFilePath, declarationFilePath}: { jsFilePath: string, sourceMapFilePath: string, declarationFilePath: string }, sourceFile?: SourceFile) { + function emitFile({ jsFilePath, sourceMapFilePath, declarationFilePath}: { jsFilePath: string, sourceMapFilePath: string, declarationFilePath: string }, + sourceFiles: SourceFile[], isBundledEmit: boolean) { // Make sure not to write js File and source map file if any of them cannot be written - let emitSkipped = host.isEmitBlocked(jsFilePath) || (sourceMapFilePath && host.isEmitBlocked(sourceMapFilePath)); - if (!emitSkipped) { - emitJavaScript(jsFilePath, sourceMapFilePath, sourceFile); + if (!host.isEmitBlocked(jsFilePath)) { + emitJavaScript(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit); + } + else { + emitSkipped = true; } if (declarationFilePath) { - emitSkipped = writeDeclarationFile(declarationFilePath, sourceFile, host, resolver, diagnostics) || emitSkipped; + emitSkipped = writeDeclarationFile(declarationFilePath, isBundledEmit ? undefined : sourceFiles[0], host, resolver, diagnostics) || emitSkipped; } - - return emitSkipped; } } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index f17aa97f717..7440a6b5481 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1786,7 +1786,13 @@ namespace ts { return emitOutputFilePathWithoutExtension + extension; } - export function getEmitFileNames(sourceFile: SourceFile, host: EmitHost) { + export interface EmitFileNames { + jsFilePath: string; + sourceMapFilePath: string; + declarationFilePath: string; + } + + export function getEmitFileNames(sourceFile: SourceFile, host: EmitHost): EmitFileNames { if (!isDeclarationFile(sourceFile)) { let options = host.getCompilerOptions(); let jsFilePath: string; @@ -1810,7 +1816,7 @@ namespace ts { }; } - export function getBundledEmitFileNames(options: CompilerOptions) { + function getBundledEmitFileNames(options: CompilerOptions): EmitFileNames { let jsFilePath = options.outFile || options.out; return { @@ -1820,6 +1826,8 @@ namespace ts { }; } + + function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions) { return options.sourceMap ? jsFilePath + ".map" : undefined; } @@ -1828,6 +1836,38 @@ namespace ts { return options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : undefined; } + export function forEachExpectedEmitFile(host: EmitHost, + action: (emitFileNames: EmitFileNames, sourceFiles: SourceFile[], isBundledEmit: boolean) => void, + targetSourceFile?: SourceFile) { + let options = host.getCompilerOptions(); + if (targetSourceFile === undefined) { + forEach(host.getSourceFiles(), sourceFile => { + if (shouldEmitToOwnFile(sourceFile, options)) { + action(getEmitFileNames(sourceFile, host), [sourceFile], /*isBundledEmit*/false); + } + }); + + if (options.outFile || options.out) { + action(getBundledEmitFileNames(options), getBundledEmitSourceFiles(host), /*isBundledEmit*/true); + } + } + else { + // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) + if (shouldEmitToOwnFile(targetSourceFile, options)) { + action(getEmitFileNames(targetSourceFile, host), [targetSourceFile], /*isBundledEmit*/false); + } + else if (!isDeclarationFile(targetSourceFile) && + (options.outFile || options.out)) { + action(getBundledEmitFileNames(options), getBundledEmitSourceFiles(host), /*isBundledEmit*/true); + } + } + + function getBundledEmitSourceFiles(host: EmitHost): SourceFile[] { + return filter(host.getSourceFiles(), + sourceFile => !shouldEmitToOwnFile(sourceFile, host.getCompilerOptions()) && !isDeclarationFile(sourceFile)); + } + } + export function hasFile(sourceFiles: SourceFile[], fileName: string) { return forEach(sourceFiles, file => file.fileName === fileName); } From c6d54d6ae6787bb94f15b0ac0667326d6ce8d98c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 13:22:23 -0700 Subject: [PATCH 77/89] Simplify verification of emit file paths using utility to iterate over each emit file This also makes sure we dont emit --out or --outFile if there are no files that can go in that file(non module and non declaration files) --- src/compiler/program.ts | 47 +++++++------------ src/compiler/utilities.ts | 23 +++++---- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...athModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...athModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...lutePathModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...lutePathModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...ePathModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...ePathModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...athModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...athModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...tivePathModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 8 +--- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...tivePathModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 8 +--- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...ePathModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...ePathModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...UrlModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...UrlModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...prootUrlModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...prootUrlModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...otUrlModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...otUrlModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...UrlModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...UrlModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 8 +--- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...erootUrlModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...erootUrlModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...otUrlModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...otUrlModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 0 ...outModuleMultifolderSpecifyOutputFile.json | 4 +- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 0 ...outModuleMultifolderSpecifyOutputFile.json | 4 +- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 0 .../amd/outModuleSimpleSpecifyOutputFile.json | 4 +- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 0 .../outModuleSimpleSpecifyOutputFile.json | 4 +- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 0 .../outModuleSubfolderSpecifyOutputFile.json | 4 +- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 0 .../outModuleSubfolderSpecifyOutputFile.json | 4 +- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...athModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...athModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...lutePathModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...lutePathModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...ePathModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...ePathModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...athModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...athModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...tivePathModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...tivePathModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...ePathModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...ePathModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...mapModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...mapModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...ourcemapModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...ourcemapModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...cemapModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...cemapModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...UrlModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...UrlModuleMultifolderSpecifyOutputFile.json | 5 +- ...MultifolderSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...erootUrlModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...erootUrlModuleSimpleSpecifyOutputFile.json | 5 +- ...oduleSimpleSpecifyOutputFile.sourcemap.txt | 6 --- .../amd/bin/test.d.ts | 0 .../amd/bin/test.js | 1 - .../amd/bin/test.js.map | 1 - ...otUrlModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- .../node/bin/test.d.ts | 0 .../node/bin/test.js | 1 - .../node/bin/test.js.map | 1 - ...otUrlModuleSubfolderSpecifyOutputFile.json | 5 +- ...leSubfolderSpecifyOutputFile.sourcemap.txt | 6 --- 260 files changed, 96 insertions(+), 646 deletions(-) delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js delete mode 100644 tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b8fbe557101..d1e858680c5 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1258,46 +1258,31 @@ namespace ts { if (!options.noEmit) { let emitHost = getEmitHost(); - let emitFilesSeen: Map = {}; + let emitFilesSeen: Map = {}; + forEachExpectedEmitFile(emitHost, (emitFileNames, sourceFiles, isBundledEmit) => { + verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen); + verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen); + }); + } - // Build map of files seen - for (let file of files) { - let { jsFilePath, declarationFilePath } = getEmitFileNames(file, emitHost); - if (jsFilePath) { - let filesEmittingJsFilePath = lookUp(emitFilesSeen, jsFilePath); - if (!filesEmittingJsFilePath) { - emitFilesSeen[jsFilePath] = [file]; - if (declarationFilePath) { - emitFilesSeen[declarationFilePath] = [file]; - } - } - else { - filesEmittingJsFilePath.push(file); - } - } - } - - // Verify that all the emit files are unique and dont overwrite input files - forEachKey(emitFilesSeen, emitFilePath => { + // Verify that all the emit files are unique and dont overwrite input files + function verifyEmitFilePath(emitFilePath: string, emitFilesSeen: Map) { + if (emitFilePath) { // Report error if the output overwrites input file if (hasFile(files, emitFilePath)) { createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file); } - // Report error if multiple files write into same file (except if specified by --out or --outFile) - if (emitFilePath !== (options.outFile || options.out)) { - // Not --out or --outFile emit, There should be single file emitting to this file - if (emitFilesSeen[emitFilePath].length > 1) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); - } + // Report error if multiple files write into same file + let filesEmittingJsFilePath = lookUp(emitFilesSeen, emitFilePath); + if (filesEmittingJsFilePath) { + // Already seen the same emit file - report error + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); } else { - // --out or --outFile, error if there exist file emitting to single file colliding with --out - if (forEach(emitFilesSeen[emitFilePath], sourceFile => shouldEmitToOwnFile(sourceFile, options))) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); - } + emitFilesSeen[emitFilePath] = true; } - }); + } } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7440a6b5481..0b22657a694 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1826,8 +1826,6 @@ namespace ts { }; } - - function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions) { return options.sourceMap ? jsFilePath + ".map" : undefined; } @@ -1841,30 +1839,37 @@ namespace ts { targetSourceFile?: SourceFile) { let options = host.getCompilerOptions(); if (targetSourceFile === undefined) { + // Emit on each source file forEach(host.getSourceFiles(), sourceFile => { if (shouldEmitToOwnFile(sourceFile, options)) { - action(getEmitFileNames(sourceFile, host), [sourceFile], /*isBundledEmit*/false); + onSingleFileEmit(host, sourceFile); } }); - if (options.outFile || options.out) { - action(getBundledEmitFileNames(options), getBundledEmitSourceFiles(host), /*isBundledEmit*/true); + onBundledEmit(host); } } else { // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) if (shouldEmitToOwnFile(targetSourceFile, options)) { - action(getEmitFileNames(targetSourceFile, host), [targetSourceFile], /*isBundledEmit*/false); + onSingleFileEmit(host, targetSourceFile); } else if (!isDeclarationFile(targetSourceFile) && (options.outFile || options.out)) { - action(getBundledEmitFileNames(options), getBundledEmitSourceFiles(host), /*isBundledEmit*/true); + onBundledEmit(host); } } - function getBundledEmitSourceFiles(host: EmitHost): SourceFile[] { - return filter(host.getSourceFiles(), + function onSingleFileEmit(host: EmitHost, sourceFile: SourceFile) { + action(getEmitFileNames(sourceFile, host), [sourceFile], /*isBundledEmit*/false); + } + + function onBundledEmit(host: EmitHost) { + let bundledSources = filter(host.getSourceFiles(), sourceFile => !shouldEmitToOwnFile(sourceFile, host.getCompilerOptions()) && !isDeclarationFile(sourceFile)); + if (bundledSources.length) { + action(getBundledEmitFileNames(options), bundledSources, /*isBundledEmit*/true); + } } } diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 18e06e5bc50..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index 588d2404ef8..edb521c5e2f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -25,9 +25,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index da94013dea3..4b883a84e70 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -567,10 +567,4 @@ sourceFile:../../test.ts 7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/test.js.map=================================================================== -JsFile: test.js -mapUrl: /tests/cases/projects/outputdir_module_multifolder/mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 18e06e5bc50..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index 588d2404ef8..edb521c5e2f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -25,9 +25,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index f348cfad93c..5ab3146b099 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -611,10 +611,4 @@ sourceFile:../../test.ts 6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) 7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/test.js.map=================================================================== -JsFile: test.js -mapUrl: /tests/cases/projects/outputdir_module_multifolder/mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index f6e3eb542f4..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json index 971d1a2aaab..c3141a197cd 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -21,9 +21,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 759b9dab302..834a5c3a112 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:../test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map=================================================================== -JsFile: test.js -mapUrl: /tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index f6e3eb542f4..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json index 971d1a2aaab..c3141a197cd 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -21,9 +21,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 75228e5ea64..668c24e25c5 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:../test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map=================================================================== -JsFile: test.js -mapUrl: /tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 7ff280253f1..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index 86f3cf5c9a9..7521c803c2d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -21,9 +21,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 18b397608e4..a8488d8a134 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:../test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map=================================================================== -JsFile: test.js -mapUrl: /tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 7ff280253f1..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index 86f3cf5c9a9..7521c803c2d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -21,9 +21,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 97c6b8a85e4..f227d9809ad 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:../test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map=================================================================== -JsFile: test.js -mapUrl: /tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index f359cef4be2..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json index 3a1983f88d9..195e9975ace 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -24,9 +24,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index c2eacec3bdc..12d96900c84 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -567,10 +567,4 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder/test.js.map=================================================================== -JsFile: test.js -mapUrl: ../../../mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index f359cef4be2..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json index 3a1983f88d9..195e9975ace 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -24,9 +24,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 1d6a282976d..567b51cfff5 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -611,10 +611,4 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) 7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder/test.js.map=================================================================== -JsFile: test.js -mapUrl: ../../../mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 58e831a041d..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json index 0dfc88c1aa5..202344863d7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -20,9 +20,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 410dc94963f..76375ce0d0c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:../outputdir_module_simple/test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=../mapFiles/test.js.map=================================================================== -JsFile: test.js -mapUrl: ../../mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 58e831a041d..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json index 0dfc88c1aa5..202344863d7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -20,9 +20,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 0af20dc5ef9..aff5583a5e9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:../outputdir_module_simple/test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=../mapFiles/test.js.map=================================================================== -JsFile: test.js -mapUrl: ../../mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 58e831a041d..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json index 0eb8315ff9b..88ce99fdac8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -20,9 +20,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index fe747e98d9c..46af4847490 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:../outputdir_module_subfolder/test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=../mapFiles/test.js.map=================================================================== -JsFile: test.js -mapUrl: ../../mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 58e831a041d..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json index 0eb8315ff9b..88ce99fdac8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -20,9 +20,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 8f609cc28d9..48f639a7ee2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:../outputdir_module_subfolder/test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=../mapFiles/test.js.map=================================================================== -JsFile: test.js -mapUrl: ../../mapFiles/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json index de091e6dd28..af446483014 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json @@ -24,9 +24,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 1fce6af3084..f07b7d9212d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -567,10 +567,4 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json index de091e6dd28..af446483014 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json @@ -24,9 +24,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index aaf57c9d055..e3d905204b2 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -611,10 +611,4 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) 7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: -sources: -=================================================================== ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json index f0c01727957..133927f3ad0 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json @@ -20,9 +20,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 7c3fae48716..7df7c4142e8 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json index f0c01727957..133927f3ad0 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json @@ -20,9 +20,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 804e4408446..ff16dbdb8d6 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json index 00ba79cee26..232d1814bcc 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json @@ -20,9 +20,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 894bcf6cef4..d2d74c7219d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json index 00ba79cee26..232d1814bcc 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json @@ -20,9 +20,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 9a7f754c534..acf02348d67 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json index 713487cc8d0..597f77fc2dc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -25,9 +25,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index deb74d2ae36..e8aa1436d98 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -567,10 +567,4 @@ sourceFile:outputdir_module_multifolder/test.ts 7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json index 713487cc8d0..597f77fc2dc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -25,9 +25,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 5f476cfb8ed..a8f4f3bf238 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -611,10 +611,4 @@ sourceFile:outputdir_module_multifolder/test.ts 6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) 7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file +>>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json index 53aa4866a41..9cf2fd285ff 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -21,9 +21,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 8b526ff5859..06f3e02521d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json index 53aa4866a41..9cf2fd285ff 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -21,9 +21,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index ff984bf74ee..2843c88faf5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json index 46ba3b14114..d0e80b6b6a5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -21,9 +21,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 67e50350919..89ea048e268 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 52f1b822100..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json index 46ba3b14114..d0e80b6b6a5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -21,9 +21,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index c5bce1a19d5..bf0333f3d12 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map=================================================================== -JsFile: test.js -mapUrl: http://www.typescriptlang.org/test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/outModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/outModuleMultifolderSpecifyOutputFile.json index 66eced5cc01..e15d413b281 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/outModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/outModuleMultifolderSpecifyOutputFile.json @@ -19,8 +19,6 @@ "../outputdir_module_multifolder_ref/m2.js", "../outputdir_module_multifolder_ref/m2.d.ts", "test.js", - "test.d.ts", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/outModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/outModuleMultifolderSpecifyOutputFile.json index 66eced5cc01..e15d413b281 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/outModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/outModuleMultifolderSpecifyOutputFile.json @@ -19,8 +19,6 @@ "../outputdir_module_multifolder_ref/m2.js", "../outputdir_module_multifolder_ref/m2.d.ts", "test.js", - "test.d.ts", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/outModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/outModuleSimpleSpecifyOutputFile.json index 166aaa982e7..a3679b915f8 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/outModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/outModuleSimpleSpecifyOutputFile.json @@ -16,8 +16,6 @@ "m1.js", "m1.d.ts", "test.js", - "test.d.ts", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/outModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/outModuleSimpleSpecifyOutputFile.json index 166aaa982e7..a3679b915f8 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/outModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/outModuleSimpleSpecifyOutputFile.json @@ -16,8 +16,6 @@ "m1.js", "m1.d.ts", "test.js", - "test.d.ts", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/outModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/outModuleSubfolderSpecifyOutputFile.json index f11b95edde9..688c076c865 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/outModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/outModuleSubfolderSpecifyOutputFile.json @@ -16,8 +16,6 @@ "ref/m1.js", "ref/m1.d.ts", "test.js", - "test.d.ts", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/outModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/outModuleSubfolderSpecifyOutputFile.json index f11b95edde9..688c076c865 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/outModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/outModuleSubfolderSpecifyOutputFile.json @@ -16,8 +16,6 @@ "ref/m1.js", "ref/m1.d.ts", "test.js", - "test.d.ts", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index e53f2e0a755..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index d68d0afc199..56492a3252a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -25,9 +25,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index e1bca270ba0..11b024ba134 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -567,10 +567,4 @@ sourceFile:outputdir_module_multifolder/test.ts 7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: /tests/cases/projects/outputdir_module_multifolder/src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index e53f2e0a755..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index d68d0afc199..56492a3252a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -25,9 +25,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 63e22ab64ba..9072b5c7129 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -611,10 +611,4 @@ sourceFile:outputdir_module_multifolder/test.ts 6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) 7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: /tests/cases/projects/outputdir_module_multifolder/src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index 42e5a82e74b..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json index 914b6e2d792..9835726464e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -21,9 +21,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 0fc6cd6eb2a..0ff03b640b1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: /tests/cases/projects/outputdir_module_simple/src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index 42e5a82e74b..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json index 914b6e2d792..9835726464e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -21,9 +21,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 08491d50151..55790d25272 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: /tests/cases/projects/outputdir_module_simple/src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index 279042a1a0f..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index ba9d94f2b0c..538fb7495af 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -21,9 +21,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 5e87f2ef555..990b84fd4fd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: /tests/cases/projects/outputdir_module_subfolder/src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index 279042a1a0f..00000000000 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index ba9d94f2b0c..538fb7495af 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -21,9 +21,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 67fc9030f41..757d17973af 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: /tests/cases/projects/outputdir_module_subfolder/src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index 512eba0e11a..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json index dafceda24d0..e1472a1786b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -24,9 +24,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 9c817da60e9..77e69f98790 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -567,10 +567,4 @@ sourceFile:outputdir_module_multifolder/test.ts 7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: ../src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index 512eba0e11a..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json index dafceda24d0..e1472a1786b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -24,9 +24,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index e34bffc6f61..095d4b65fdf 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -611,10 +611,4 @@ sourceFile:outputdir_module_multifolder/test.ts 6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) 7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: ../src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index 512eba0e11a..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json index 7d87bfe98f2..0f8e4b93f8d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -20,9 +20,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index c259bb45210..b4f6ed8c488 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: ../src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index 512eba0e11a..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json index 7d87bfe98f2..0f8e4b93f8d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -20,9 +20,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 65bea50d84f..82c62b23d3c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: ../src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index 512eba0e11a..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json index 9a897de7334..4ed1c562e57 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -20,9 +20,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 7be1fe1fb8f..a483e0ff9fc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: ../src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index 512eba0e11a..00000000000 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json index 9a897de7334..4ed1c562e57 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -20,9 +20,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 5a3d45c1960..4e25047bafc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: ../src/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.json index 3d2df95ad66..fd04b157142 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.json @@ -23,9 +23,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt index 74ecef44103..383a66a6e2f 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -567,10 +567,4 @@ sourceFile:test.ts 7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.json index 3d2df95ad66..fd04b157142 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.json @@ -23,9 +23,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt index f8d10678ca0..0036386e6c4 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -611,10 +611,4 @@ sourceFile:test.ts 6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) 7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.json index 9ff29662d40..9d5469d80b7 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.json @@ -19,9 +19,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt index a1646bc14e5..b461163a8b8 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.json index 9ff29662d40..9d5469d80b7 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.json @@ -19,9 +19,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt index 4ff8b4fa8c7..d5247e7eeb0 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.json index 9d200ef685d..066dba33e1d 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.json @@ -19,9 +19,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt index d0abf20190f..b6ddd879bc1 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index c1e0281a2ab..00000000000 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.json index 9d200ef685d..066dba33e1d 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.json @@ -19,9 +19,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt index 205f70497ad..3319b4e31f9 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json index dd54871f563..7595c86418c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -24,9 +24,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 86764c6d57a..0fa4d7bfa36 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -567,10 +567,4 @@ sourceFile:outputdir_module_multifolder/test.ts 7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json index dd54871f563..7595c86418c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -24,9 +24,6 @@ "../outputdir_module_multifolder_ref/m2.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index eb2dff17042..625e81c4738 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -611,10 +611,4 @@ sourceFile:outputdir_module_multifolder/test.ts 6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) 7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json index ecfa616be4c..6180a2c53c3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -20,9 +20,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 3e447368494..15f5ae4bc93 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json index ecfa616be4c..6180a2c53c3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -20,9 +20,6 @@ "m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 4d3c5799e27..75f6eb83940 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json index fedae846317..01fd790d6d4 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -20,9 +20,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 54c26748c78..880d55412f8 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -369,10 +369,4 @@ sourceFile:test.ts 7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) --- >>>}); ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js deleted file mode 100644 index 6f3fefb9498..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map deleted file mode 100644 index d3e851981ec..00000000000 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/bin/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json index fedae846317..01fd790d6d4 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -20,9 +20,6 @@ "ref/m1.d.ts", "test.js.map", "test.js", - "test.d.ts", - "bin/test.js.map", - "bin/test.js", - "bin/test.d.ts" + "test.d.ts" ] } \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index cf41966a818..7fc9e0c1f60 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -390,10 +390,4 @@ sourceFile:test.ts 6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) 7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) --- ->>>//# sourceMappingURL=test.js.map=================================================================== -JsFile: test.js -mapUrl: test.js.map -sourceRoot: http://typescript.codeplex.com/ -sources: -=================================================================== >>>//# sourceMappingURL=test.js.map \ No newline at end of file From 06bf08c17fa1d07a8ef2e43e7a212123636ba865 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 13:43:52 -0700 Subject: [PATCH 78/89] Simplify logic to get declaration diagnostis --- src/compiler/declarationEmitter.ts | 25 +++++++++++++------------ src/compiler/emitter.ts | 13 +++++-------- src/compiler/utilities.ts | 4 ++-- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 89ab4027ed8..e10c4ed8a8c 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -31,15 +31,16 @@ namespace ts { } export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, targetSourceFile: SourceFile): Diagnostic[] { - let diagnostics: Diagnostic[] = []; - let { declarationFilePath } = getEmitFileNames(targetSourceFile, host); - if (declarationFilePath) { - emitDeclarations(host, resolver, diagnostics, declarationFilePath, targetSourceFile); + let declarationDiagnostics = createDiagnosticCollection(); + forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile); + return declarationDiagnostics.getDiagnostics(targetSourceFile.fileName); + + function getDeclarationDiagnosticsFromFile({ declarationFilePath }, sources: SourceFile[], isBundledEmit: boolean) { + emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, !isBundledEmit ? targetSourceFile : undefined); } - return diagnostics; } - function emitDeclarations(host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[], declarationFilePath: string, root?: SourceFile): DeclarationEmit { + function emitDeclarations(host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection, declarationFilePath: string, root?: SourceFile): DeclarationEmit { let newLine = host.getNewLine(); let compilerOptions = host.getCompilerOptions(); @@ -243,14 +244,14 @@ namespace ts { let errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); if (errorInfo) { if (errorInfo.typeName) { - diagnostics.push(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, + emitterDiagnostics.add(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, getSourceTextOfNodeFromSourceFile(currentSourceFile, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); } else { - diagnostics.push(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, + emitterDiagnostics.add(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); @@ -266,7 +267,7 @@ namespace ts { function reportInaccessibleThisError() { if (errorNameNode) { reportedDeclarationError = true; - diagnostics.push(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary, + emitterDiagnostics.add(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary, declarationNameToString(errorNameNode))); } } @@ -1616,14 +1617,14 @@ namespace ts { } /* @internal */ - export function writeDeclarationFile(declarationFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[]) { - let emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, declarationFilePath, sourceFile); + export function writeDeclarationFile(declarationFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection) { + let emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFile); let emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath); if (!emitSkipped) { let declarationOutput = emitDeclarationResult.referencePathsOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); let compilerOptions = host.getCompilerOptions(); - writeFile(host, diagnostics, declarationFilePath, declarationOutput, compilerOptions.emitBOM); + writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, compilerOptions.emitBOM); } return emitSkipped; diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 0be2549b969..b9dad7e151e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -322,18 +322,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let languageVersion = compilerOptions.target || ScriptTarget.ES3; let modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None; let sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined; - let diagnostics: Diagnostic[] = []; + let emitterDiagnostics = createDiagnosticCollection(); let emitSkipped = false; let newLine = host.getNewLine(); forEachExpectedEmitFile(host, emitFile, targetSourceFile); - // Sort and make the unique list of diagnostics - diagnostics = sortAndDeduplicateDiagnostics(diagnostics); - return { emitSkipped, - diagnostics, + diagnostics: emitterDiagnostics.getDiagnostics(), sourceMaps: sourceMapDataList }; @@ -949,7 +946,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else { // Write source map file - writeFile(host, diagnostics, sourceMapData.sourceMapFilePath, sourceMapText, /*writeByteOrderMark*/ false); + writeFile(host, emitterDiagnostics, sourceMapData.sourceMapFilePath, sourceMapText, /*writeByteOrderMark*/ false); } sourceMapUrl = `//# sourceMappingURL=${sourceMapData.jsSourceMappingURL}`; @@ -1037,7 +1034,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } function writeJavaScriptFile(emitOutput: string, writeByteOrderMark: boolean) { - writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); + writeFile(host, emitterDiagnostics, jsFilePath, emitOutput, writeByteOrderMark); } // Create a temporary variable with a unique unused name. @@ -8134,7 +8131,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } if (declarationFilePath) { - emitSkipped = writeDeclarationFile(declarationFilePath, isBundledEmit ? undefined : sourceFiles[0], host, resolver, diagnostics) || emitSkipped; + emitSkipped = writeDeclarationFile(declarationFilePath, isBundledEmit ? undefined : sourceFiles[0], host, resolver, emitterDiagnostics) || emitSkipped; } } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 0b22657a694..fea71cfc67e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1883,9 +1883,9 @@ namespace ts { return combinePaths(newDirPath, sourceFilePath); } - export function writeFile(host: EmitHost, diagnostics: Diagnostic[], fileName: string, data: string, writeByteOrderMark: boolean) { + export function writeFile(host: EmitHost, diagnostics: DiagnosticCollection, fileName: string, data: string, writeByteOrderMark: boolean) { host.writeFile(fileName, data, writeByteOrderMark, hostErrorMessage => { - diagnostics.push(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); + diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); }); } From 2b582a0b7175cee49e9d890f0253eb54d372bdde Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 15:04:46 -0700 Subject: [PATCH 79/89] Simplifty declaration emitter logic by using forEachExpectedEmitFile --- src/compiler/declarationEmitter.ts | 150 ++++++++++++++--------------- src/compiler/emitter.ts | 2 +- src/compiler/utilities.ts | 67 +++++-------- 3 files changed, 99 insertions(+), 120 deletions(-) diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index e10c4ed8a8c..348a22e23e8 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -36,11 +36,12 @@ namespace ts { return declarationDiagnostics.getDiagnostics(targetSourceFile.fileName); function getDeclarationDiagnosticsFromFile({ declarationFilePath }, sources: SourceFile[], isBundledEmit: boolean) { - emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, !isBundledEmit ? targetSourceFile : undefined); + emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit); } } - function emitDeclarations(host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection, declarationFilePath: string, root?: SourceFile): DeclarationEmit { + function emitDeclarations(host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection, declarationFilePath: string, + sourceFiles: SourceFile[], isBundledEmit: boolean): DeclarationEmit { let newLine = host.getNewLine(); let compilerOptions = host.getCompilerOptions(); @@ -67,67 +68,48 @@ namespace ts { // and we could be collecting these paths from multiple files into single one with --out option let referencePathsOutput = ""; - if (root) { - // Emitting just a single file, so emit references in this file only - if (!compilerOptions.noResolve) { - let addedGlobalFileReference = false; - forEach(root.referencedFiles, fileReference => { - let referencedFile = tryResolveScriptReference(host, root, fileReference); + // Emit references corresponding to each file + let emittedReferencedFiles: SourceFile[] = []; + let addedGlobalFileReference = false; + forEach(sourceFiles, sourceFile => { + if (!isJavaScript(sourceFile.fileName)) { + // Check what references need to be added + if (!compilerOptions.noResolve) { + forEach(sourceFile.referencedFiles, fileReference => { + let referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); - // All the references that are not going to be part of same file - if (referencedFile && ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference - shouldEmitToOwnFile(referencedFile, compilerOptions) || // This is referenced file is emitting its own js file - !addedGlobalFileReference)) { // Or the global out file corresponding to this reference was not added - - writeReferencePath(referencedFile); - if (!isExternalModuleOrDeclarationFile(referencedFile)) { - addedGlobalFileReference = true; - } - } - }); - } - - emitSourceFile(root); - - // create asynchronous output for the importDeclarations - if (moduleElementDeclarationEmitInfo.length) { - let oldWriter = writer; - forEach(moduleElementDeclarationEmitInfo, aliasEmitInfo => { - if (aliasEmitInfo.isVisible) { - Debug.assert(aliasEmitInfo.node.kind === SyntaxKind.ImportDeclaration); - createAndSetNewTextWriterWithSymbolWriter(); - Debug.assert(aliasEmitInfo.indent === 0); - writeImportDeclaration(aliasEmitInfo.node); - aliasEmitInfo.asynchronousOutput = writer.getText(); - } - }); - setWriter(oldWriter); - } - } - else { - // Emit references corresponding to this file - let emittedReferencedFiles: SourceFile[] = []; - forEach(host.getSourceFiles(), sourceFile => { - if (!isExternalModuleOrDeclarationFile(sourceFile) && !isJavaScript(sourceFile.fileName)) { - // Check what references need to be added - if (!compilerOptions.noResolve) { - forEach(sourceFile.referencedFiles, fileReference => { - let referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); - - // If the reference file is a declaration file or an external module, emit that reference - if (referencedFile && (isExternalModuleOrDeclarationFile(referencedFile) && - !contains(emittedReferencedFiles, referencedFile))) { // If the file reference was not already emitted - - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); + // Emit reference in dts, if the file reference was not already emitted + if (referencedFile && !contains(emittedReferencedFiles, referencedFile)) { + // Add a reference to generated dts file, + // global file reference is added only + // - if it is not bundled emit (because otherwise it would be self reference) + // - and it is not already added + if (writeReferencePath(referencedFile, !isBundledEmit && !addedGlobalFileReference)) { + addedGlobalFileReference = true; } - }); - } - - emitSourceFile(sourceFile); + emittedReferencedFiles.push(referencedFile); + } + }); } - }); - } + + emitSourceFile(sourceFile); + + // create asynchronous output for the importDeclarations + if (moduleElementDeclarationEmitInfo.length) { + let oldWriter = writer; + forEach(moduleElementDeclarationEmitInfo, aliasEmitInfo => { + if (aliasEmitInfo.isVisible) { + Debug.assert(aliasEmitInfo.node.kind === SyntaxKind.ImportDeclaration); + createAndSetNewTextWriterWithSymbolWriter(); + Debug.assert(aliasEmitInfo.indent === 0); + writeImportDeclaration(aliasEmitInfo.node); + aliasEmitInfo.asynchronousOutput = writer.getText(); + } + }); + setWriter(oldWriter); + } + } + }); return { reportedDeclarationError, @@ -1592,33 +1574,51 @@ namespace ts { } } - function writeReferencePath(referencedFile: SourceFile) { + /** + * Adds the reference to referenced file, returns true if global file reference was emitted + * @param referencedFile + * @param addBundledFileReference Determines if global file reference corresponding to bundled file should be emitted or not + */ + function writeReferencePath(referencedFile: SourceFile, addBundledFileReference: boolean): boolean { let declFileName: string; - if (referencedFile.flags & NodeFlags.DeclarationFile) { + let addedBundledEmitReference = false; + if (isDeclarationFile(referencedFile)) { // Declaration file, use declaration file name declFileName = referencedFile.fileName; } else { - // declaration file name - let { declarationFilePath, jsFilePath } = getEmitFileNames(referencedFile, host); - Debug.assert(!!declarationFilePath || isJavaScript(referencedFile.fileName), "Declaration file is not present only for javascript files"); - declFileName = declarationFilePath || jsFilePath; + // Get the declaration file path + forEachExpectedEmitFile(host, getDeclFileName, referencedFile); } - declFileName = getRelativePathToDirectoryOrUrl( - getDirectoryPath(normalizeSlashes(declarationFilePath)), - declFileName, - host.getCurrentDirectory(), - host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ false); + if (declFileName) { + declFileName = getRelativePathToDirectoryOrUrl( + getDirectoryPath(normalizeSlashes(declarationFilePath)), + declFileName, + host.getCurrentDirectory(), + host.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ false); - referencePathsOutput += "/// " + newLine; + referencePathsOutput += "/// " + newLine; + } + return addedBundledEmitReference; + + function getDeclFileName(emitFileNames: EmitFileNames, sourceFiles: SourceFile[], isBundledEmit: boolean) { + // Dont add reference path to this file if it is a bundled emit and caller asked not emit bundled file path + if (isBundledEmit && !addBundledFileReference) { + return; + } + + Debug.assert(!!emitFileNames.declarationFilePath || isJavaScript(referencedFile.fileName), "Declaration file is not present only for javascript files"); + declFileName = emitFileNames.declarationFilePath || emitFileNames.jsFilePath; + addedBundledEmitReference = isBundledEmit; + } } } /* @internal */ - export function writeDeclarationFile(declarationFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection) { - let emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFile); + export function writeDeclarationFile(declarationFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean, host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection) { + let emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit); let emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath); if (!emitSkipped) { let declarationOutput = emitDeclarationResult.referencePathsOutput diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index b9dad7e151e..d3fc80a3c5e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -8131,7 +8131,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } if (declarationFilePath) { - emitSkipped = writeDeclarationFile(declarationFilePath, isBundledEmit ? undefined : sourceFiles[0], host, resolver, emitterDiagnostics) || emitSkipped; + emitSkipped = writeDeclarationFile(declarationFilePath, sourceFiles, isBundledEmit, host, resolver, emitterDiagnostics) || emitSkipped; } } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index fea71cfc67e..245566c1f32 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1792,48 +1792,6 @@ namespace ts { declarationFilePath: string; } - export function getEmitFileNames(sourceFile: SourceFile, host: EmitHost): EmitFileNames { - if (!isDeclarationFile(sourceFile)) { - let options = host.getCompilerOptions(); - let jsFilePath: string; - if (shouldEmitToOwnFile(sourceFile, options)) { - let jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, - sourceFile.languageVariant === LanguageVariant.JSX && options.jsx === JsxEmit.Preserve ? ".jsx" : ".js"); - return { - jsFilePath, - sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), - declarationFilePath: !isJavaScript(sourceFile.fileName) ? getDeclarationEmitFilePath(jsFilePath, options) : undefined - }; - } - else if (options.outFile || options.out) { - return getBundledEmitFileNames(options); - } - } - return { - jsFilePath: undefined, - sourceMapFilePath: undefined, - declarationFilePath: undefined - }; - } - - function getBundledEmitFileNames(options: CompilerOptions): EmitFileNames { - let jsFilePath = options.outFile || options.out; - - return { - jsFilePath, - sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), - declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) - }; - } - - function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions) { - return options.sourceMap ? jsFilePath + ".map" : undefined; - } - - function getDeclarationEmitFilePath(jsFilePath: string, options: CompilerOptions) { - return options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : undefined; - } - export function forEachExpectedEmitFile(host: EmitHost, action: (emitFileNames: EmitFileNames, sourceFiles: SourceFile[], isBundledEmit: boolean) => void, targetSourceFile?: SourceFile) { @@ -1861,16 +1819,37 @@ namespace ts { } function onSingleFileEmit(host: EmitHost, sourceFile: SourceFile) { - action(getEmitFileNames(sourceFile, host), [sourceFile], /*isBundledEmit*/false); + let jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, + sourceFile.languageVariant === LanguageVariant.JSX && options.jsx === JsxEmit.Preserve ? ".jsx" : ".js"); + let emitFileNames: EmitFileNames = { + jsFilePath, + sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), + declarationFilePath: !isJavaScript(sourceFile.fileName) ? getDeclarationEmitFilePath(jsFilePath, options) : undefined + }; + action(emitFileNames, [sourceFile], /*isBundledEmit*/false); } function onBundledEmit(host: EmitHost) { let bundledSources = filter(host.getSourceFiles(), sourceFile => !shouldEmitToOwnFile(sourceFile, host.getCompilerOptions()) && !isDeclarationFile(sourceFile)); + let jsFilePath = options.outFile || options.out; + let emitFileNames: EmitFileNames = { + jsFilePath, + sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), + declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) + }; if (bundledSources.length) { - action(getBundledEmitFileNames(options), bundledSources, /*isBundledEmit*/true); + action(emitFileNames, bundledSources, /*isBundledEmit*/true); } } + + function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions) { + return options.sourceMap ? jsFilePath + ".map" : undefined; + } + + function getDeclarationEmitFilePath(jsFilePath: string, options: CompilerOptions) { + return options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : undefined; + } } export function hasFile(sourceFiles: SourceFile[], fileName: string) { From 62d4fd6d35efb9453abc638c106723ecd1efd229 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 15:06:23 -0700 Subject: [PATCH 80/89] Take pr feedback into account --- src/compiler/core.ts | 4 ++-- src/compiler/program.ts | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 9336217558b..1b19eb5a77b 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -740,10 +740,10 @@ namespace ts { */ export const supportedTypeScriptExtensions = [".ts", ".tsx", ".d.ts"]; export const supportedJavascriptExtensions = [".js", ".jsx"]; - export const supportedExtensionsWhenAllowedJs = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); + const allSupportedExtensions = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); export function getSupportedExtensions(options?: CompilerOptions): string[] { - return options && options.allowJs ? supportedExtensionsWhenAllowedJs : supportedTypeScriptExtensions; + return options && options.allowJs ? allSupportedExtensions : supportedTypeScriptExtensions; } export function isSupportedSourceFileName(fileName: string, compilerOptions?: CompilerOptions) { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index d1e858680c5..4b0fcc934c2 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -832,13 +832,11 @@ namespace ts { }); } - function getOptionsDiagnostics(cancellationToken?: CancellationToken, includeEmitBlockingDiagnostics?: boolean): Diagnostic[] { + function getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[] { let allDiagnostics: Diagnostic[] = []; addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics()); addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics()); - if (!includeEmitBlockingDiagnostics) { - addRange(allDiagnostics, emitBlockingDiagnostics.getGlobalDiagnostics()); - } + addRange(allDiagnostics, emitBlockingDiagnostics.getGlobalDiagnostics()); return sortAndDeduplicateDiagnostics(allDiagnostics); } From 51caf1a9ee50caae49b1454cb545c4b6f4c425d1 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 30 Oct 2015 15:54:31 -0700 Subject: [PATCH 81/89] Use of FileMap instead of Map as per PR feedback --- src/compiler/program.ts | 25 +++++++++++++------------ src/compiler/utilities.ts | 4 ---- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 4b0fcc934c2..d779e4e0665 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -330,7 +330,6 @@ namespace ts { let fileProcessingDiagnostics = createDiagnosticCollection(); let programDiagnostics = createDiagnosticCollection(); let emitBlockingDiagnostics = createDiagnosticCollection(); - let hasEmitBlockingDiagnostics: Map = {}; // Map storing if there is emit blocking diagnostics for given input let commonSourceDirectory: string; let diagnosticsProducingTypeChecker: TypeChecker; @@ -342,6 +341,8 @@ namespace ts { let start = new Date().getTime(); host = host || createCompilerHost(options); + // Map storing if there is emit blocking diagnostics for given input + let hasEmitBlockingDiagnostics = createFileMap(!host.useCaseSensitiveFileNames() ? key => key.toLocaleLowerCase() : undefined); const currentDirectory = host.getCurrentDirectory(); const resolveModuleNamesWorker = host.resolveModuleNames @@ -547,7 +548,7 @@ namespace ts { } function isEmitBlocked(emitFileName: string): boolean { - return hasProperty(hasEmitBlockingDiagnostics, emitFileName); + return hasEmitBlockingDiagnostics.contains(toPath(emitFileName, currentDirectory, getCanonicalFileName)); } function emitWorker(program: Program, sourceFile: SourceFile, writeFileCallback: WriteFileCallback, cancellationToken: CancellationToken): EmitResult { @@ -1256,7 +1257,7 @@ namespace ts { if (!options.noEmit) { let emitHost = getEmitHost(); - let emitFilesSeen: Map = {}; + let emitFilesSeen = createFileMap(!host.useCaseSensitiveFileNames() ? key => key.toLocaleLowerCase() : undefined); forEachExpectedEmitFile(emitHost, (emitFileNames, sourceFiles, isBundledEmit) => { verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen); verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen); @@ -1264,28 +1265,28 @@ namespace ts { } // Verify that all the emit files are unique and dont overwrite input files - function verifyEmitFilePath(emitFilePath: string, emitFilesSeen: Map) { - if (emitFilePath) { + function verifyEmitFilePath(emitFileName: string, emitFilesSeen: FileMap) { + if (emitFileName) { + let emitFilePath = toPath(emitFileName, currentDirectory, getCanonicalFileName); // Report error if the output overwrites input file - if (hasFile(files, emitFilePath)) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file); + if (forEach(files, file => toPath(file.fileName, currentDirectory, getCanonicalFileName) === emitFilePath)) { + createEmitBlockingDiagnostics(emitFileName, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file); } // Report error if multiple files write into same file - let filesEmittingJsFilePath = lookUp(emitFilesSeen, emitFilePath); - if (filesEmittingJsFilePath) { + if (emitFilesSeen.contains(emitFilePath)) { // Already seen the same emit file - report error - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); + createEmitBlockingDiagnostics(emitFileName, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); } else { - emitFilesSeen[emitFilePath] = true; + emitFilesSeen.set(emitFilePath, true); } } } } function createEmitBlockingDiagnostics(emitFileName: string, message: DiagnosticMessage) { - hasEmitBlockingDiagnostics[emitFileName] = true; + hasEmitBlockingDiagnostics.set(toPath(emitFileName, currentDirectory, getCanonicalFileName), true); emitBlockingDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 245566c1f32..d7f33a945dd 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1852,10 +1852,6 @@ namespace ts { } } - export function hasFile(sourceFiles: SourceFile[], fileName: string) { - return forEach(sourceFiles, file => file.fileName === fileName); - } - export function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string) { let sourceFilePath = getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); From def7b665bb329f4b2f6222588f5a6f94dc5acaa5 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 5 Nov 2015 20:09:40 -0800 Subject: [PATCH 82/89] PR feedback --- src/compiler/program.ts | 37 +++++++++++++++++++------------------ src/compiler/utilities.ts | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index d779e4e0665..254f6b1fe3b 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -286,7 +286,7 @@ namespace ts { } export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[] { - let diagnostics = program.getOptionsDiagnostics(cancellationToken).concat( + let diagnostics = program.getOptionsDiagnostics().concat( program.getSyntacticDiagnostics(sourceFile, cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSemanticDiagnostics(sourceFile, cancellationToken)); @@ -337,6 +337,7 @@ namespace ts { let classifiableNames: Map; let skipDefaultLib = options.noLib; + let supportedExtensions = getSupportedExtensions(options); let start = new Date().getTime(); @@ -369,14 +370,13 @@ namespace ts { } if (!tryReuseStructureFromOldProgram()) { - let supportedExtensions = getSupportedExtensions(options); - forEach(rootNames, name => processRootFile(name, false, supportedExtensions)); + forEach(rootNames, name => processRootFile(name, false)); // Do not process the default library if: // - The '--noLib' flag is used. // - A 'no-default-lib' reference comment is encountered in // processing the root files. if (!skipDefaultLib) { - processRootFile(host.getDefaultLibFileName(options), true, supportedExtensions); + processRootFile(host.getDefaultLibFileName(options), true); } } @@ -833,7 +833,7 @@ namespace ts { }); } - function getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[] { + function getOptionsDiagnostics(): Diagnostic[] { let allDiagnostics: Diagnostic[] = []; addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics()); addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics()); @@ -851,8 +851,8 @@ namespace ts { return getBaseFileName(fileName).indexOf(".") >= 0; } - function processRootFile(fileName: string, isDefaultLib: boolean, supportedExtensions: string[]) { - processSourceFile(normalizePath(fileName), isDefaultLib, supportedExtensions); + function processRootFile(fileName: string, isDefaultLib: boolean) { + processSourceFile(normalizePath(fileName), isDefaultLib); } function fileReferenceIsEqualTo(a: FileReference, b: FileReference): boolean { @@ -911,7 +911,7 @@ namespace ts { } } - function processSourceFile(fileName: string, isDefaultLib: boolean, supportedExtensions: string[], refFile?: SourceFile, refPos?: number, refEnd?: number) { + function processSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) { let diagnosticArgument: string[]; let diagnostic: DiagnosticMessage; if (hasExtension(fileName)) { @@ -919,7 +919,7 @@ namespace ts { diagnostic = Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1; diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"]; } - else if (!findSourceFile(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, supportedExtensions, refFile, refPos, refEnd)) { + else if (!findSourceFile(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd)) { diagnostic = Diagnostics.File_0_not_found; diagnosticArgument = [fileName]; } @@ -929,13 +929,13 @@ namespace ts { } } else { - let nonTsFile: SourceFile = options.allowNonTsExtensions && findSourceFile(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, supportedExtensions, refFile, refPos, refEnd); + let nonTsFile: SourceFile = options.allowNonTsExtensions && findSourceFile(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); if (!nonTsFile) { if (options.allowNonTsExtensions) { diagnostic = Diagnostics.File_0_not_found; diagnosticArgument = [fileName]; } - else if (!forEach(getSupportedExtensions(options), extension => findSourceFile(fileName + extension, toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, supportedExtensions, refFile, refPos, refEnd))) { + else if (!forEach(supportedExtensions, extension => findSourceFile(fileName + extension, toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd))) { // (TODO: shkamat) Should this message be different given we support multiple extensions diagnostic = Diagnostics.File_0_not_found; fileName += ".ts"; @@ -965,7 +965,7 @@ namespace ts { } // Get source file from normalized fileName - function findSourceFile(fileName: string, normalizedAbsolutePath: Path, isDefaultLib: boolean, supportedExtensions: string[], refFile?: SourceFile, refPos?: number, refEnd?: number): SourceFile { + function findSourceFile(fileName: string, normalizedAbsolutePath: Path, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number): SourceFile { if (filesByName.contains(normalizedAbsolutePath)) { const file = filesByName.get(normalizedAbsolutePath); // try to check if we've already seen this file but with a different casing in path @@ -1007,11 +1007,11 @@ namespace ts { let basePath = getDirectoryPath(fileName); if (!options.noResolve) { - processReferencedFiles(file, basePath, supportedExtensions); + processReferencedFiles(file, basePath); } // always process imported modules to record module name resolutions - processImportedModules(file, basePath, supportedExtensions); + processImportedModules(file, basePath); if (isDefaultLib) { file.isDefaultLib = true; @@ -1025,10 +1025,10 @@ namespace ts { return file; } - function processReferencedFiles(file: SourceFile, basePath: string, supportedExtensions: string[]) { + function processReferencedFiles(file: SourceFile, basePath: string) { forEach(file.referencedFiles, ref => { let referencedFileName = resolveTripleslashReference(ref.fileName, file.fileName); - processSourceFile(referencedFileName, /* isDefaultLib */ false, supportedExtensions, file, ref.pos, ref.end); + processSourceFile(referencedFileName, /* isDefaultLib */ false, file, ref.pos, ref.end); }); } @@ -1036,7 +1036,7 @@ namespace ts { return host.getCanonicalFileName(fileName); } - function processImportedModules(file: SourceFile, basePath: string, supportedExtensions: string[]) { + function processImportedModules(file: SourceFile, basePath: string) { collectExternalModuleReferences(file); if (file.imports.length) { file.resolvedModules = {}; @@ -1046,7 +1046,7 @@ namespace ts { let resolution = resolutions[i]; setResolvedModule(file, moduleNames[i], resolution); if (resolution && !options.noResolve) { - const importedFile = findSourceFile(resolution.resolvedFileName, toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /* isDefaultLib */ false, supportedExtensions, file, skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); + const importedFile = findSourceFile(resolution.resolvedFileName, toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /* isDefaultLib */ false, file, skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); if (importedFile && resolution.isExternalLibraryImport) { if (!isExternalModule(importedFile)) { @@ -1255,6 +1255,7 @@ namespace ts { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators")); } + // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files if (!options.noEmit) { let emitHost = getEmitHost(); let emitFilesSeen = createFileMap(!host.useCaseSensitiveFileNames() ? key => key.toLocaleLowerCase() : undefined); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index d7f33a945dd..1af18476e7e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1831,7 +1831,7 @@ namespace ts { function onBundledEmit(host: EmitHost) { let bundledSources = filter(host.getSourceFiles(), - sourceFile => !shouldEmitToOwnFile(sourceFile, host.getCompilerOptions()) && !isDeclarationFile(sourceFile)); + sourceFile => !shouldEmitToOwnFile(sourceFile, options) && !isDeclarationFile(sourceFile)); let jsFilePath = options.outFile || options.out; let emitFileNames: EmitFileNames = { jsFilePath, From d2445b6286e31996234035bc3bd2ba116be7d639 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 11 Nov 2015 16:10:23 -0800 Subject: [PATCH 83/89] PR feedback --- src/compiler/program.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 8f807ed7b86..efaeb825184 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -327,7 +327,6 @@ namespace ts { let files: SourceFile[] = []; let fileProcessingDiagnostics = createDiagnosticCollection(); const programDiagnostics = createDiagnosticCollection(); - const emitBlockingDiagnostics = createDiagnosticCollection(); let commonSourceDirectory: string; let diagnosticsProducingTypeChecker: TypeChecker; @@ -835,7 +834,6 @@ namespace ts { const allDiagnostics: Diagnostic[] = []; addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics()); addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics()); - addRange(allDiagnostics, emitBlockingDiagnostics.getGlobalDiagnostics()); return sortAndDeduplicateDiagnostics(allDiagnostics); } @@ -1263,7 +1261,7 @@ namespace ts { }); } - // Verify that all the emit files are unique and dont overwrite input files + // Verify that all the emit files are unique and don't overwrite input files function verifyEmitFilePath(emitFileName: string, emitFilesSeen: FileMap) { if (emitFileName) { const emitFilePath = toPath(emitFileName, currentDirectory, getCanonicalFileName); @@ -1286,7 +1284,7 @@ namespace ts { function createEmitBlockingDiagnostics(emitFileName: string, message: DiagnosticMessage) { hasEmitBlockingDiagnostics.set(toPath(emitFileName, currentDirectory, getCanonicalFileName), true); - emitBlockingDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); + programDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); } } } From 1ed67f41ba568978ea66554810ca00b3e804198b Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 12 Nov 2015 11:50:58 -0800 Subject: [PATCH 84/89] Removed the TODO as created bug for it --- src/compiler/program.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index efaeb825184..33a1267bf77 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -932,7 +932,6 @@ namespace ts { diagnosticArgument = [fileName]; } else if (!forEach(supportedExtensions, extension => findSourceFile(fileName + extension, toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd))) { - // (TODO: shkamat) Should this message be different given we support multiple extensions diagnostic = Diagnostics.File_0_not_found; fileName += ".ts"; diagnosticArgument = [fileName]; From 0b215404d107e64d5eda4628ef1f5f210cebf683 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 12 Nov 2015 13:23:53 -0800 Subject: [PATCH 85/89] Simplified logic of getting files if files werent suppplied in tscconfig.json Since we dont support arbitary list of extensions to treat as .js, it becomes easier to simplify code based on the assumptions --- src/compiler/commandLineParser.ts | 49 +++++++------------ src/compiler/core.ts | 4 +- ...eNameDtsNotSpecifiedWithAllowJs.errors.txt | 6 ++- ...ionSameNameDtsNotSpecifiedWithAllowJs.json | 3 +- ...eNameDtsNotSpecifiedWithAllowJs.errors.txt | 6 ++- ...ionSameNameDtsNotSpecifiedWithAllowJs.json | 3 +- 6 files changed, 35 insertions(+), 36 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 3c3bb14174d..5336b01bb14 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -502,41 +502,30 @@ namespace ts { else { const filesSeen: Map = {}; const exclude = json["exclude"] instanceof Array ? map(json["exclude"], normalizeSlashes) : undefined; - const extensionsByPriority = getSupportedExtensions(options); - for (let extensionsIndex = 0; extensionsIndex < extensionsByPriority.length; extensionsIndex++) { - const currentExtension = extensionsByPriority[extensionsIndex]; - const filesInDirWithExtension = host.readDirectory(basePath, currentExtension, exclude); - // Get list of conflicting extensions, conflicting extension is - // - extension that is lower priority than current extension and - // - extension also is current extension (ends with "." + currentExtension) - const conflictingExtensions: string[] = []; - for (let i = extensionsIndex + 1; i < extensionsByPriority.length; i++) { - const extension = extensionsByPriority[i]; // lower priority extension - if (fileExtensionIs(extension, currentExtension)) { // also has current extension - conflictingExtensions.push(extension); - } - } + const supportedExtensions = getSupportedExtensions(options); + Debug.assert(indexOf(supportedExtensions, ".ts") < indexOf(supportedExtensions, ".d.ts"), "Changed priority of extensions to pick"); - // Add the files to fileNames list if the file is not any of conflicting extension + // Get files of supported extensions in their order of resolution + for (const extension of supportedExtensions) { + const filesInDirWithExtension = host.readDirectory(basePath, extension, exclude); for (const fileName of filesInDirWithExtension) { - let hasConflictingExtension = false; - for (const conflictingExtension of conflictingExtensions) { - // eg. 'f.d.ts' will match '.ts' extension but really should be process later with '.d.ts' files - if (fileExtensionIs(fileName, conflictingExtension)) { - hasConflictingExtension = true; - break; + // .ts extension would read the .d.ts extension files too but since .d.ts is lower priority extension, + // lets pick them when its turn comes up + if (extension === ".ts" && fileExtensionIs(fileName, ".d.ts")) { + continue; + } + + // If this is one of the output extension (which would be .d.ts and .js if we are allowing compilation of js files) + // do not include this file if we included .ts or .tsx file with same base name as it could be output of the earlier compilation + if (extension === ".d.ts" || (options.allowJs && extension === ".js")) { + const baseName = fileName.substr(0, fileName.length - extension.length); + if (hasProperty(filesSeen, baseName + ".ts") || hasProperty(filesSeen, baseName + ".tsx")) { + continue; } } - if (!hasConflictingExtension) { - // Add the file only if there is no higher priority extension file already included - // eg. when a.d.ts and a.js are present in the folder, include only a.d.ts not a.js - const baseName = fileName.substr(0, fileName.length - currentExtension.length); - if (!hasProperty(filesSeen, baseName)) { - filesSeen[baseName] = true; - fileNames.push(fileName); - } - } + filesSeen[fileName] = true; + fileNames.push(fileName); } } } diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 5b0eedfc1f9..b773cdfaf45 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -297,8 +297,8 @@ namespace ts { return result; } - export function extend(first: Map, second: Map): Map { - const result: Map = {}; + export function extend, T2 extends Map<{}>>(first: T1 , second: T2): T1 & T2 { + const result: T1 & T2 = {}; for (const id in first) { (result as any)[id] = first[id]; } diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt index 8da5b629ca8..ac25edc1bd5 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt @@ -1,6 +1,10 @@ error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' because it would overwrite input file. !!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +!!! error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' because it would overwrite input file. ==== SameNameDTsNotSpecifiedWithAllowJs/a.d.ts (0 errors) ==== - declare var a: number; \ No newline at end of file + declare var a: number; +==== SameNameDTsNotSpecifiedWithAllowJs/a.js (0 errors) ==== + var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json index 77e1f227030..b4c3fb8f51b 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json @@ -6,7 +6,8 @@ "project": "SameNameDTsNotSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameDTsNotSpecifiedWithAllowJs/a.d.ts" + "SameNameDTsNotSpecifiedWithAllowJs/a.d.ts", + "SameNameDTsNotSpecifiedWithAllowJs/a.js" ], "emittedFiles": [] } \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt index 8da5b629ca8..ac25edc1bd5 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt @@ -1,6 +1,10 @@ error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' because it would overwrite input file. !!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +!!! error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' because it would overwrite input file. ==== SameNameDTsNotSpecifiedWithAllowJs/a.d.ts (0 errors) ==== - declare var a: number; \ No newline at end of file + declare var a: number; +==== SameNameDTsNotSpecifiedWithAllowJs/a.js (0 errors) ==== + var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json index 77e1f227030..b4c3fb8f51b 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json @@ -6,7 +6,8 @@ "project": "SameNameDTsNotSpecifiedWithAllowJs", "resolvedInputFiles": [ "lib.d.ts", - "SameNameDTsNotSpecifiedWithAllowJs/a.d.ts" + "SameNameDTsNotSpecifiedWithAllowJs/a.d.ts", + "SameNameDTsNotSpecifiedWithAllowJs/a.js" ], "emittedFiles": [] } \ No newline at end of file From 3bdad8a6b04a181257818e37a4779a9bc3eb8031 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 12 Nov 2015 14:25:46 -0800 Subject: [PATCH 86/89] When excluding same base name file from compilation, check for all supported javascript extensions instead of just .js --- src/compiler/commandLineParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 5336b01bb14..96b6bdeef94 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -517,7 +517,7 @@ namespace ts { // If this is one of the output extension (which would be .d.ts and .js if we are allowing compilation of js files) // do not include this file if we included .ts or .tsx file with same base name as it could be output of the earlier compilation - if (extension === ".d.ts" || (options.allowJs && extension === ".js")) { + if (extension === ".d.ts" || (options.allowJs && contains(supportedJavascriptExtensions, extension))) { const baseName = fileName.substr(0, fileName.length - extension.length); if (hasProperty(filesSeen, baseName + ".ts") || hasProperty(filesSeen, baseName + ".tsx")) { continue; From 0482afdc1ecb70e981a9d81fac2321bf8174a500 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 13 Nov 2015 14:28:40 -0800 Subject: [PATCH 87/89] Load only typescript files if resolving from node modules --- src/compiler/program.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 459252a9a8f..1d3894ee186 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -65,7 +65,7 @@ namespace ts { : { resolvedModule: undefined, failedLookupLocations }; } else { - return loadModuleFromNodeModules(moduleName, containingDirectory, supportedExtensions, host); + return loadModuleFromNodeModules(moduleName, containingDirectory, host); } } @@ -114,7 +114,7 @@ namespace ts { return loadNodeModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, host); } - function loadModuleFromNodeModules(moduleName: string, directory: string, supportedExtensions: string[], host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const failedLookupLocations: string[] = []; directory = normalizeSlashes(directory); while (true) { @@ -122,12 +122,13 @@ namespace ts { if (baseName !== "node_modules") { const nodeModulesFolder = combinePaths(directory, "node_modules"); const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); - let result = loadNodeModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + // Load only typescript files irrespective of allowJs option if loading from node modules + let result = loadNodeModuleFromFile(supportedTypeScriptExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } - result = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(supportedTypeScriptExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } From 1ee50223503fc646ab12bf191d0989760ec447c5 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 16 Nov 2015 11:49:26 -0800 Subject: [PATCH 88/89] Change the api for node name resolver to take compiler options instead of supportedExtensions --- src/compiler/program.ts | 6 +++--- tests/cases/unittests/moduleResolution.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 1d3894ee186..80995afe5aa 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -42,14 +42,14 @@ namespace ts { : compilerOptions.module === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic; switch (moduleResolution) { - case ModuleResolutionKind.NodeJs: return nodeModuleNameResolver(moduleName, containingFile, getSupportedExtensions(compilerOptions), host); + case ModuleResolutionKind.NodeJs: return nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host); case ModuleResolutionKind.Classic: return classicNameResolver(moduleName, containingFile, compilerOptions, host); } } - export function nodeModuleNameResolver(moduleName: string, containingFile: string, supportedExtensions: string[], host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const containingDirectory = getDirectoryPath(containingFile); - + const supportedExtensions = getSupportedExtensions(compilerOptions); if (getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { const failedLookupLocations: string[] = []; const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index 295410ef239..4c35d61147a 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -53,7 +53,7 @@ module ts { for (let ext of supportedTypeScriptExtensions) { let containingFile = { name: containingFileName } let moduleFile = { name: moduleFileNameNoExt + ext } - let resolution = nodeModuleNameResolver(moduleName, containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); @@ -92,7 +92,7 @@ module ts { let containingFile = { name: containingFileName }; let packageJson = { name: packageJsonFileName, content: JSON.stringify({ "typings": fieldRef }) }; let moduleFile = { name: moduleFileName }; - let resolution = nodeModuleNameResolver(moduleName, containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, packageJson, moduleFile)); + let resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(containingFile, packageJson, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); // expect three failed lookup location - attempt to load module as file with all supported extensions @@ -110,7 +110,7 @@ module ts { let containingFile = { name: "/a/b/c.ts" }; let packageJson = { name: "/a/b/foo/package.json", content: JSON.stringify({ main: "/c/d" }) }; let indexFile = { name: "/a/b/foo/index.d.ts" }; - let resolution = nodeModuleNameResolver("./foo", containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, packageJson, indexFile)); + let resolution = nodeModuleNameResolver("./foo", containingFile.name, {}, createModuleResolutionHost(containingFile, packageJson, indexFile)); assert.equal(resolution.resolvedModule.resolvedFileName, indexFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); assert.deepEqual(resolution.failedLookupLocations, [ @@ -127,7 +127,7 @@ module ts { it("load module as file - ts files not loaded", () => { let containingFile = { name: "/a/b/c/d/e.ts" }; let moduleFile = { name: "/a/b/node_modules/foo.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.deepEqual(resolution.failedLookupLocations, [ "/a/b/c/d/node_modules/foo.ts", @@ -150,7 +150,7 @@ module ts { it("load module as file", () => { let containingFile = { name: "/a/b/c/d/e.ts" }; let moduleFile = { name: "/a/b/node_modules/foo.d.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); }); @@ -158,7 +158,7 @@ module ts { it("load module as directory", () => { let containingFile = { name: "/a/node_modules/b/c/node_modules/d/e.ts" }; let moduleFile = { name: "/a/node_modules/foo/index.d.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, supportedTypeScriptExtensions, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); assert.deepEqual(resolution.failedLookupLocations, [ From 5ac6eb2d79d424fa216a1e01a6dd3dac9fbedb53 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 18 Nov 2015 10:48:03 -0800 Subject: [PATCH 89/89] PR feedback --- src/compiler/checker.ts | 5 +- src/compiler/declarationEmitter.ts | 107 +++++++++++++++-------------- src/compiler/program.ts | 10 +-- src/compiler/utilities.ts | 6 +- 4 files changed, 67 insertions(+), 61 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 36ca3eeb760..d2ccd9cebc8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12034,7 +12034,10 @@ namespace ts { const symbol = getSymbolOfNode(node); const localSymbol = node.localSymbol || symbol; - const firstDeclaration = forEach(symbol.declarations, + // Since the javascript won't do semantic analysis like typescript, + // if the javascript file comes before the typescript file and both contain same name functions, + // checkFunctionOrConstructorSymbol wouldn't be called if we didnt ignore javascript function. + const firstDeclaration = forEach(localSymbol.declarations, // Get first non javascript function declaration declaration => declaration.kind === node.kind && !isSourceFileJavaScript(getSourceFile(declaration)) ? declaration : undefined); diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 954a24ec5b1..0d94deda920 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -77,64 +77,67 @@ namespace ts { let addedGlobalFileReference = false; let allSourcesModuleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[] = []; forEach(sourceFiles, sourceFile => { - if (!isSourceFileJavaScript(sourceFile)) { - // Check what references need to be added - if (!compilerOptions.noResolve) { - forEach(sourceFile.referencedFiles, fileReference => { - const referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); + // Dont emit for javascript file + if (isSourceFileJavaScript(sourceFile)) { + return; + } - // Emit reference in dts, if the file reference was not already emitted - if (referencedFile && !contains(emittedReferencedFiles, referencedFile)) { - // Add a reference to generated dts file, - // global file reference is added only - // - if it is not bundled emit (because otherwise it would be self reference) - // - and it is not already added - if (writeReferencePath(referencedFile, !isBundledEmit && !addedGlobalFileReference)) { - addedGlobalFileReference = true; - } - emittedReferencedFiles.push(referencedFile); + // Check what references need to be added + if (!compilerOptions.noResolve) { + forEach(sourceFile.referencedFiles, fileReference => { + const referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); + + // Emit reference in dts, if the file reference was not already emitted + if (referencedFile && !contains(emittedReferencedFiles, referencedFile)) { + // Add a reference to generated dts file, + // global file reference is added only + // - if it is not bundled emit (because otherwise it would be self reference) + // - and it is not already added + if (writeReferencePath(referencedFile, !isBundledEmit && !addedGlobalFileReference)) { + addedGlobalFileReference = true; } - }); - } + emittedReferencedFiles.push(referencedFile); + } + }); + } - if (!isBundledEmit || !isExternalModule(sourceFile)) { - noDeclare = false; - emitSourceFile(sourceFile); - } - else if (isExternalModule(sourceFile)) { - noDeclare = true; - write(`declare module "${getResolvedExternalModuleName(host, sourceFile)}" {`); - writeLine(); - increaseIndent(); - emitSourceFile(sourceFile); - decreaseIndent(); - write("}"); - writeLine(); - } + if (!isBundledEmit || !isExternalModule(sourceFile)) { + noDeclare = false; + emitSourceFile(sourceFile); + } + else if (isExternalModule(sourceFile)) { + noDeclare = true; + write(`declare module "${getResolvedExternalModuleName(host, sourceFile)}" {`); + writeLine(); + increaseIndent(); + emitSourceFile(sourceFile); + decreaseIndent(); + write("}"); + writeLine(); + } - // create asynchronous output for the importDeclarations - if (moduleElementDeclarationEmitInfo.length) { - const oldWriter = writer; - forEach(moduleElementDeclarationEmitInfo, aliasEmitInfo => { - if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - Debug.assert(aliasEmitInfo.node.kind === SyntaxKind.ImportDeclaration); - createAndSetNewTextWriterWithSymbolWriter(); - Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); - for (let i = 0; i < aliasEmitInfo.indent; i++) { - increaseIndent(); - } - writeImportDeclaration(aliasEmitInfo.node); - aliasEmitInfo.asynchronousOutput = writer.getText(); - for (let i = 0; i < aliasEmitInfo.indent; i++) { - decreaseIndent(); - } + // create asynchronous output for the importDeclarations + if (moduleElementDeclarationEmitInfo.length) { + const oldWriter = writer; + forEach(moduleElementDeclarationEmitInfo, aliasEmitInfo => { + if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { + Debug.assert(aliasEmitInfo.node.kind === SyntaxKind.ImportDeclaration); + createAndSetNewTextWriterWithSymbolWriter(); + Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); + for (let i = 0; i < aliasEmitInfo.indent; i++) { + increaseIndent(); } - }); - setWriter(oldWriter); + writeImportDeclaration(aliasEmitInfo.node); + aliasEmitInfo.asynchronousOutput = writer.getText(); + for (let i = 0; i < aliasEmitInfo.indent; i++) { + decreaseIndent(); + } + } + }); + setWriter(oldWriter); - allSourcesModuleElementDeclarationEmitInfo = allSourcesModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); - moduleElementDeclarationEmitInfo = []; - } + allSourcesModuleElementDeclarationEmitInfo = allSourcesModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); + moduleElementDeclarationEmitInfo = []; } }); diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 8048c8aaad7..36b389662e2 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -342,7 +342,7 @@ namespace ts { host = host || createCompilerHost(options); // Map storing if there is emit blocking diagnostics for given input - const hasEmitBlockingDiagnostics = createFileMap(!host.useCaseSensitiveFileNames() ? key => key.toLocaleLowerCase() : undefined); + const hasEmitBlockingDiagnostics = createFileMap(getCanonicalFileName); const currentDirectory = host.getCurrentDirectory(); const resolveModuleNamesWorker = host.resolveModuleNames @@ -1287,14 +1287,14 @@ namespace ts { if (emitFileName) { const emitFilePath = toPath(emitFileName, currentDirectory, getCanonicalFileName); // Report error if the output overwrites input file - if (forEach(files, file => toPath(file.fileName, currentDirectory, getCanonicalFileName) === emitFilePath)) { - createEmitBlockingDiagnostics(emitFileName, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file); + if (filesByName.contains(emitFilePath)) { + createEmitBlockingDiagnostics(emitFileName, emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file); } // Report error if multiple files write into same file if (emitFilesSeen.contains(emitFilePath)) { // Already seen the same emit file - report error - createEmitBlockingDiagnostics(emitFileName, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); + createEmitBlockingDiagnostics(emitFileName, emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); } else { emitFilesSeen.set(emitFilePath, true); @@ -1303,7 +1303,7 @@ namespace ts { } } - function createEmitBlockingDiagnostics(emitFileName: string, message: DiagnosticMessage) { + function createEmitBlockingDiagnostics(emitFileName: string, emitFilePath: Path, message: DiagnosticMessage) { hasEmitBlockingDiagnostics.set(toPath(emitFileName, currentDirectory, getCanonicalFileName), true); programDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4287c0cb49b..db05964af2e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1913,11 +1913,11 @@ namespace ts { } else { const sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile]; - forEach(sourceFiles, sourceFile => { + for (const sourceFile of sourceFiles) { if (!isDeclarationFile(sourceFile)) { onSingleFileEmit(host, sourceFile); } - }); + } } function onSingleFileEmit(host: EmitHost, sourceFile: SourceFile) { @@ -1936,7 +1936,7 @@ namespace ts { const bundledSources = filter(host.getSourceFiles(), sourceFile => !isDeclarationFile(sourceFile) && // Not a declaration file (!isExternalModule(sourceFile) || // non module file - (getEmitModuleKind(options) && isExternalModule(sourceFile)))); // module that can emit + (getEmitModuleKind(options) && isExternalModule(sourceFile)))); // module that can emit - note falsy value from getEmitModuleKind means the module kind that shouldn't be emitted if (bundledSources.length) { const jsFilePath = options.outFile || options.out; const emitFileNames: EmitFileNames = {