From 0a67ac3b3ba1490e6b967f53f5160a282dec3c61 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 9 Sep 2015 13:32:13 -0700 Subject: [PATCH 01/61] 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 a1f6565ed1ffb..f792c728227ad 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/61] 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 a1861f6b46225..b7a2afce07e07 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 d5ede917b8f78..bc22975429ae9 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/61] 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 1ce3d9f33c3b1..e99a102307073 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 9cd0dd7b0cf0a..de21d58456f82 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 9cd0dd7b0cf0a..de21d58456f82 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 0917e72f1ce4d..b5cd0dfb00ee7 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/61] 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 99ea06532a0ee..414a2649e5625 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/61] 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 af48e67d964d7..59f97a9a6ef2e 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 7abec7b7c43cf..b0c877799c97e 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 d84b7b70ada36..a37401b9fae72 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/61] 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 0000000000000..c6711e4e85f42 --- /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 0000000000000..5260b8d6cf36a --- /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 0000000000000..dce83eeb8ebb7 --- /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 0000000000000..04f36213b1bde --- /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 0000000000000..805d202a14c20 --- /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 0000000000000..b206a486351dc --- /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 0000000000000..32d0261061f6f --- /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 0000000000000..5260b8d6cf36a --- /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 0000000000000..dce83eeb8ebb7 --- /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 0000000000000..32a60df099647 --- /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 0000000000000..4a60c54c3aba3 --- /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 0000000000000..53ed217c2b57c --- /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 0000000000000..88931fa2eaffb --- /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 0000000000000..47ca5115cbb96 --- /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 0000000000000..2936f2eda7c7e --- /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/61] 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 bc22975429ae9..a2ec76ee86c5e 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/61] 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 f65a4f88730fe..ad2648ef2086f 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 f47fc227baed6..b35c41da4aceb 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 3dd1c80705ced..ba655091dedc1 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 8d5b15795f7f8..c5b1a82a5a871 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 393ab41fa1f03..9641bdf363ad5 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 bfb438a387dff..a7744499f4990 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 dd706ef33a105..ab2372cbae9a3 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 d28f29f0962a5..e191dc2d11030 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 33e020b5679d7..816919c6805ac 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 df2e88204669a..392772860e406 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 7ed8b44dc7666..3f4ee67cb4809 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 817c9aeeff370..a7135b53d57f8 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 3da306fedbf61..92d04fc10cc7d 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 378b11cfd2212..610826b52cefb 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 6354f64d834e2..257e1897e5c55 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 617676ba0c0ad..585363f4d9743 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 d86925f1fd328..97a51d7032de4 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 61cc569b965f5..81436a6e51041 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 61cc569b965f5..81436a6e51041 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 f0d9bbe8cfffe..742a39e1324e2 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 fe4de21a00f9c..1bacedec76c0f 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 b0d544201a4d3..5cab90d6a7f86 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 f987b48aecadd..8bd908880f6cf 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 5590b907eecb9..1bacedec76c0f 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 c6ef9033bf180..5cab90d6a7f86 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 bb228caa0c914..5a84a27912260 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 ed9f92d88ef86..c1d6510b1f719 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 777a9fab04825..adf9d741dbe3c 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 482ad586dc2c4..e10556360a4d8 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 89e7d461fb20a..96f92c8571b50 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 7138680d709ec..97470e6408d6b 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 52ef5a10a67d5..46185a2dfe45f 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 9840181e09297..ed11f2f08ac29 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 0506c72fc5664..0000000000000 --- 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 bb8a5202bc508..e0eef7d892d0b 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 7742122b68794..6d9fc540d9a44 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 749e86116e863..2997acd58ac5b 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 12e6f23f92e14..bb3e560a2f83e 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 eb2ee3ee33ae7..2963a9d694fbf 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 c705cbc5af843..625dbfbe699b8 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 898b9715ca42b..27dca700bb904 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 8c6881a9bc113..60d2ca987e438 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 8cb65747e6f16..4498b462e1878 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 337fcb16ba315..2579ffc4a9029 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 d00520a0618f0..29353b3284a58 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 dd5d23a538cac..52cdbaa140253 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 efdba17dc9342..396fc5979115d 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 5e30fd0b2ff38..4755208b21a31 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 d7e83b81070ca..4583a1c073070 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 2722a3ce7abcd..02d394752d1d6 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 9fa3e0da0d6bc..3d86a0a714444 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 d31445505f7e1..7edf071f5d199 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 d4ae3c34cf10e..2f2d16d8ad0dc 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 1955fe5da6ed9..d2a474c023d06 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 95e4ec88d923e..6d002e5a66ed2 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 91ede682d7cab..625dbfbe699b8 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 8dee90a199f83..27dca700bb904 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 7d290bcae44fa..c2277a90859bf 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 68b9bfb62db04..6d002e5a66ed2 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 90d0d003c28d6..0607a01a11c34 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 af1de76995c00..f734eb92ed572 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 7503c5f5969ad..49bb504604e04 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 1e1efb7ea22e3..3bf94909c70db 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 d213ccaf54eb5..84fe8fb20f259 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 564767e6169b5..f91f268f385ca 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 c797362e8d770..6513b9879dcaf 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 8cf853820e19a..2898a6bc25144 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 211a349b30456..0a54dc32c46c6 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 d56cb4cc2e808..ccd1ba8157c73 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 1b42dd014655d..d7aa46bc05ace 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 34fe9a3bfb6c7..abfb54e000c7e 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 4f1960358a560..732ac9500a9a2 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 f4af0ba875acb..4665c5e322f60 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 4d05254ace8d5..acbd7f407de8b 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 7ebd2e8f4db8a..d474e48b21bcd 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 50fff6c80fddc..e1b00c6b573e9 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 9bb09c6cd85e4..ae194978a3516 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 db89d6678b669..99a60c24ce215 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 b54430bd106c8..0042c5b052c24 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 c7e0536bde28e..47c60fba1b38a 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 6dcee7d18fa8d..9214ffe7dbb3f 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 84c8619ab9635..72cd1cb9f0030 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 4f3ee00d82f00..f6a4913e558e6 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 fb8572116b16f..dfed67210ed14 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 71a22b502aa34..4a15005f6fb72 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 12973efdda7a1..b4dd94ef0eb8b 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 f8631bdec0c2b..461c494bc5887 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 4022602e53a14..94758b291acaf 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 613835f32113e..57884f86b56db 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 e1e440db5f3bc..d594aba237bc9 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 58236a4e462f6..2400ef620ebc4 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 80f9555030fc2..2768a6c531d0b 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 24480ab7f2b41..79cbd1a37af11 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 831b3a54b413a..6c8560f225d9b 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 0e30cad9673a0..1a887c3999577 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 1961215fa05e2..a5abea6717fbb 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 a4728b2f749e5..5b8468696c019 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 0b5138b7b4927..4481b9033f4c5 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 1d06656d529a5..c6934e9df899b 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 2935bcd4f63d5..efb1d9ae5dcd7 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 56ea51582539b..4fd87304a72d4 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 bc3c7c5ebfc55..1b8b6c5834c15 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 607d1c5ec66fc..75b23db761e19 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 0e383af5e7b13..e6dd599defc8d 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 ea395cb507762..40d86816f7667 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 8aadfec0f782e..4dcd644e47164 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 8bbbfaaeb689d..461ffd78aaa5c 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 ba3509f4fa135..cdfb91c706728 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 1336cc6df0c06..66269efee9f2d 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 1b6d174fea8b0..43d0512c893e1 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 b8549e19535ff..20b5b730d4cd6 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 7df44b052a214..06daf11ceac21 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 92ff05d1aedb7..5f54bc23cd055 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 4217761c4025c..d82f26ee8b51a 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 c897a51eaeb56..bc65bb0bb02d2 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 bfa04219ef990..e38c64d084753 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 6725bd216bd33..dd84e6f07b5ff 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 baa75526dd775..bfa78a3e96c5e 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 aaca98ae9dbf3..9d373bc62bec2 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 a427270354ea8..64ad0420baffb 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 1101df49a1c43..66b1494e8256b 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 5eefc31710d88..5e070bc83a969 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 f5633b739e3b1..5b267d8b80262 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 aa958a0c79b8d..ccb9041e9314a 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 1f1ba0926a063..b53526b5d11fd 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 514be1e532d18..770221ebcb50e 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 64542d125b924..3b88d4e03719f 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 f4db9a3f36fd6..49a5cf8a51b3f 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 7aea986526b99..0937b0d37ac78 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 62db6b0f01242..6b9d2d5de47c0 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 f493347ca9c4a..3478923f9ee92 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 3bfd5505e766c..85dec56b2f832 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 a7d98d35b640a..d5a9436872a83 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 80adad0f406dc..d704d43b5bab0 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 e9734fb5ee1d9..08da0bf05fbd7 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 b02564ae104a7..ac36205029e46 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 7ab98cab31441..c427a49cb0c31 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 f7b179f254ffe..0ee595a9a3ddc 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 78e49a227e224..375791fe4bbdb 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 260bd9cd22804..5b13c463bd6e2 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 4149142dd8205..640f666c0d880 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 e180d2b6b7065..9173fde2ccc60 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 4b2b46955617d..fd7fff1697628 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 049fdb1819b6f..6262b94aa41e3 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 e28910b62c7b1..928eeecadfac9 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 239105485342e..bd42177e18728 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 042488cf04cf2..cec45805c1e70 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 8babe724fa17a..8416ec015b273 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 fca2b02823746..23578d4ed91a4 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 dcbfafcef2f2b..d61cea24d2cf0 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 7517c85fc7370..c1fba50fd8fee 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 7de35241a3a13..b633f57ec1333 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 e1c9cb6e6bfbf..d6d6c285d7954 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 a1b5894106fc9..9614cbf2f2cf4 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 3aa3f0d0f8adb..a0d8266faa0e1 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 4622aef19917e..824aa5cfdae99 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 091a193cdc5c1..f649ca43ebd4b 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 44ff4cba292e5..a79445c28afa0 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 7287e59b9b15f..73c65f50aca54 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/61] 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 0000000000000..d3175d9f116a0 --- /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 0000000000000..80fb4ded96d0e --- /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 0000000000000..bc0bb189c95d4 --- /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 0000000000000..f64628d3bc9a6 --- /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 0000000000000..cf030d3c4f2af --- /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 0000000000000..54314ef431e95 --- /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 0000000000000..07fc015fc7239 --- /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 0000000000000..e63eede29bdb9 --- /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 0000000000000..1eefd3b8eaec7 --- /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 0000000000000..613dc7a51a365 --- /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 0000000000000..8585285c1ed6c --- /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 0000000000000..aac386f2dd11a --- /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 0000000000000..48528b14531c0 --- /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 0000000000000..3afd84da9bebe --- /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 0000000000000..78a92e9460aa1 --- /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 0000000000000..d7c8faab8dc47 --- /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 0000000000000..41638f5107753 --- /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 0000000000000..6267d2f37fe31 --- /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 0000000000000..4a5e222058beb --- /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 0000000000000..ceef95023df60 --- /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 0000000000000..636866e7eeb79 --- /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 0000000000000..2670e1503a915 --- /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 0000000000000..ad1126ebf27a8 --- /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 0000000000000..42a6e36efc867 --- /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 0000000000000..0a289515cb3c7 --- /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 0000000000000..85e9a7efb6d19 --- /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 0000000000000..014edddc34190 --- /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 0000000000000..4de8f393a9389 --- /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 0000000000000..47b445e38aceb --- /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 0000000000000..209efc3e12eab --- /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 0000000000000..cd59f862ac841 --- /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 0000000000000..cb7a051016d13 --- /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 0000000000000..01080ef8556dc --- /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 0000000000000..d4b9aeb0b812c --- /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 0000000000000..2a8d892c80d2c --- /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 0000000000000..29f0c18c81b90 --- /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 0000000000000..f7c98808ad5d9 --- /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 0000000000000..6b340a63dda8a --- /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 0000000000000..5e2581676b8f5 --- /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 0000000000000..e6289fd6eb090 --- /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/61] 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 0000000000000..bcba97af02497 --- /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 0000000000000..4ce7529b83d20 --- /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 0000000000000..54d0ec8631f40 --- /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 0000000000000..71d04eec64e42 --- /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/61] 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 ad2648ef2086f..be924fe6ae91d 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 0000000000000..d742e68dbdcaa --- /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 0000000000000..e6d379e0e3ba9 --- /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/61] 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 d22bc98668840..1bc2c49e75d63 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/61] 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 fe4ab8ea8ea4f..12e3222a54177 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 fa9e0b566a937..8a96d681f2427 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 fa9e0b566a937..8a96d681f2427 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 ebaec46d1e3e9..997c2ed46c0d4 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 ebaec46d1e3e9..997c2ed46c0d4 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 ee020b0ff8054..40f9da3afbfe3 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 ee020b0ff8054..40f9da3afbfe3 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 ed7bcd289e722..d23b5b2408fa4 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 ed7bcd289e722..d23b5b2408fa4 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 8f512dcc98c55..7474a34ec8ce7 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 8f512dcc98c55..7474a34ec8ce7 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 4f65daf7560a9..b0c916710122d 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 4f65daf7560a9..b0c916710122d 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 6432d5ae91e75..588d2404ef8da 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 6432d5ae91e75..588d2404ef8da 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 31a0fb89c5026..ff1b014410ef8 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 31a0fb89c5026..ff1b014410ef8 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 355458526bc92..a155932652879 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 355458526bc92..a155932652879 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 f703a63b71fba..971d1a2aaab6a 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 f703a63b71fba..971d1a2aaab6a 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 a6bc71dd664d0..27d5d010b40f1 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 a6bc71dd664d0..27d5d010b40f1 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 e873c8fc472e5..8e16e5d165d1d 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 e873c8fc472e5..8e16e5d165d1d 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 d8f4cc74008a0..86f3cf5c9a961 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 d8f4cc74008a0..86f3cf5c9a961 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 49018ee59734b..f511365c917ed 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 49018ee59734b..f511365c917ed 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 097c9bbf2097c..b3c5617dffa61 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 097c9bbf2097c..b3c5617dffa61 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 bcf3a4400aa95..81f0ad78eb302 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 bcf3a4400aa95..81f0ad78eb302 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 d5914d929503b..8a32acd12e1aa 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 d5914d929503b..8a32acd12e1aa 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 2c5e1dae38a29..23cc45f96453c 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 2c5e1dae38a29..23cc45f96453c 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 8431a99c800ca..72a0dce300769 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 8431a99c800ca..72a0dce300769 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 4a180368e2023..d26b77e467512 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 4a180368e2023..d26b77e467512 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 a44a569a0a608..e712eab1a751e 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 a44a569a0a608..e712eab1a751e 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 7c0069605da79..c66cea7fd447e 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 7c0069605da79..c66cea7fd447e 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 1b09decc58d02..a3c1bede2a1ef 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 1b09decc58d02..a3c1bede2a1ef 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 a02eb484aa248..ddd2bdee5a87a 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 a02eb484aa248..ddd2bdee5a87a 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 ec516baecfe0f..d452a55784f64 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 ec516baecfe0f..d452a55784f64 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 5352fd8a988f2..af9fb8ba53bc7 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 5352fd8a988f2..af9fb8ba53bc7 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 0a0d68e300a05..9faeb47e4c8ec 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 0a0d68e300a05..9faeb47e4c8ec 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 8e87f61b8df1b..4dc8fc45037de 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 8e87f61b8df1b..4dc8fc45037de 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 4ed441e255240..bf282177afdec 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 4ed441e255240..bf282177afdec 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 8ec143b2dce59..42354ecded5e9 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 8ec143b2dce59..42354ecded5e9 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 96777b6f502f6..969b730a251b2 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 96777b6f502f6..969b730a251b2 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 f3c86f22eb74d..3a1983f88d979 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 f3c86f22eb74d..3a1983f88d979 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 a4e8c09b004df..162bcbaa749a7 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 a4e8c09b004df..162bcbaa749a7 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 f4a8884b58eea..440dbb0972e3a 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 f4a8884b58eea..440dbb0972e3a 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 fe0b8045a5c17..0dfc88c1aa5b5 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 fe0b8045a5c17..0dfc88c1aa5b5 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 a2779060068a2..5abb8eec3dafc 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 a2779060068a2..5abb8eec3dafc 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 120bb5afbb6ea..d587558fbaf01 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 120bb5afbb6ea..d587558fbaf01 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 a87c7d36d8ede..0eb8315ff9bec 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 a87c7d36d8ede..0eb8315ff9bec 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 718cfdabf0f08..89fc00cb3ec51 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 718cfdabf0f08..89fc00cb3ec51 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 f51e53f02f6e7..d0034c920bc50 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 f51e53f02f6e7..d0034c920bc50 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 0d3f3ad02d5fd..17fc8719be6b2 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 0d3f3ad02d5fd..17fc8719be6b2 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 d4d500a397e17..ee2758b4e8777 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 d4d500a397e17..ee2758b4e8777 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 12801537d2bdf..de85b187e28df 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 12801537d2bdf..de85b187e28df 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 d6bbe96a7e07c..0e7a2f759bc60 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 d6bbe96a7e07c..0e7a2f759bc60 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 bb7ccbf453ba8..f8b9e1b96c2b2 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 bb7ccbf453ba8..f8b9e1b96c2b2 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 f654dbc3fac65..4960088c2691e 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 f654dbc3fac65..4960088c2691e 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 fc285030e8fa7..e14165a2094ee 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 fc285030e8fa7..e14165a2094ee 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 b5b1dfba62eea..f47e52efaae15 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 b5b1dfba62eea..f47e52efaae15 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 a06e2f34d5ac5..d54421a13acff 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 a06e2f34d5ac5..d54421a13acff 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 772431187026e..da673bae82c96 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 772431187026e..da673bae82c96 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 c661284121066..24e51c87f59b7 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 c661284121066..24e51c87f59b7 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 b225c4e408f6b..9ad38e70ea2d5 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 b225c4e408f6b..9ad38e70ea2d5 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 f987aa49ffeb3..155d2931181df 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 f987aa49ffeb3..155d2931181df 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 2bb23cdc61028..f749081c10c40 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 2bb23cdc61028..f749081c10c40 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 6ecdc26ccd446..e63320ddb6a21 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 6ecdc26ccd446..e63320ddb6a21 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 9884550745c4b..8bedb00204127 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 9884550745c4b..8bedb00204127 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 e061982b32fc3..de091e6dd2861 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 e061982b32fc3..de091e6dd2861 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 f9f02dcf7894e..f8a6fa3cd5947 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 f9f02dcf7894e..f8a6fa3cd5947 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 db2995acf6956..c307775e5490c 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 db2995acf6956..c307775e5490c 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 e636ce61f7e6e..f0c017279578f 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 e636ce61f7e6e..f0c017279578f 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 2c7699ff0faed..91546861e0159 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 2c7699ff0faed..91546861e0159 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 a61a50a760d15..80247e1b00972 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 a61a50a760d15..80247e1b00972 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 05da8c15292e1..00ba79cee2676 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 05da8c15292e1..00ba79cee2676 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 5ea7aa806651d..078c565dee6c9 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 5ea7aa806651d..078c565dee6c9 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 0d16b53af662f..dfd35e2a11e4c 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 0d16b53af662f..dfd35e2a11e4c 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 8fb63eb43b0b4..e515573b4d86f 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 8fb63eb43b0b4..e515573b4d86f 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 6f141f8151104..6ea29c1e036a1 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 6f141f8151104..6ea29c1e036a1 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 1f73a2a33d6cc..999d4c5c3cbe7 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 1f73a2a33d6cc..999d4c5c3cbe7 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 dcd18f3e946b5..85527f93f24e8 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 dcd18f3e946b5..85527f93f24e8 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 689739aedcef4..9cdafc48766e3 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 689739aedcef4..9cdafc48766e3 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 bbd1c10f32016..7ee5dedd0de58 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 bbd1c10f32016..7ee5dedd0de58 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 634d80d7ff00d..d48c811492766 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 634d80d7ff00d..d48c811492766 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 edd08fbfe107f..eb0a847c3cb3f 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 edd08fbfe107f..eb0a847c3cb3f 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 0b2ea47302960..ec6fe614b436c 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 0b2ea47302960..ec6fe614b436c 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 d4965ed4e7484..f8d936825fdcd 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 d4965ed4e7484..f8d936825fdcd 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 2f2a4280abf1c..25ba499857816 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 2f2a4280abf1c..25ba499857816 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 006720b1cc3d5..4978c9691b4aa 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 006720b1cc3d5..4978c9691b4aa 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 c36f3ade5e08b..b1eff624a4bb3 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 c36f3ade5e08b..b1eff624a4bb3 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 4741b9cf9e18d..f0c3ddab2a589 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 4741b9cf9e18d..f0c3ddab2a589 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 ec6313ac50c0c..ce844561c4150 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 ec6313ac50c0c..ce844561c4150 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 9a0d0258ca4bd..a73eb85b5c4f2 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 9a0d0258ca4bd..a73eb85b5c4f2 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 3ecf4bc4cc448..713487cc8d08e 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 3ecf4bc4cc448..713487cc8d08e 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 d901eb0a79073..7b1ffa340c57f 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 d901eb0a79073..7b1ffa340c57f 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 278bc2c86e5de..bf1e9882756a0 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 278bc2c86e5de..bf1e9882756a0 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 2cfc9aebda200..53aa4866a4103 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 2cfc9aebda200..53aa4866a4103 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 fc4e8b7c9db59..e57d54bde3b55 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 fc4e8b7c9db59..e57d54bde3b55 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 a20ecf2d6c97d..76e138ca5119f 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 a20ecf2d6c97d..76e138ca5119f 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 cfa0ec5cb81b5..46ba3b1411432 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 cfa0ec5cb81b5..46ba3b1411432 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 ddfa8259401e4..ae04c034c8cc9 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 ddfa8259401e4..ae04c034c8cc9 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 6e6c3e73c0390..5bac47f1b0b8c 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 6e6c3e73c0390..5bac47f1b0b8c 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 f6aa3055f76d9..b0159f72fc0e6 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 f6aa3055f76d9..b0159f72fc0e6 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 c85db0226a2c0..601a381b6bc25 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 c85db0226a2c0..601a381b6bc25 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 ceda4546fcebf..72d412d2e5c2d 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 ceda4546fcebf..72d412d2e5c2d 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 2bdff3a64beee..ad03221057b16 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 2bdff3a64beee..ad03221057b16 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 2c66c2dc3a351..8ad3500d92659 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 2c66c2dc3a351..8ad3500d92659 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 4d7e0f659ef1b..82d34274776f0 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 4d7e0f659ef1b..82d34274776f0 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 f68a658cc8b51..323adcd17b92e 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 f68a658cc8b51..323adcd17b92e 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 5f6d0ccd74b8d..f3fb4f89412ef 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 5f6d0ccd74b8d..f3fb4f89412ef 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 9dca1ba6d4b78..8d6923824ebc2 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 9dca1ba6d4b78..8d6923824ebc2 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 d3d7588f1caa6..0bdb289d92d02 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 d3d7588f1caa6..0bdb289d92d02 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 16831b328e9c7..bb8d7b368595b 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 16831b328e9c7..bb8d7b368595b 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 b22aefac3ef5c..482cfcd40b4e5 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 b22aefac3ef5c..482cfcd40b4e5 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 2ec18b3ac5acf..bb79b1a7911e5 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 2ec18b3ac5acf..bb79b1a7911e5 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 fdde42592ca8d..42f348a4b56d6 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 fdde42592ca8d..42f348a4b56d6 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 deb12150736aa..57e51ed359a2d 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 deb12150736aa..57e51ed359a2d 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 43059eaa5c6bc..734abfe9f95a3 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 43059eaa5c6bc..734abfe9f95a3 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 6d9cf2998a884..560eef6c4905a 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 6d9cf2998a884..560eef6c4905a 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 09c6092f16447..bf155fe1fe347 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 09c6092f16447..bf155fe1fe347 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 6fb17fa06b80c..87f1ac0b6fce1 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 6fb17fa06b80c..87f1ac0b6fce1 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 9e98d46666fa0..2475d02eb4796 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 9e98d46666fa0..2475d02eb4796 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 d96a3e5f83237..8a746a518a3ad 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 d96a3e5f83237..8a746a518a3ad 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 b3e80123c047c..d68d0afc19910 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 b3e80123c047c..d68d0afc19910 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 6e1f133ef6486..09cb6b546b32b 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 6e1f133ef6486..09cb6b546b32b 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 c15e91877ae5c..d3ba076ef6fed 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 c15e91877ae5c..d3ba076ef6fed 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 e2621b2fa52f4..914b6e2d79252 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 e2621b2fa52f4..914b6e2d79252 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 b65bed6197951..cdd0d1b3328d9 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 b65bed6197951..cdd0d1b3328d9 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 a8662e09bf6ea..2e482f41e6640 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 a8662e09bf6ea..2e482f41e6640 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 a43e0f691728e..ba9d94f2b0c55 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 a43e0f691728e..ba9d94f2b0c55 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 b84ccc2bc2308..c955083f7f13e 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 b84ccc2bc2308..c955083f7f13e 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 43d3db291ff91..3fa14686a7c03 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 43d3db291ff91..3fa14686a7c03 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 6bd6db427c4f5..ed994f82308dc 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 6bd6db427c4f5..ed994f82308dc 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 f57c8110827d0..5ee7318ed14e8 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 f57c8110827d0..5ee7318ed14e8 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 02981610092e3..a7a05e1024831 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 02981610092e3..a7a05e1024831 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 74add9e8d7bb9..3a215e043c6ea 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 74add9e8d7bb9..3a215e043c6ea 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 772190b485172..369da8c6254cd 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 772190b485172..369da8c6254cd 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 8a6eb54b7892f..6534ef2784766 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 8a6eb54b7892f..6534ef2784766 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 ec9d13d68de6f..71b375b8650d6 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 ec9d13d68de6f..71b375b8650d6 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 03f06090742ea..3ec5d65f7a0d9 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 03f06090742ea..3ec5d65f7a0d9 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 08bdabb1c6e3c..faa7592db458f 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 08bdabb1c6e3c..faa7592db458f 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 a6c034775ce78..73333fd4868bb 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 a6c034775ce78..73333fd4868bb 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 0e73f218462dd..326bb4aaff6fe 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 0e73f218462dd..326bb4aaff6fe 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 99815d5266195..e47173aac84b1 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 99815d5266195..e47173aac84b1 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 82ef1c7d88290..19b2ec4e5ffc4 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 82ef1c7d88290..19b2ec4e5ffc4 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 d5f4fd9c6546e..cbab94f1153dc 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 d5f4fd9c6546e..cbab94f1153dc 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 2acbea1cc8dcc..79c4217ab5184 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 2acbea1cc8dcc..79c4217ab5184 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 6603e36c2811a..bb4c36687354a 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 6603e36c2811a..bb4c36687354a 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 69a577baffdf8..dafceda24d0d1 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 69a577baffdf8..dafceda24d0d1 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 f28c784480f22..910f5cd7e8ff0 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 f28c784480f22..910f5cd7e8ff0 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 77fa77f5fb05d..29a92a51eec08 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 77fa77f5fb05d..29a92a51eec08 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 a4a6698d3ca97..7d87bfe98f2cb 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 a4a6698d3ca97..7d87bfe98f2cb 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 8a3035f363273..6ffc10b044810 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 8a3035f363273..6ffc10b044810 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 9f10fc5e7e05a..28b99749a6e7e 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 9f10fc5e7e05a..28b99749a6e7e 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 71896f202b298..9a897de73348f 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 71896f202b298..9a897de73348f 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 e7dfb0beff37c..b785e8311f369 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 e7dfb0beff37c..b785e8311f369 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 bfb740034016f..83a4cf9e563ea 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 bfb740034016f..83a4cf9e563ea 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 1f2e577b0b3a1..f9f31a969c46e 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 1f2e577b0b3a1..f9f31a969c46e 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 4d33e85e2ba8d..a4fc65ac644a4 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 4d33e85e2ba8d..a4fc65ac644a4 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 bf86309b59a89..23096eb32674f 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 bf86309b59a89..23096eb32674f 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 4b371bf592416..e60785d9b5753 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 4b371bf592416..e60785d9b5753 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 06a55d4a7cce7..c7799ba328c60 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 06a55d4a7cce7..c7799ba328c60 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 d87b6b22829be..c9eabb1402488 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 d87b6b22829be..c9eabb1402488 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 c80db3f739c73..39e0e9577bbb1 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 c80db3f739c73..39e0e9577bbb1 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 ff189067e6755..28fbd41bab9ff 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 ff189067e6755..28fbd41bab9ff 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 8896f911a9998..d6c94f991650b 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 8896f911a9998..d6c94f991650b 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 ddcfbd2ff9cc1..bc02869d35bee 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 ddcfbd2ff9cc1..bc02869d35bee 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 ef5cb2df6335d..e949da7fdbf1d 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 ef5cb2df6335d..e949da7fdbf1d 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 a46fe8457105a..892bc6673b9d7 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 a46fe8457105a..892bc6673b9d7 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 50a4518a1b08c..e19fbed25d901 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 50a4518a1b08c..e19fbed25d901 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 b6ef6b5bd517d..7808e3d9b28e9 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 b6ef6b5bd517d..7808e3d9b28e9 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 c2594c0093cb8..f33a095e60eea 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 c2594c0093cb8..f33a095e60eea 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 d2c6956bf8021..1a429c986d8ef 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 d2c6956bf8021..1a429c986d8ef 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 cc2a6c9b1aa06..dd54871f5637b 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 cc2a6c9b1aa06..dd54871f5637b 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 4a7cc668a6a86..0c8a05da3b10e 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 4a7cc668a6a86..0c8a05da3b10e 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 6766f67eab06d..efb3da725dcbc 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 6766f67eab06d..efb3da725dcbc 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 5419c5a822564..ecfa616be4c46 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 5419c5a822564..ecfa616be4c46 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 d7f99610babea..46f3e8aad7da0 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 d7f99610babea..46f3e8aad7da0 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 1e722cb852eb9..bfd34fb2ec0d7 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 1e722cb852eb9..bfd34fb2ec0d7 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 d80dacb3444d7..fedae84631765 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 d80dacb3444d7..fedae84631765 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 a68d507bdf3e0..b2e2f7f7b9bd5 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 a68d507bdf3e0..b2e2f7f7b9bd5 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 1641625569c29..0730753a4718b 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 1641625569c29..0730753a4718b 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 085ef5e8f1971..d1d60d81434f5 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 085ef5e8f1971..d1d60d81434f5 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 9df1fd3922ee8..46d15a907a47f 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 9df1fd3922ee8..46d15a907a47f 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 1a472ca17eedb..53336eb9a6f30 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 1a472ca17eedb..53336eb9a6f30 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 98a2dea24849d..a5cf9d7d10e25 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 98a2dea24849d..a5cf9d7d10e25 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 dbef889efec2c..edb9f68ed0092 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 dbef889efec2c..edb9f68ed0092 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 afc78006729ea..0091f70060375 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 afc78006729ea..0091f70060375 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 53e86654ad1d8..259d1eb920a76 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 53e86654ad1d8..259d1eb920a76 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 77912e79790f3..ac0c223a65fe1 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 77912e79790f3..ac0c223a65fe1 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 362af3ded0523..40a5e623164ec 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 362af3ded0523..40a5e623164ec 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 7c4bb20e942a6..b779b692d7780 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 7c4bb20e942a6..b779b692d7780 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/61] 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 5124dccee04e8..3c1d3a97d168d 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 96759b6825012..805275776ad0a 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 be924fe6ae91d..9eb1cd45f53b1 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 12e3222a54177..8b30a8be37b34 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 }); + } + + if (configFileName) { + let result = ts.readConfigFile(configFileName, getSourceFileText); + if (result.error) { + return { + moduleKind, + errors: [result.error] + }; + } - let projectCompilerResult = compileProjectFiles(moduleKind, () => testCase.inputFiles, getSourceFileText, writeFile); + 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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..32b8c5a28f727 --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..32b8c5a28f727 --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..e2be92cb38a3a --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..e2be92cb38a3a --- /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 0000000000000..b391da41dc308 --- /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 0000000000000..70ae0435eee6b --- /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 0000000000000..6d820a0093e01 --- /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 0000000000000..a6bd8e8d430e9 --- /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 0000000000000..1c0fb803356f6 --- /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/61] 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 58a4554593978..1bdbe07800164 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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..ddf148ea982ac --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..ddf148ea982ac --- /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 0000000000000..656c973a98116 --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..6d820a0093e01 --- /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 0000000000000..1c0fb803356f6 --- /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/61] 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 7b776f8c6e15e..9283f8d939deb 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 8b30a8be37b34..32e61cb8d7b71 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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..2b4d6b2b35aa8 --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..2b4d6b2b35aa8 --- /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 0000000000000..75582ff44024d --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..6d820a0093e01 --- /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 0000000000000..e69de29bb2d1d From 70d3de466880b5ebc7664c9a95ce12e24712cf14 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 12:38:11 -0700 Subject: [PATCH 17/61] 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 0000000000000..e0f30e0ed4f94 --- /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 0000000000000..e0f30e0ed4f94 --- /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 0000000000000..9d0ec1282785b --- /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 0000000000000..d9e24d329b733 --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..e50280fa0d3a2 --- /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/61] 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 0000000000000..4d345f51353d8 --- /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 0000000000000..4d345f51353d8 --- /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 0000000000000..cc11c7d2625d2 --- /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 0000000000000..16cb2db6fd7cc --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..e69de29bb2d1d From dbb2772ed8af81e0356a8da91f0bcf10a2fc92bc Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 12:47:45 -0700 Subject: [PATCH 19/61] 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 0000000000000..0ba5af91d2183 --- /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 0000000000000..bbae04a30bf94 --- /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 0000000000000..f2115703462fc --- /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 0000000000000..0ba5af91d2183 --- /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 0000000000000..bbae04a30bf94 --- /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 0000000000000..f2115703462fc --- /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 0000000000000..d23706bab94ad --- /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 0000000000000..6d820a0093e01 --- /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 0000000000000..9fdf6253b8006 --- /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 0000000000000..582826bdceb79 --- /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/61] 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 0000000000000..7a7e0b2c453b5 --- /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 0000000000000..bbae04a30bf94 --- /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 0000000000000..f2115703462fc --- /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 0000000000000..7a7e0b2c453b5 --- /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 0000000000000..bbae04a30bf94 --- /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 0000000000000..f2115703462fc --- /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 0000000000000..43fe621e0657b --- /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 0000000000000..6d820a0093e01 --- /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 0000000000000..9fdf6253b8006 --- /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 0000000000000..1b726957fddd7 --- /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/61] 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 e5914d1006093..03d2e0453b14c 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 56e996662c87a..bb9cb0a44e515 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 cae0923094c8c..696d2f481e053 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 e99a102307073..1ce3d9f33c3b1 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 d3175d9f116a0..a210385d996be 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 80fb4ded96d0e..6017ddc7a1120 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 c6711e4e85f42..4c9f6802fd94f 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 04f36213b1bde..33077f3038f3e 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 bc0bb189c95d4..6b9d97e55bb32 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 f64628d3bc9a6..a349e2bca13c8 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 cf030d3c4f2af..df014047b35f6 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 54314ef431e95..e53bf2ac8608c 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 07fc015fc7239..c46c3c05b3fbe 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 e63eede29bdb9..8748064cc9608 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 1eefd3b8eaec7..68b131d39f92d 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 613dc7a51a365..0ecf6f3c666c7 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 8585285c1ed6c..907775c7be65e 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 aac386f2dd11a..e5072278f4c40 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 bcba97af02497..d28299c543aca 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 48528b14531c0..50746dcfc82e1 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 d742e68dbdcaa..1ca6e25178823 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 3afd84da9bebe..6af5751ea8545 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 78a92e9460aa1..cade211aa63a3 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 d7c8faab8dc47..de1e1038db641 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 41638f5107753..ae3fd23c6efe6 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 6267d2f37fe31..708ff378137f0 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 4a5e222058beb..391e8f476daa1 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 ceef95023df60..a4486a5d49d7f 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 32d0261061f6f..7bab7b973ab6d 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 32a60df099647..0000000000000 --- 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 0000000000000..5260b8d6cf36a --- /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 0000000000000..dce83eeb8ebb7 --- /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 bbae04a30bf94..4c0b8989316ef 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 f2115703462fc..e757934f20cc5 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 bbae04a30bf94..4c0b8989316ef 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 f2115703462fc..e757934f20cc5 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 bbae04a30bf94..4c0b8989316ef 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 f2115703462fc..e757934f20cc5 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 bbae04a30bf94..4c0b8989316ef 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 f2115703462fc..e757934f20cc5 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/61] 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 0000000000000..32a60df099647 --- /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 0000000000000..da7d99dc5e7fb --- /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/61] 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 9283f8d939deb..09dea3cc844d4 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 d2757bb7937ca..9cd0024759335 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 7a7e0b2c453b5..6d04c74fa3899 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 7a7e0b2c453b5..6d04c74fa3899 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 0000000000000..c2cd78e81188e --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..c2cd78e81188e --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..99a11e4722c8c --- /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 0000000000000..99a11e4722c8c --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..0970535d97a48 --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..0970535d97a48 --- /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 0000000000000..0571c55820f2d --- /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 0000000000000..a938517114ce9 --- /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 0000000000000..d8cb3f952ba9a --- /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 9fdf6253b8006..7ba71c35654a9 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 0000000000000..6d820a0093e01 --- /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 0000000000000..9fdf6253b8006 --- /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 0000000000000..9be9952dd2b7f --- /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 0000000000000..16cb2db6fd7cc --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..df05c5d4d5290 --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..6d820a0093e01 --- /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 0000000000000..df05c5d4d5290 --- /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/61] 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 6d04c74fa3899..0729dbedfae94 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 6d04c74fa3899..0729dbedfae94 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 0ba5af91d2183..555acda2cd6bf 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 0ba5af91d2183..555acda2cd6bf 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 e0f30e0ed4f94..d0ffac121e457 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 e0f30e0ed4f94..d0ffac121e457 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 4d345f51353d8..a619f0e1e22b7 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 4d345f51353d8..a619f0e1e22b7 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 99a11e4722c8c..4a3803ead63cb 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 99a11e4722c8c..4a3803ead63cb 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 43fe621e0657b..253d6f0f1d4ad 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 d23706bab94ad..a8b0087521401 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 9d0ec1282785b..5f484c20e30e8 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 cc11c7d2625d2..7b4a7efc0428a 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 a938517114ce9..41a19f64c5cf2 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/61] 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 03d2e0453b14c..9ebca2397583a 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 ced0dd6d87ce6..610ee7e112565 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 aaac6284f7deb..5d40a1e5ab294 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 0000000000000..1d6ddb3ed30c9 --- /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 0000000000000..6bd76de881bfc --- /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 0000000000000..a658130e10aa9 --- /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 0000000000000..99dd961db4c5b --- /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 0000000000000..2d84420798686 --- /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 0000000000000..06b80b144a4fe --- /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 0000000000000..ea9b48061c37c --- /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 0000000000000..55412253441db --- /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 0000000000000..2f3cf3e078567 --- /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 0000000000000..cd9a6dfafba38 --- /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 0000000000000..f02035c3f65c0 --- /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 0000000000000..04945af8205a6 --- /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 0000000000000..fc6acef20ee17 --- /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 0000000000000..3ed1ca1039dc6 --- /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/61] 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} (55%) create mode 100644 tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithJsExtensions.json rename tests/cases/project/{jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json => jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json} (55%) 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 (60%) 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 09dea3cc844d4..2ee0f67382be6 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); - } - } - 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); + 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 { - fileNames.push(name); - } } } return fileNames; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index f792c728227ad..4a337e94bc402 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 610ee7e112565..d79b7323d3e66 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 5d40a1e5ab294..3f5dc0134e0c1 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 330ad05518bb1..27d85a3b4a885 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 7c9c7e103bc65..0110e0b529ab8 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 805275776ad0a..8c1bf962aaefe 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 9cd0024759335..174afe51bde59 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 696d2f481e053..fd08d864a5567 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 a24ed30ae143a..c4532293de091 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 bd7072177dfe4..a04b3af84cabe 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 32e61cb8d7b71..a250cb3daacab 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 d18fa1506abf9..6517e0c0a4a59 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 0000000000000..4276669ff768a --- /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 de21d58456f82..76d5def7b5c48 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 de21d58456f82..76d5def7b5c48 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 c2cd78e81188e..eb3813ca14200 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 c2cd78e81188e..eb3813ca14200 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 0000000000000..a7fd60e03d5cf --- /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 555acda2cd6bf..36eed6a651812 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 0000000000000..a7fd60e03d5cf --- /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 555acda2cd6bf..36eed6a651812 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 0000000000000..6c58345617a1a --- /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 0000000000000..6c58345617a1a --- /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 4a3803ead63cb..867227ec4e35a 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 4a3803ead63cb..867227ec4e35a 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 0000000000000..ffdfdf24e3950 --- /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 0000000000000..ffdfdf24e3950 --- /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 0970535d97a48..0000000000000 --- 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 0970535d97a48..0000000000000 --- 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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..93fee268825c5 --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..93fee268825c5 --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..0adbe74627f82 --- /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 0000000000000..4c0b8989316ef --- /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 0000000000000..e757934f20cc5 --- /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 0000000000000..0adbe74627f82 --- /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 636866e7eeb79..6cb565e4c9fb0 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 2670e1503a915..1dd1cf453f284 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 53ed217c2b57c..5e670172c15e9 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 88931fa2eaffb..2ac1ea3ba519b 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 ad1126ebf27a8..5a466ef57652e 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 f02035c3f65c0..0b5545741b2de 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 04945af8205a6..22d9e3c269eff 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 42a6e36efc867..cea0dfe700dd6 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 0a289515cb3c7..bfebbfd9966f9 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 85e9a7efb6d19..3c10227019613 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 014edddc34190..172bf01b803dc 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 4de8f393a9389..c9762553028e5 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 fc6acef20ee17..c089979ecbc05 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 3ed1ca1039dc6..83c752f7292c3 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 47b445e38aceb..962c73214752a 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 209efc3e12eab..24a0f2389ddd7 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 cd59f862ac841..8c678eed588ec 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 cb7a051016d13..8594e011d3c47 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 71d04eec64e42..22ccf24bae334 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 01080ef8556dc..183ace7ce10e6 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 e6d379e0e3ba9..d6f10ce47c4a7 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 d4b9aeb0b812c..d77d35c011ae6 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 2a8d892c80d2c..e2aca1007b234 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 29f0c18c81b90..45f76c78bfb90 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 f7c98808ad5d9..a989a8e2a3058 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 6b340a63dda8a..5242a2f7e7a23 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 5e2581676b8f5..a6f27b787eb9d 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 e6289fd6eb090..1e2641dd8d192 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 47ca5115cbb96..595cba8ffd3c6 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 da7d99dc5e7fb..ce97a6635c585 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 0000000000000..636866e7eeb79 --- /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 2936f2eda7c7e..6cc6c7b50b1ea 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 0571c55820f2d..50cd978a7126e 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 0000000000000..a15686497c5df --- /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 55% rename from tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithConsumeJsFiles.json rename to tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithJsExtensions.json index 41a19f64c5cf2..f0341ee905fa0 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 0000000000000..4ce47779ea409 --- /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 55% rename from tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithConsumeJsFiles.json rename to tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithJsExtensions.json index d8cb3f952ba9a..d151f7d499f4d 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 0000000000000..da24d83de8473 --- /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 60% rename from tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithConsumeJsFiles/tsconfig.json rename to tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithJsExtensions/tsconfig.json index 9be9952dd2b7f..b3fb530a291c9 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 0000000000000..9fdf6253b8006 --- /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 0000000000000..f52029d734ee8 --- /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 0000000000000..d9e24d329b733 --- /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 0000000000000..de14c20c66291 --- /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 df05c5d4d5290..0000000000000 --- 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 0000000000000..e14243307e2f2 --- /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 df05c5d4d5290..0000000000000 --- 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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..6d820a0093e01 --- /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 0000000000000..e14243307e2f2 --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..6d820a0093e01 --- /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 0000000000000..8f3028a8ad177 --- /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 262430db86a72..46a283b5e2c83 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/61] 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 0110e0b529ab8..f6daf4880b686 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 6517e0c0a4a59..421f46b3bc68c 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/61] 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 27d85a3b4a885..89ef8b1485c27 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/61] 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 de1e1038db641..6d4ef23dcc683 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 790f02bac92d0..5172ee7701cc4 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/61] 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 2ee0f67382be6..603dff9e7792d 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 f6daf4880b686..999b8bd6df14d 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 8c1bf962aaefe..a0c3cc642e2fe 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 a250cb3daacab..700423a721faa 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/61] 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 a04b3af84cabe..f4cde09c704ce 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/61] 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 e69de29bb2d1d..0000000000000 diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json deleted file mode 100644 index e14243307e2f2..0000000000000 --- 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/61] 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 0000000000000..e69de29bb2d1d diff --git a/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDtsNotSpecifiedWithJsExtensions/tsconfig.json new file mode 100644 index 0000000000000..e14243307e2f2 --- /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/61] 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 603dff9e7792d..6daa1ec885733 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/61] 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 16cb2db6fd7cc..0000000000000 --- 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 bbad8b11e3dd7..0000000000000 --- 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 e69de29bb2d1d..0000000000000 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 16cb2db6fd7cc..0000000000000 --- 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 bbad8b11e3dd7..0000000000000 --- 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 e14243307e2f2..0000000000000 --- 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/61] 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 0000000000000..16cb2db6fd7cc --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..e69de29bb2d1d 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 0000000000000..16cb2db6fd7cc --- /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 0000000000000..bbad8b11e3dd7 --- /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 0000000000000..e14243307e2f2 --- /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/61] 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 6daa1ec885733..603dff9e7792d 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/61] 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 f5d89ba86c301..39c9a458e9caf 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/61] 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 1db54e66b6252..792a85ac52230 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); + } + } + + // 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 (!hasSameNameHigherPriorityExtensionFile) { + 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/61] 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 6035f9898ce3c..22cafc034b453 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 4c0c6d20ad081..9e8e366aaac08 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 00efbe9616e61..dc43b837c7ca5 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 451bb4adfc668..4ebc1976217da 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 39c9a458e9caf..cd099279fa8be 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 491c71a5839e4..1e95fc4ae74f1 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 ca7d1faa4a910..95f7f443565ce 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/61] 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 657683323604f..c869bb3c65dd7 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 40db300d3103a..def0eb4cf9f82 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 e822052a5b2c3..5dbc514d46205 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 e62132dac1e78..9420080abe9e9 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/61] 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 9e8e366aaac08..9534b22f47ab5 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 da6196b1dafd3..b03faaf26df48 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 a5166a3479f24..89fc1f5d92734 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 dcb9e0791a70f..b15db858db44f 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 dc43b837c7ca5..f8a1af6f5cf28 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 0000000000000..a9c60c0748fb4 --- /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 0000000000000..09e07a67bf31b --- /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 0000000000000..ed23a30c3faa0 --- /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 4b25824989d0b..3531296e019cf 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 0000000000000..c200602dddd65 --- /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 0000000000000..27082e9a930a1 --- /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 0000000000000..1c6bb41de14db --- /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/61] 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 d9082532cb575..e3c48e33e5c96 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 0000000000000..48421954c3a49 --- /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 0000000000000..eb9e11e574b57 --- /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 0000000000000..ea9c9f62b8d64 --- /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 0000000000000..a7ba8b49985a9 --- /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 0000000000000..d3b2f788d6605 --- /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 0000000000000..80f9358fb7f68 --- /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/61] 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 0000000000000..3a4c7eaad4509 --- /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 0000000000000..77cd91b9a7f56 --- /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 0000000000000..2e53db45edc60 --- /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 0000000000000..e8770c99fba0c --- /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/61] 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 b15db858db44f..3b062e333c8bf 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/61] 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 9534b22f47ab5..76c3175dcd570 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 00e13ba634c38..d1beacfeaa9bd 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 ea2fd36889f22..ff60a5927bd9a 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 f8a1af6f5cf28..f4dd2c02c8d56 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 a210385d996be..b0732afea729a 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 6017ddc7a1120..b7fec2eefc671 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 eb9e11e574b57..5861e73f49b22 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 4c9f6802fd94f..c6711e4e85f42 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 33077f3038f3e..04f36213b1bde 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 6b9d97e55bb32..e9fd9cc31b759 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 1d6ddb3ed30c9..9be6b3f1ccdbd 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 6bd76de881bfc..07d6fb812c066 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 a658130e10aa9..0000000000000 --- 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 99dd961db4c5b..0d1939d720801 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 06b80b144a4fe..544fe53f425af 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 ea9b48061c37c..8aafb9f61d034 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 a349e2bca13c8..27371222dceb3 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 df014047b35f6..c7d080404a232 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 e53bf2ac8608c..36ab7aab18859 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 c46c3c05b3fbe..3089aeecb4994 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 8748064cc9608..d85819b8588b3 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 0000000000000..06bfd61c7ab0e --- /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 55412253441db..fae4936b6c916 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 68b131d39f92d..6d9e3c5919d9e 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 0ecf6f3c666c7..5a35e68bcec74 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 907775c7be65e..a6d47e5fbe372 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 e5072278f4c40..fa3e0e34a774b 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 d28299c543aca..bcba97af02497 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 50746dcfc82e1..8b83a9d1f903c 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 1ca6e25178823..b06375e8a6a26 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 6af5751ea8545..a0724e452b79d 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 cade211aa63a3..acefc2ff569d7 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 6d4ef23dcc683..669e83688ccda 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 ae3fd23c6efe6..69fa6251942db 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 708ff378137f0..f279896c4ed22 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 391e8f476daa1..9b056bcae505b 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 a4486a5d49d7f..080cb580bf2e5 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 09e07a67bf31b..134c95dee1553 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 7bab7b973ab6d..32d0261061f6f 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 0000000000000..3531296e019cf --- /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 5260b8d6cf36a..0000000000000 --- 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 dce83eeb8ebb7..0000000000000 --- 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 4c0b8989316ef..bbae04a30bf94 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 e757934f20cc5..f2115703462fc 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 4c0b8989316ef..bbae04a30bf94 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 e757934f20cc5..f2115703462fc 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 4c0b8989316ef..bbae04a30bf94 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 e757934f20cc5..f2115703462fc 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 4c0b8989316ef..bbae04a30bf94 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 e757934f20cc5..f2115703462fc 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/61] 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 0000000000000..3e3d0b9802acb --- /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 0000000000000..9bfc61a64f85a --- /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 0000000000000..fefad3f6ddaa6 --- /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 0000000000000..a3abc11411837 --- /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 0000000000000..7b2643c13d3eb --- /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 0000000000000..f3f69ee5ec316 --- /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 0000000000000..77db6222a9219 --- /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/61] 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 0000000000000..fb0c214ddf657 --- /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 0000000000000..9b64450936186 --- /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 0000000000000..78eb22546e8b0 --- /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 0000000000000..d7965e91be1d3 --- /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 0000000000000..1cc61edaf3270 --- /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 0000000000000..af1d842d9b2e0 --- /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/61] 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 3a628bb62c157..ef118e30fb58b 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 54e86786d1404..98bdccc9ab720 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 0000000000000..f9cc1f9b63538 --- /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/61] 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 2127bf4587086..838172345c660 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 f9cc1f9b63538..cbc83bb9c414d 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/61] 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 838172345c660..8f2c7d3f62f11 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/61] 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 0000000000000..15a1e8d753354 --- /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 0000000000000..c1e97340dc975 --- /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 0000000000000..a28c62813deb4 --- /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 0000000000000..fb213ec4433f7 --- /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 0000000000000..641a89c1c5049 --- /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 0000000000000..d3e342a2d4bb4 --- /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 0000000000000..c71d87ac9d94f --- /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 fe63067b995f5722414c3b2170e3ddf6df88adaf Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 19 Oct 2015 16:44:38 -0700 Subject: [PATCH 53/61] 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 649539452d1f0..73e25bc472f56 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 d27ce378bb6f3..03a91f647d38c 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1910,10 +1910,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 87b5618445119747397fb9ada596b3c1db7424b8 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 11:22:46 -0700 Subject: [PATCH 54/61] 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 73e25bc472f56..de9a93ee6792e 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 76c3175dcd570..8b4e1500a1c67 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 842bfcfcf7be9..3f7414376095c 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 809b47b8f05fd..a0a355e3bd627 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); } @@ -1311,7 +1353,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 2462e76c17021..911a0eb2f736d 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1361,6 +1361,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 03a91f647d38c..ca598483ef81b 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 0dc1a277b659b573f4128960253a9beb8d8a1f39 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 11:26:02 -0700 Subject: [PATCH 55/61] 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 e43be2f5ad083..0000000000000 --- 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 2af85da5b5783..b424243c164d5 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 0000000000000..ad355e2351760 --- /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 0000000000000..6339873656343 --- /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 c24eaf68a6f6d..1f339b36fafcb 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 dc54ff2cbb2b6..55e657c2325be 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 c57c0384afc3a..bca1ddbfdc7fa 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 903687d078073..c3b26b97c9b95 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 c0c640b87fda4..5c46778c7cea1 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 46a1d918b94b3..f2d63ba1389d4 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 4c0093a543821..0000000000000 --- 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 0000000000000..862b0b3781eff --- /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 0000000000000..f7bb57b0e1e7d --- /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 961442c23d073..0000000000000 --- 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 8d79a576b06ea..396ee75422e71 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 0000000000000..ef9cd96e5555c --- /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 0000000000000..c0fb7b763fcfb --- /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 7680a8d14dccd..0000000000000 --- 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 0000000000000..f747446614018 --- /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 0000000000000..2b9b98a896398 --- /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 4e1da34b979a9..0000000000000 --- 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 0000000000000..d3d0753123c6d --- /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 0000000000000..35aaa3acdeb44 --- /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 09980c5c9dd11..31329ded30499 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 16e6b49a4cf0a..58cf0e0b2f9f6 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 662b4625ec807..cac419605babb 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 38b0a14af5c97..d102ad301737f 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 264e56fe58c5c..2c7cf979c9c6b 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 a98620c852902..9fc1943eae66d 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 5c7f4d2cec593..ab42602a035a4 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 78fb232cca78e..0f8d5d4c07d7d 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 a2509ea97f462..bdb7a1148f09c 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 8c128bb806eda..d9b0e6bc40225 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 7710b5e26c1c9..9b26893b42498 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 8b2df68ed709d..9fbdd26991296 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 88d1da4201d34..d392979240908 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 e4cf13758ffd2..ba838296f9d75 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 755af6f4fdb85..a733eba1045b8 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 7eda76622defc..53f701cb0c13a 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 b83571066f051..c724eade06c66 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 9314190e786e2..1dc0013ecbe60 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 71d35fd85a176..3451176bdb2cf 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 9674f8c12f432..d4b1b45d5a7b9 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 b7da05d7dbbb9..2d8be87a3d1e0 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 2b24fda075559..f6607da3397b1 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 a032325fbb446..caeaa76ab4a9a 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 93918f6171a64..86514091f6c47 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 49717c588b707..35811288691e6 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 dec9b8cfebe0e..9a02028e43189 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 34323b2752bc3..4420397ac61f6 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 2fb7f0644b9ca..c3a7315929db0 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 84f6936d4b0f1..9da18ee7d0c4e 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 5175554f0f916..d51e677381a66 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 208f71bcbfe9f..0089dd2b3dfde 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 4a1ee9b739f2b..bcfb7d8347d52 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 d433e7b3682c8..e6db992f8f84b 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 c796f8e78bc85..fcf6437e79e7c 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 396e220bdb653..b62498221317c 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 6a58015c1b3bc..38a695301d21b 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 46bdaf827d5c5..096f1ecd60098 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 bb3e560a2f83e..4a24f0e201f24 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 9b64450936186..2392b461ebfb2 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 d7965e91be1d3..807cdbf0925e9 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 7b2643c13d3eb..aab4ba6af81a2 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 07d6fb812c066..fc8c7b441658b 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 641a89c1c5049..87fccf56d5031 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 05811ce108890..9e0bce41c8383 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 2ef60f058c2ac..0000000000000 --- 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 ef3b9a2965c3f..f835729dc4db2 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 0000000000000..178c406f8cdb3 --- /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 0000000000000..0c117fb51840d --- /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 8327c3429d3ae..3ec03ecc84192 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 36eed6a651812..591a855b5c92f 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 4c0b8989316ef..0000000000000 --- 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 36eed6a651812..591a855b5c92f 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 4c0b8989316ef..0000000000000 --- 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 8147620b2111b..0000000000000 --- 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 4ff813c3839e8..0000000000000 --- 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 42f348a4b56d6..14f15bd6fdb53 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 8147620b2111b..0000000000000 --- 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 4ff813c3839e8..0000000000000 --- 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 42f348a4b56d6..14f15bd6fdb53 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 a0ff6327f2500..5d48d8f5636e9 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 77d185d207f01..0000000000000 --- 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 8d8b8b817ea81..085458717ec35 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 0000000000000..4457abb76ea9f --- /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 0000000000000..099a6241f4475 --- /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 785faf82865e3..2b9a55a1f3ec0 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 4d424e75d23f7..24b094b602d87 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 545018c5a7f21..79c9b581e5f77 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 b82cebc553fc8..de11cec9fe8dc 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 77edf963b697e..0d64844ff99d2 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 0997f00eab407..eac2e9ff78c2a 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 c7ae2f1bf38c7..f3c926ad7071a 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 ccfa3bcc0c2b5..0620f6d83ef7f 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 cbc83bb9c414d..6ac9defb7d5ab 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 16becda1674cc0508483031ac031c3e885b66a95 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 11:50:27 -0700 Subject: [PATCH 56/61] 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 8b4e1500a1c67..efd5183ca6a30 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 d7ed9bde8c7c0..7ef41a630cba3 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 34706df53bb6bbdc4653b82ed1369a24cca63efb Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 13:40:34 -0700 Subject: [PATCH 57/61] 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 3f7414376095c..29c7629e207e7 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 a0a355e3bd627..f8c367344992d 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1312,11 +1312,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 ca598483ef81b..cb082c0a269a0 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1841,6 +1841,7 @@ namespace ts { sourceFile.languageVariant === LanguageVariant.JSX && options.jsx === JsxEmit.Preserve ? ".jsx" : ".js"); return { jsFilePath, + sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) }; } @@ -1850,18 +1851,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 6625cc46b21c7..35bee4f1d4a95 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 4d7f499b55a4b..e292a9b96b2a4 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 e3e14d01e9ee7..e09af2f4221b6 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 0000000000000..2fdce65a6ab3d --- /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 0000000000000..ce13bf9d3f1c9 --- /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 0000000000000..54e54c5044a61 --- /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 0000000000000..edb8c42874411 --- /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 0000000000000..35cc5dace16c1 --- /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 0000000000000..2c9cc66836a89 --- /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 0000000000000..972c350c8e755 --- /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 0000000000000..d0a35eb15f1d9 --- /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 0000000000000..ef19d2fc517c6 --- /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 0000000000000..c3fb335e3741b --- /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 0000000000000..9974960bd2dbd --- /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 0000000000000..e4534a4cfd42d --- /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 0000000000000..6db2ffa3dc63f --- /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 0000000000000..9c209ad1b953b --- /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 0000000000000..18b30bd5910fd --- /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 89a313ed83139132ebfd30f3623dca9b18fcf94e Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 15:51:37 -0700 Subject: [PATCH 58/61] 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 efd5183ca6a30..86c90ff6f1cab 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 29c7629e207e7..84a8eb7c6a6cf 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 f8c367344992d..d81328a1c9bdf 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 46f0568704ff2..57c2d3839e3cd 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 0000000000000..5db889dc01daa --- /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 f854a619a4717..2f27152892b67 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 463dfe6899a4c..a3a9023f75be7 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 b62498221317c..88bc5c507274f 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 38a695301d21b..63747de55ded2 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 0000000000000..138b4de6f46fa --- /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 e4110c3f7891c2316ad82ee09f3dc30f38706441 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 16:08:07 -0700 Subject: [PATCH 59/61] 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 0000000000000..fbf4948c2030f --- /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 0000000000000..a9ae79f8ed6d8 --- /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 0000000000000..b90bccbaf94a9 --- /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 0000000000000..34d9c95a00519 --- /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 0000000000000..b7ecb6540028c --- /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 0000000000000..b43c9a8b2e04f --- /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 a7b08ddfb4fbc3655a8c2811f8c932c1b968a466 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 16:27:13 -0700 Subject: [PATCH 60/61] 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 0000000000000..970133016183c --- /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 0000000000000..e97312893ad0a --- /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 0000000000000..970133016183c --- /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 0000000000000..11dcc06380cb3 --- /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 0000000000000..e7d3b592932ef --- /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 0000000000000..005b52d5bc9f6 --- /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 6024266d49034cb5e29e41d952ddf616540b0335 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 20 Oct 2015 17:16:39 -0700 Subject: [PATCH 61/61] 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 0000000000000..836b39380eafb --- /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 0000000000000..8db5aa87a5ba7 --- /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 0000000000000..f429cc8851687 --- /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 0000000000000..c9e16f359816d --- /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 0000000000000..6b0934c659104 --- /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 0000000000000..094f59d20225f --- /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 0000000000000..1dc269146a63d --- /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 0000000000000..fb42d121c8055 --- /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 0000000000000..e4dd1755cebb7 --- /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 0000000000000..225d73324c749 --- /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 0000000000000..6206ee8901b9c --- /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 0000000000000..13871de60d83b --- /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