diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 98123d0275b81..7b5c43a06afe1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -309,6 +309,7 @@ namespace ts { const Signature = objectAllocator.getSignatureConstructor(); let typeCount = 0; + let literalTypeCount = 0; let symbolCount = 0; let enumCount = 0; let totalInstantiationCount = 0; @@ -333,6 +334,10 @@ namespace ts { const keyofStringsOnly = !!compilerOptions.keyofStringsOnly; const freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : ObjectFlags.FreshLiteral; + let checkingDtsFile: boolean; + const maxExpensiveStatementCount = compilerOptions.expensiveStatements ?? 0; + const expensiveStatements: ExpensiveStatement[] = []; + const emitResolver = createResolver(); const nodeBuilder = createNodeBuilder(); @@ -368,6 +373,7 @@ namespace ts { subtype: subtypeRelation.size, strictSubtype: strictSubtypeRelation.size, }), + getExpensiveStatements: () => expensiveStatements, isUndefinedSymbol: symbol => symbol === undefinedSymbol, isArgumentsSymbol: symbol => symbol === argumentsSymbol, isUnknownSymbol: symbol => symbol === unknownSymbol, @@ -3629,6 +3635,7 @@ namespace ts { function createType(flags: TypeFlags): Type { const result = new Type(checker, flags); typeCount++; + literalTypeCount += (flags & TypeFlags.Literal) ? 1 : 0; result.id = typeCount; return result; } @@ -30164,6 +30171,8 @@ namespace ts { function checkExpression(node: Expression | QualifiedName, checkMode?: CheckMode, forceTuple?: boolean): Type { const saveCurrentNode = currentNode; + const oldCounts = getExpensiveStatementCounts(); + currentNode = node; instantiationCount = 0; const uninstantiatedType = checkExpressionWorker(node, checkMode, forceTuple); @@ -30171,6 +30180,8 @@ namespace ts { if (isConstEnumObjectType(type)) { checkConstEnumAccess(node, type); } + + insertExpensiveStatement(node, oldCounts); currentNode = saveCurrentNode; return type; } @@ -35656,11 +35667,76 @@ namespace ts { const saveCurrentNode = currentNode; currentNode = node; instantiationCount = 0; + + const oldCounts = getExpensiveStatementCounts(); + checkSourceElementWorker(node); + + insertExpensiveStatement(node, oldCounts); + currentNode = saveCurrentNode; } } + interface Counts { + typeCount: number; + literalTypeCount: number; + symbolCount: number; + } + + function getExpensiveStatementCounts(): Counts { + return { + typeCount, + literalTypeCount, + symbolCount, + }; + } + + function insertExpensiveStatement(node: Node, oldCounts: Counts): void { + // Never report expensive statements in .d.ts files + if (checkingDtsFile || maxExpensiveStatementCount <= 0) { + return; + } + + const newCounts = getExpensiveStatementCounts(); + const typeDelta = (newCounts.typeCount - newCounts.literalTypeCount) - + (oldCounts.typeCount - oldCounts.literalTypeCount); + const symbolDelta = newCounts.symbolCount - oldCounts.symbolCount; + + if (typeDelta === 0) { + return; + } + + let i = 0; + for (const existing of expensiveStatements) { + // The = is important - we need to insert record before its + // descendants for the de-duping logic to work correctly. + if (existing.typeDelta <= typeDelta) { + break; + } + i++; + } + + if (i < maxExpensiveStatementCount) { + let hasExpensiveDescendent = false; + // Search forward since descendants cannot be more expensive + for (let j = i; j < expensiveStatements.length; j++) { + const candidate = expensiveStatements[j]; + if (isNodeDescendantOf(candidate.node, node)) { + // If a single descendant makes up the majority of the cost, this node isn't interesting + hasExpensiveDescendent = (typeDelta / candidate.typeDelta) < 2; + break; // Stop looking since all subsequent nodes are less expensive + } + } + if (!hasExpensiveDescendent) { + expensiveStatements.splice(i, 0, { node, typeDelta, symbolDelta }); + if (expensiveStatements.length > maxExpensiveStatementCount) { + expensiveStatements.pop(); + } + } + } + } + function checkSourceElementWorker(node: Node): void { if (isInJSFile(node)) { forEach((node as JSDocContainer).jsDoc, ({ tags }) => forEach(tags, checkSourceElement)); @@ -35974,10 +36050,12 @@ namespace ts { } function checkSourceFile(node: SourceFile) { + checkingDtsFile = fileExtensionIs(node.path, Extension.Dts); performance.mark("beforeCheck"); checkSourceFileWorker(node); performance.mark("afterCheck"); performance.measure("Check", "beforeCheck", "afterCheck"); + checkingDtsFile = false; } function unusedIsError(kind: UnusedKind, isAmbient: boolean): boolean { diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 26b8641e2d753..3792a6004a0f9 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -219,6 +219,12 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us }, + { + name: "expensiveStatements", + type: "number", + category: Diagnostics.Advanced_Options, + description: Diagnostics.Heuristically_reports_statements_that_appear_to_contribute_disproportionately_to_check_time + }, ]; /* @internal */ diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 82f3cb4ce579b..b56f39782e6e8 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4482,6 +4482,10 @@ "category": "Error", "code": 6236 }, + "Heuristically reports statements that appear to contribute disproportionately to check time.": { + "category": "Message", + "code": 6237 + }, "Projects to reference": { "category": "Message", @@ -5984,5 +5988,10 @@ "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name.": { "category": "Error", "code": 18035 + }, + + "Checking this statement may result in the creation of as many as {0} types and {1} symbols.": { + "category": "Warning", + "code": 19000 } } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 87f4637258cb0..e2e5c741e048f 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -895,7 +895,14 @@ namespace ts { } missingFilePaths = arrayFrom(mapDefinedIterator(filesByName.entries(), ([path, file]) => file === undefined ? path as Path : undefined)); - files = stableSort(processingDefaultLibFiles, compareDefaultLibFiles).concat(processingOtherFiles); + + const dtsFiles: SourceFile[] = []; + const otherFiles: SourceFile[] = []; + for (const file of processingOtherFiles) { + (fileExtensionIs(file.path, Extension.Dts) ? dtsFiles : otherFiles).push(file); + } + + files = stableSort(processingDefaultLibFiles, compareDefaultLibFiles).concat(dtsFiles).concat(otherFiles); processingDefaultLibFiles = undefined; processingOtherFiles = undefined; } @@ -954,6 +961,7 @@ namespace ts { getTypeCount: () => getDiagnosticsProducingTypeChecker().getTypeCount(), getInstantiationCount: () => getDiagnosticsProducingTypeChecker().getInstantiationCount(), getRelationCacheSizes: () => getDiagnosticsProducingTypeChecker().getRelationCacheSizes(), + getExpensiveStatements: () => getDiagnosticsProducingTypeChecker().getExpensiveStatements(), getFileProcessingDiagnostics: () => fileProcessingDiagnostics, getResolvedTypeReferenceDirectives: () => resolvedTypeReferenceDirectives, isSourceFileFromExternalLibrary, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d9468bd51234e..d24ba229d2568 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3737,6 +3737,7 @@ namespace ts { getTypeCount(): number; getInstantiationCount(): number; getRelationCacheSizes(): { assignable: number, identity: number, subtype: number, strictSubtype: number }; + /* @internal */ getExpensiveStatements(): readonly ExpensiveStatement[]; /* @internal */ getFileProcessingDiagnostics(): DiagnosticCollection; /* @internal */ getResolvedTypeReferenceDirectives(): ESMap; @@ -4070,6 +4071,7 @@ namespace ts { /* @internal */ getTypeCount(): number; /* @internal */ getInstantiationCount(): number; /* @internal */ getRelationCacheSizes(): { assignable: number, identity: number, subtype: number, strictSubtype: number }; + /* @internal */ getExpensiveStatements(): readonly ExpensiveStatement[]; /* @internal */ isArrayType(type: Type): boolean; /* @internal */ isTupleType(type: Type): boolean; @@ -5675,6 +5677,7 @@ namespace ts { downlevelIteration?: boolean; emitBOM?: boolean; emitDecoratorMetadata?: boolean; + /*@internal*/ expensiveStatements?: number; experimentalDecorators?: boolean; forceConsistentCasingInFileNames?: boolean; /*@internal*/generateCpuProfile?: string; @@ -8067,4 +8070,11 @@ namespace ts { negative: boolean; base10Value: string; } + + /* @internal */ + export interface ExpensiveStatement { + node: Node; + typeDelta: number; + symbolDelta: number; + } } diff --git a/src/executeCommandLine/executeCommandLine.ts b/src/executeCommandLine/executeCommandLine.ts index 9d1ecc7c66621..377c0b3c9e10f 100644 --- a/src/executeCommandLine/executeCommandLine.ts +++ b/src/executeCommandLine/executeCommandLine.ts @@ -440,7 +440,7 @@ namespace ts { createBuilderStatusReporter(sys, shouldBePretty(sys, buildOptions)), createWatchStatusReporter(sys, buildOptions) ); - updateSolutionBuilderHost(sys, cb, buildHost); + updateSolutionBuilderHost(sys, reportDiagnostic, cb, buildHost); const builder = createSolutionBuilderWithWatch(buildHost, projects, buildOptions, watchOptions); builder.build(); return builder; @@ -453,7 +453,7 @@ namespace ts { createBuilderStatusReporter(sys, shouldBePretty(sys, buildOptions)), createReportErrorSummary(sys, buildOptions) ); - updateSolutionBuilderHost(sys, cb, buildHost); + updateSolutionBuilderHost(sys, reportDiagnostic, cb, buildHost); const builder = createSolutionBuilder(buildHost, projects, buildOptions); const exitStatus = buildOptions.clean ? builder.clean() : builder.build(); return sys.exit(exitStatus); @@ -492,7 +492,7 @@ namespace ts { s => sys.write(s + sys.newLine), createReportErrorSummary(sys, options) ); - reportStatistics(sys, program); + reportStatistics(sys, program, reportDiagnostic); cb(program); return sys.exit(exitStatus); } @@ -516,7 +516,7 @@ namespace ts { reportDiagnostic, reportErrorSummary: createReportErrorSummary(sys, options), afterProgramEmitAndDiagnostics: builderProgram => { - reportStatistics(sys, builderProgram.getProgram()); + reportStatistics(sys, builderProgram.getProgram(), reportDiagnostic); cb(builderProgram); } }); @@ -525,12 +525,13 @@ namespace ts { function updateSolutionBuilderHost( sys: System, + reportDiagnostic: DiagnosticReporter, cb: ExecuteCommandLineCallbacks, buildHost: SolutionBuilderHostBase ) { updateCreateProgram(sys, buildHost); buildHost.afterProgramEmitAndDiagnostics = program => { - reportStatistics(sys, program.getProgram()); + reportStatistics(sys, program.getProgram(), reportDiagnostic); cb(program); }; buildHost.afterEmitBundle = cb; @@ -549,6 +550,7 @@ namespace ts { function updateWatchCompilationHost( sys: System, + reportDiagnostic: DiagnosticReporter, cb: ExecuteCommandLineCallbacks, watchCompilerHost: WatchCompilerHost, ) { @@ -556,7 +558,7 @@ namespace ts { const emitFilesUsingBuilder = watchCompilerHost.afterProgramCreate!; // TODO: GH#18217 watchCompilerHost.afterProgramCreate = builderProgram => { emitFilesUsingBuilder(builderProgram); - reportStatistics(sys, builderProgram.getProgram()); + reportStatistics(sys, builderProgram.getProgram(), reportDiagnostic); cb(builderProgram); }; } @@ -581,7 +583,7 @@ namespace ts { reportDiagnostic, reportWatchStatus: createWatchStatusReporter(system, configParseResult.options) }); - updateWatchCompilationHost(system, cb, watchCompilerHost); + updateWatchCompilationHost(system, reportDiagnostic, cb, watchCompilerHost); watchCompilerHost.configFileParsingResult = configParseResult; return createWatchProgram(watchCompilerHost); } @@ -602,7 +604,7 @@ namespace ts { reportDiagnostic, reportWatchStatus: createWatchStatusReporter(system, options) }); - updateWatchCompilationHost(system, cb, watchCompilerHost); + updateWatchCompilationHost(system, reportDiagnostic, cb, watchCompilerHost); return createWatchProgram(watchCompilerHost); } @@ -616,9 +618,21 @@ namespace ts { } } - function reportStatistics(sys: System, program: Program) { + function reportStatistics(sys: System, program: Program, reportDiagnostic: DiagnosticReporter) { let statistics: Statistic[]; const compilerOptions = program.getCompilerOptions(); + + if (compilerOptions.expensiveStatements) { + for (const expensiveStatement of program.getExpensiveStatements()) { + reportDiagnostic( + createDiagnosticForNode( + expensiveStatement.node, + Diagnostics.Checking_this_statement_may_result_in_the_creation_of_as_many_as_0_types_and_1_symbols, + expensiveStatement.typeDelta, + expensiveStatement.symbolDelta)); + } + } + if (canReportDiagnostics(sys, compilerOptions)) { statistics = []; const memoryUsed = sys.getMemoryUsage ? sys.getMemoryUsage() : -1; diff --git a/tests/baselines/reference/moduleAugmentationDuringSyntheticDefaultCheck.symbols b/tests/baselines/reference/moduleAugmentationDuringSyntheticDefaultCheck.symbols index fbcc3fea7a3f4..9cfd8b2f82f92 100644 --- a/tests/baselines/reference/moduleAugmentationDuringSyntheticDefaultCheck.symbols +++ b/tests/baselines/reference/moduleAugmentationDuringSyntheticDefaultCheck.symbols @@ -6,15 +6,15 @@ import moment = require("moment-timezone"); === tests/cases/compiler/node_modules/moment/index.d.ts === declare function moment(): moment.Moment; ->moment : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(idx.ts, 0, 34), Decl(index.d.ts, 1, 16)) ->moment : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(idx.ts, 0, 34), Decl(index.d.ts, 1, 16)) ->Moment : Symbol(moment.Moment, Decl(index.d.ts, 1, 26), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34), Decl(index.d.ts, 2, 25)) +>moment : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(index.d.ts, 1, 16), Decl(idx.ts, 0, 34)) +>moment : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(index.d.ts, 1, 16), Decl(idx.ts, 0, 34)) +>Moment : Symbol(moment.Moment, Decl(index.d.ts, 1, 26), Decl(index.d.ts, 2, 25), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34)) declare namespace moment { ->moment : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(idx.ts, 0, 34), Decl(index.d.ts, 1, 16)) +>moment : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(index.d.ts, 1, 16), Decl(idx.ts, 0, 34)) interface Moment extends Object { ->Moment : Symbol(Moment, Decl(index.d.ts, 1, 26), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34), Decl(index.d.ts, 2, 25)) +>Moment : Symbol(Moment, Decl(index.d.ts, 1, 26), Decl(index.d.ts, 2, 25), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) valueOf(): number; @@ -22,7 +22,7 @@ declare namespace moment { } } export = moment; ->moment : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(idx.ts, 0, 34), Decl(index.d.ts, 1, 16)) +>moment : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(index.d.ts, 1, 16), Decl(idx.ts, 0, 34)) === tests/cases/compiler/node_modules/moment-timezone/index.d.ts === import * as moment from 'moment'; @@ -32,10 +32,10 @@ export = moment; >moment : Symbol(moment, Decl(index.d.ts, 0, 6)) declare module "moment" { ->"moment" : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(idx.ts, 0, 34), Decl(index.d.ts, 1, 16)) +>"moment" : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(index.d.ts, 1, 16), Decl(idx.ts, 0, 34)) interface Moment { ->Moment : Symbol(Moment, Decl(index.d.ts, 1, 26), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34), Decl(index.d.ts, 2, 25)) +>Moment : Symbol(Moment, Decl(index.d.ts, 1, 26), Decl(index.d.ts, 2, 25), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34)) tz(): string; >tz : Symbol(Moment.tz, Decl(index.d.ts, 3, 22)) @@ -46,10 +46,10 @@ import * as _moment from "moment"; >_moment : Symbol(_moment, Decl(idx.ts, 0, 6)) declare module "moment" { ->"moment" : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(idx.ts, 0, 34), Decl(index.d.ts, 1, 16)) +>"moment" : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(index.d.ts, 1, 16), Decl(idx.ts, 0, 34)) interface Moment { ->Moment : Symbol(Moment, Decl(index.d.ts, 1, 26), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34), Decl(index.d.ts, 2, 25)) +>Moment : Symbol(Moment, Decl(index.d.ts, 1, 26), Decl(index.d.ts, 2, 25), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34)) strftime(pattern: string): string; >strftime : Symbol(Moment.strftime, Decl(idx.ts, 2, 22), Decl(idx.ts, 7, 22)) @@ -57,10 +57,10 @@ declare module "moment" { } } declare module "moment-timezone" { ->"moment-timezone" : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(idx.ts, 0, 34), Decl(idx.ts, 5, 1)) +>"moment-timezone" : Symbol(moment, Decl(index.d.ts, 0, 0), Decl(index.d.ts, 0, 41), Decl(index.d.ts, 1, 16), Decl(idx.ts, 0, 34), Decl(idx.ts, 5, 1)) interface Moment { ->Moment : Symbol(Moment, Decl(index.d.ts, 1, 26), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34), Decl(index.d.ts, 2, 25)) +>Moment : Symbol(Moment, Decl(index.d.ts, 1, 26), Decl(index.d.ts, 2, 25), Decl(idx.ts, 1, 25), Decl(idx.ts, 6, 34)) strftime(pattern: string): string; >strftime : Symbol(Moment.strftime, Decl(idx.ts, 2, 22), Decl(idx.ts, 7, 22)) diff --git a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/nodeModulesMaxDepthIncreased.errors.txt b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/nodeModulesMaxDepthIncreased.errors.txt index 0e8caa5830463..1fa4e1b37a8b4 100644 --- a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/nodeModulesMaxDepthIncreased.errors.txt +++ b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/nodeModulesMaxDepthIncreased.errors.txt @@ -9,6 +9,9 @@ maxDepthIncreased/root.ts(7,1): error TS2322: Type 'string' is not assignable to } } +==== entry.d.ts (0 errors) ==== + export declare var foo: number; + ==== index.js (0 errors) ==== exports.person = { "name": "John Doe", @@ -36,9 +39,6 @@ maxDepthIncreased/root.ts(7,1): error TS2322: Type 'string' is not assignable to exports.f2 = m2; -==== entry.d.ts (0 errors) ==== - export declare var foo: number; - ==== maxDepthIncreased/root.ts (1 errors) ==== import * as m1 from "m1"; import * as m4 from "m4"; diff --git a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/nodeModulesMaxDepthIncreased.json b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/nodeModulesMaxDepthIncreased.json index 9973c7d3c050c..689254cbe5451 100644 --- a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/nodeModulesMaxDepthIncreased.json +++ b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/nodeModulesMaxDepthIncreased.json @@ -7,10 +7,10 @@ "project": "maxDepthIncreased", "resolvedInputFiles": [ "lib.es5.d.ts", + "maxDepthIncreased/node_modules/@types/m4/entry.d.ts", "maxDepthIncreased/node_modules/m2/node_modules/m3/index.js", "maxDepthIncreased/node_modules/m2/entry.js", "maxDepthIncreased/node_modules/m1/index.js", - "maxDepthIncreased/node_modules/@types/m4/entry.d.ts", "maxDepthIncreased/root.ts" ], "emittedFiles": [ diff --git a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/nodeModulesMaxDepthIncreased.errors.txt b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/nodeModulesMaxDepthIncreased.errors.txt index 0e8caa5830463..1fa4e1b37a8b4 100644 --- a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/nodeModulesMaxDepthIncreased.errors.txt +++ b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/nodeModulesMaxDepthIncreased.errors.txt @@ -9,6 +9,9 @@ maxDepthIncreased/root.ts(7,1): error TS2322: Type 'string' is not assignable to } } +==== entry.d.ts (0 errors) ==== + export declare var foo: number; + ==== index.js (0 errors) ==== exports.person = { "name": "John Doe", @@ -36,9 +39,6 @@ maxDepthIncreased/root.ts(7,1): error TS2322: Type 'string' is not assignable to exports.f2 = m2; -==== entry.d.ts (0 errors) ==== - export declare var foo: number; - ==== maxDepthIncreased/root.ts (1 errors) ==== import * as m1 from "m1"; import * as m4 from "m4"; diff --git a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/nodeModulesMaxDepthIncreased.json b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/nodeModulesMaxDepthIncreased.json index 9973c7d3c050c..689254cbe5451 100644 --- a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/nodeModulesMaxDepthIncreased.json +++ b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/nodeModulesMaxDepthIncreased.json @@ -7,10 +7,10 @@ "project": "maxDepthIncreased", "resolvedInputFiles": [ "lib.es5.d.ts", + "maxDepthIncreased/node_modules/@types/m4/entry.d.ts", "maxDepthIncreased/node_modules/m2/node_modules/m3/index.js", "maxDepthIncreased/node_modules/m2/entry.js", "maxDepthIncreased/node_modules/m1/index.js", - "maxDepthIncreased/node_modules/@types/m4/entry.d.ts", "maxDepthIncreased/root.ts" ], "emittedFiles": [ diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/expensiveStatements/tsconfig.json b/tests/baselines/reference/showConfig/Shows tsconfig for single option/expensiveStatements/tsconfig.json new file mode 100644 index 0000000000000..12e09bec590b8 --- /dev/null +++ b/tests/baselines/reference/showConfig/Shows tsconfig for single option/expensiveStatements/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "expensiveStatements": 0 + } +} diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js index 2e69e95f67e44..da384816d6803 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js @@ -160,6 +160,11 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, "../bar.ts": { "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", "signature": "11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n", @@ -170,11 +175,6 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n", "affectsGlobalScope": false }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, "../lazyindex.ts": { "version": "-6956449754-export { default as bar } from './bar';\n", "signature": "-6224542381-export { default as bar } from './bar';\r\n", @@ -282,6 +282,11 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex" "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, "../bar.ts": { "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n", @@ -292,11 +297,6 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex" "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n", "affectsGlobalScope": false }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, "../lazyindex.ts": { "version": "-6956449754-export { default as bar } from './bar';\n", "signature": "-6224542381-export { default as bar } from './bar';\r\n", diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js index 3bcf8750cbcaf..a0e60bd3360cc 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js @@ -160,6 +160,11 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, "../bar.ts": { "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", "signature": "11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n", @@ -170,11 +175,6 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n", "affectsGlobalScope": false }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, "../lazyindex.ts": { "version": "-6956449754-export { default as bar } from './bar';\n", "signature": "-6224542381-export { default as bar } from './bar';\r\n", @@ -282,6 +282,11 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex" "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, "../bar.ts": { "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n", @@ -292,11 +297,6 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex" "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n", "affectsGlobalScope": false }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, "../lazyindex.ts": { "version": "-6956449754-export { default as bar } from './bar';\n", "signature": "-6224542381-export { default as bar } from './bar';\r\n", diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js index e33335a94d2b4..71c1d8740391d 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js @@ -164,6 +164,11 @@ bar_2.default("hello"); "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, "../bar.ts": { "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", "signature": "11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n", @@ -174,11 +179,6 @@ bar_2.default("hello"); "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n", "affectsGlobalScope": false }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, "../lazyindex.ts": { "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", "signature": "-6224542381-export { default as bar } from './bar';\r\n", @@ -274,6 +274,11 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, "../bar.ts": { "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n", @@ -284,11 +289,6 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n", "affectsGlobalScope": false }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, "../lazyindex.ts": { "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", "signature": "-6224542381-export { default as bar } from './bar';\r\n", @@ -427,6 +427,11 @@ bar_2.default(); "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, "../bar.ts": { "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n", @@ -437,11 +442,6 @@ bar_2.default(); "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n", "affectsGlobalScope": false }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, "../lazyindex.ts": { "version": "-3721262293-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar();", "signature": "-6224542381-export { default as bar } from './bar';\r\n", diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/Detects-type-only-changes-in-upstream-projects.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/Detects-type-only-changes-in-upstream-projects.js index 1e2a206e17709..aee5b350d21cb 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/Detects-type-only-changes-in-upstream-projects.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/Detects-type-only-changes-in-upstream-projects.js @@ -55,6 +55,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -64,11 +69,6 @@ exports.multiply = multiply; "version": "-2157245566-export const someString: string = \"WELCOME PLANET\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/always-builds-under-with-force-option.js b/tests/baselines/reference/tsbuild/sample1/initial-build/always-builds-under-with-force-option.js index a0017e70e29ac..9e24e1b526ce8 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/always-builds-under-with-force-option.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/always-builds-under-with-force-option.js @@ -144,6 +144,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -153,11 +158,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/builds-correctly-when-declarationDir-is-specified.js b/tests/baselines/reference/tsbuild/sample1/initial-build/builds-correctly-when-declarationDir-is-specified.js index 70f20909ef304..6e80add3a1de8 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/builds-correctly-when-declarationDir-is-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/builds-correctly-when-declarationDir-is-specified.js @@ -132,6 +132,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -141,11 +146,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/builds-correctly-when-outDir-is-specified.js b/tests/baselines/reference/tsbuild/sample1/initial-build/builds-correctly-when-outDir-is-specified.js index e238ffb0a4aa6..e683a842f7f99 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/builds-correctly-when-outDir-is-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/builds-correctly-when-outDir-is-specified.js @@ -132,6 +132,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -141,11 +146,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/can-detect-when-and-what-to-rebuild.js b/tests/baselines/reference/tsbuild/sample1/initial-build/can-detect-when-and-what-to-rebuild.js index aa5fd83bd9c2b..1d92e8424bff4 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/can-detect-when-and-what-to-rebuild.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/can-detect-when-and-what-to-rebuild.js @@ -48,6 +48,11 @@ Input:: "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -57,11 +62,6 @@ Input:: "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/does-not-build-downstream-projects-if-upstream-projects-have-errors.js b/tests/baselines/reference/tsbuild/sample1/initial-build/does-not-build-downstream-projects-if-upstream-projects-have-errors.js index d988e83869dad..e1e3f6a62f627 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/does-not-build-downstream-projects-if-upstream-projects-have-errors.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/does-not-build-downstream-projects-if-upstream-projects-have-errors.js @@ -161,6 +161,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -170,11 +175,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/listEmittedFiles.js b/tests/baselines/reference/tsbuild/sample1/initial-build/listEmittedFiles.js index 6b3e4cf2275c3..8561297337358 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/listEmittedFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/listEmittedFiles.js @@ -158,6 +158,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -167,11 +172,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -421,6 +421,11 @@ exports.someClass = someClass; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -430,11 +435,6 @@ exports.someClass = someClass; "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -640,6 +640,11 @@ var someClass2 = /** @class */ (function () { "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -649,11 +654,6 @@ var someClass2 = /** @class */ (function () { "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/listFiles.js b/tests/baselines/reference/tsbuild/sample1/initial-build/listFiles.js index f0dd8ab79c1c5..8ec641b0ec37c 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/listFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/listFiles.js @@ -99,9 +99,9 @@ export const m = mod; Output:: /lib/tsc --b /src/tests --listFiles /lib/lib.d.ts +/src/core/some_decl.d.ts /src/core/anotherModule.ts /src/core/index.ts -/src/core/some_decl.d.ts /lib/lib.d.ts /src/core/index.d.ts /src/core/anotherModule.d.ts @@ -157,6 +157,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -166,11 +171,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -370,9 +370,9 @@ export class someClass { } Output:: /lib/tsc --b /src/tests --listFiles /lib/lib.d.ts +/src/core/some_decl.d.ts /src/core/anotherModule.ts /src/core/index.ts -/src/core/some_decl.d.ts /lib/lib.d.ts /src/core/index.d.ts /src/core/anotherModule.d.ts @@ -422,6 +422,11 @@ exports.someClass = someClass; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -431,11 +436,6 @@ exports.someClass = someClass; "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -602,9 +602,9 @@ class someClass2 { } Output:: /lib/tsc --b /src/tests --listFiles /lib/lib.d.ts +/src/core/some_decl.d.ts /src/core/anotherModule.ts /src/core/index.ts -/src/core/some_decl.d.ts exitCode:: ExitStatus.Success @@ -641,6 +641,11 @@ var someClass2 = /** @class */ (function () { "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -650,11 +655,6 @@ var someClass2 = /** @class */ (function () { "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/rebuilds-when-extended-config-file-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/rebuilds-when-extended-config-file-changes.js index 82d71147e005a..0e7444e82ee7f 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/rebuilds-when-extended-config-file-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/rebuilds-when-extended-config-file-changes.js @@ -164,6 +164,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -173,11 +178,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js b/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js index 895cc477a0f80..24fd2ed9b2c7a 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js @@ -326,6 +326,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -335,11 +340,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -870,6 +870,11 @@ exports.someClass = someClass; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -879,11 +884,6 @@ exports.someClass = someClass; "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -1114,6 +1114,11 @@ var someClass2 = /** @class */ (function () { "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -1123,11 +1128,6 @@ var someClass2 = /** @class */ (function () { "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/when-declaration-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-declaration-option-changes.js index cd113fbc18468..ab79673f726df 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/when-declaration-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-declaration-option-changes.js @@ -95,6 +95,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "-8396256275-export declare const World = \"hello\";\r\n", @@ -104,11 +109,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -175,6 +175,11 @@ export declare function multiply(a: number, b: number): number; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "-8396256275-export declare const World = \"hello\";\r\n", @@ -184,11 +189,6 @@ export declare function multiply(a: number, b: number): number; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-esModuleInterop-option-changes.js index 4d598d661a624..80d927afc0bb4 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/when-esModuleInterop-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-esModuleInterop-option-changes.js @@ -162,6 +162,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -171,11 +176,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js index d8ca4ee482d19..34a66a9054da9 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js @@ -327,6 +327,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", @@ -336,11 +341,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/when-module-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-module-option-changes.js index d381b6f5d29a8..fda4ac57b37ed 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/when-module-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-module-option-changes.js @@ -95,6 +95,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "-8396256275-export declare const World = \"hello\";\r\n", @@ -104,11 +109,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -185,6 +185,11 @@ define(["require", "exports"], function (require, exports) { "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "-8396256275-export declare const World = \"hello\";\r\n", @@ -194,11 +199,6 @@ define(["require", "exports"], function (require, exports) { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/when-target-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-target-option-changes.js index 8c02694d28772..b70ee340048b0 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/when-target-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-target-option-changes.js @@ -80,9 +80,9 @@ TSFILE: /src/core/index.js TSFILE: /src/core/tsconfig.tsbuildinfo /lib/lib.esnext.d.ts /lib/lib.esnext.full.d.ts +/src/core/some_decl.d.ts /src/core/anotherModule.ts /src/core/index.ts -/src/core/some_decl.d.ts exitCode:: ExitStatus.Success @@ -110,6 +110,11 @@ export function multiply(a, b) { return a * b; } "signature": "8926001564-/// \n/// ", "affectsGlobalScope": false }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "-8396256275-export declare const World = \"hello\";\r\n", @@ -119,11 +124,6 @@ export function multiply(a, b) { return a * b; } "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { @@ -176,9 +176,9 @@ TSFILE: /src/core/index.js TSFILE: /src/core/tsconfig.tsbuildinfo /lib/lib.d.ts /lib/lib.esnext.d.ts +/src/core/some_decl.d.ts /src/core/anotherModule.ts /src/core/index.ts -/src/core/some_decl.d.ts exitCode:: ExitStatus.Success @@ -214,6 +214,11 @@ exports.multiply = multiply; "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", "affectsGlobalScope": true }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "-8396256275-export declare const World = \"hello\";\r\n", @@ -223,11 +228,6 @@ exports.multiply = multiply; "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n", "affectsGlobalScope": false - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true } }, "options": { diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js b/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js index 074880d05ba20..62b67be1342b3 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js @@ -63,9 +63,9 @@ Output:: /src/a.d.ts /src/b.ts /lib/lib.d.ts +/src/refs/a.d.ts /src/a.d.ts /src/b.d.ts -/src/refs/a.d.ts /src/c.ts exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/builds-correctly.js b/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/builds-correctly.js index 42a9feff5eec9..9a45502e75701 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/builds-correctly.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/builds-correctly.js @@ -75,9 +75,9 @@ Output:: /src/a.d.ts /src/b.ts /lib/lib.d.ts +/src/refs/a.d.ts /src/a.d.ts /src/b.d.ts -/src/refs/a.d.ts /src/c.ts exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-moduleCaseChange.js b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-moduleCaseChange.js index bc7e8af7206fa..d3a03eafbdd69 100644 --- a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-moduleCaseChange.js +++ b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-moduleCaseChange.js @@ -179,12 +179,12 @@ Resolving real path for '/user/username/projects/myProject/plugin-two/node_modul /user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/index.d.ts -/user/username/projects/myproject/plugin-one/action.ts - /user/username/projects/myProject/plugin-two/node_modules/typescript-fsa/index.d.ts /user/username/projects/myProject/plugin-two/index.d.ts +/user/username/projects/myproject/plugin-one/action.ts + /user/username/projects/myproject/plugin-one/index.ts @@ -194,9 +194,9 @@ Program options: {"target":1,"declaration":true,"traceResolution":true,"project" Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/index.d.ts -/user/username/projects/myproject/plugin-one/action.ts /user/username/projects/myProject/plugin-two/node_modules/typescript-fsa/index.d.ts /user/username/projects/myProject/plugin-two/index.d.ts +/user/username/projects/myproject/plugin-one/action.ts /user/username/projects/myproject/plugin-one/index.ts WatchedFiles:: diff --git a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js index df60d073c68cb..1921eb4701097 100644 --- a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js +++ b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js @@ -179,12 +179,12 @@ Resolving real path for '/user/username/projects/myproject/plugin-two/node_modul /user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/index.d.ts -/user/username/projects/myproject/plugin-one/action.ts - /user/username/projects/myproject/plugin-two/node_modules/typescript-fsa/index.d.ts /user/username/projects/myproject/plugin-two/index.d.ts +/user/username/projects/myproject/plugin-one/action.ts + /user/username/projects/myproject/plugin-one/index.ts @@ -194,9 +194,9 @@ Program options: {"target":1,"declaration":true,"traceResolution":true,"project" Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/index.d.ts -/user/username/projects/myproject/plugin-one/action.ts /user/username/projects/myproject/plugin-two/node_modules/typescript-fsa/index.d.ts /user/username/projects/myproject/plugin-two/index.d.ts +/user/username/projects/myproject/plugin-one/action.ts /user/username/projects/myproject/plugin-one/index.ts WatchedFiles:: diff --git a/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/createWatchOfConfigFile.js b/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/createWatchOfConfigFile.js index 7a210ce679eee..ba9fb3c60830b 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/createWatchOfConfigFile.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/createWatchOfConfigFile.js @@ -32,12 +32,12 @@ Output:: Program root files: ["/f.ts","/a/lib/lib.d.ts"] Program options: {"preserveWatchOutput":true,"configFilePath":"/tsconfig.json"} Program files:: -/f.ts /a/lib/lib.d.ts +/f.ts Semantic diagnostics in builder refreshed for:: -/f.ts /a/lib/lib.d.ts +/f.ts WatchedFiles:: /tsconfig.json: @@ -78,8 +78,8 @@ Output:: Program root files: ["/f.ts","/a/lib/lib.d.ts"] Program options: {"preserveWatchOutput":true,"configFilePath":"/tsconfig.json"} Program files:: -/f.ts /a/lib/lib.d.ts +/f.ts Semantic diagnostics in builder refreshed for:: /f.ts diff --git a/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/when-createWatchProgram-is-invoked-with-configFileParseResult-on-WatchCompilerHostOfConfigFile.js b/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/when-createWatchProgram-is-invoked-with-configFileParseResult-on-WatchCompilerHostOfConfigFile.js index 638585acff3b7..c54e375e03100 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/when-createWatchProgram-is-invoked-with-configFileParseResult-on-WatchCompilerHostOfConfigFile.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/when-createWatchProgram-is-invoked-with-configFileParseResult-on-WatchCompilerHostOfConfigFile.js @@ -31,12 +31,12 @@ Output:: Program root files: ["/f.ts","/a/lib/lib.d.ts"] Program options: {"preserveWatchOutput":true,"watch":true,"project":"/tsconfig.json","configFilePath":"/tsconfig.json"} Program files:: -/f.ts /a/lib/lib.d.ts +/f.ts Semantic diagnostics in builder refreshed for:: -/f.ts /a/lib/lib.d.ts +/f.ts WatchedFiles:: /tsconfig.json: @@ -76,8 +76,8 @@ Output:: Program root files: ["/f.ts","/a/lib/lib.d.ts"] Program options: {"preserveWatchOutput":true,"watch":true,"project":"/tsconfig.json","configFilePath":"/tsconfig.json"} Program files:: -/f.ts /a/lib/lib.d.ts +/f.ts Semantic diagnostics in builder refreshed for:: /f.ts diff --git a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-does-not-have-out-or-outFile.js b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-does-not-have-out-or-outFile.js index d4c53518f35f4..583fc97b1366a 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-does-not-have-out-or-outFile.js +++ b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-does-not-have-out-or-outFile.js @@ -35,14 +35,14 @@ Output:: Program root files: ["/a/a.ts","/a/b.ts","/a/lib/lib.d.ts"] Program options: {"watch":true,"project":"/a/tsconfig.json","configFilePath":"/a/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /a/a.ts /a/b.ts -/a/lib/lib.d.ts Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts /a/a.ts /a/b.ts -/a/lib/lib.d.ts WatchedFiles:: /a/tsconfig.json: @@ -92,9 +92,9 @@ Output:: Program root files: ["/a/a.ts","/a/b.ts","/a/lib/lib.d.ts"] Program options: {"watch":true,"project":"/a/tsconfig.json","configFilePath":"/a/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /a/a.ts /a/b.ts -/a/lib/lib.d.ts Semantic diagnostics in builder refreshed for:: /a/a.ts diff --git a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-out.js b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-out.js index 99b1aa3893d50..c8bf917aaab62 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-out.js +++ b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-out.js @@ -35,9 +35,9 @@ Output:: Program root files: ["/a/a.ts","/a/b.ts","/a/lib/lib.d.ts"] Program options: {"out":"/a/out.js","watch":true,"project":"/a/tsconfig.json","configFilePath":"/a/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /a/a.ts /a/b.ts -/a/lib/lib.d.ts No cached semantic diagnostics in the builder:: @@ -86,9 +86,9 @@ Output:: Program root files: ["/a/a.ts","/a/b.ts","/a/lib/lib.d.ts"] Program options: {"out":"/a/out.js","watch":true,"project":"/a/tsconfig.json","configFilePath":"/a/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /a/a.ts /a/b.ts -/a/lib/lib.d.ts No cached semantic diagnostics in the builder:: diff --git a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-outFile.js b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-outFile.js index 058d1dd761d11..e28bb453532cd 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-outFile.js +++ b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-outFile.js @@ -35,9 +35,9 @@ Output:: Program root files: ["/a/a.ts","/a/b.ts","/a/lib/lib.d.ts"] Program options: {"outFile":"/a/out.js","watch":true,"project":"/a/tsconfig.json","configFilePath":"/a/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /a/a.ts /a/b.ts -/a/lib/lib.d.ts No cached semantic diagnostics in the builder:: @@ -86,9 +86,9 @@ Output:: Program root files: ["/a/a.ts","/a/b.ts","/a/lib/lib.d.ts"] Program options: {"outFile":"/a/out.js","watch":true,"project":"/a/tsconfig.json","configFilePath":"/a/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /a/a.ts /a/b.ts -/a/lib/lib.d.ts No cached semantic diagnostics in the builder:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/Updates-diagnostics-when-'--noUnusedLabels'-changes.js b/tests/baselines/reference/tscWatch/programUpdates/Updates-diagnostics-when-'--noUnusedLabels'-changes.js index 385e212c21511..5f5f7f2ff28db 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/Updates-diagnostics-when-'--noUnusedLabels'-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/Updates-diagnostics-when-'--noUnusedLabels'-changes.js @@ -32,12 +32,12 @@ Output:: Program root files: ["/a.ts","/a/lib/lib.d.ts"] Program options: {"allowUnusedLabels":true,"watch":true,"project":"/tsconfig.json","configFilePath":"/tsconfig.json"} Program files:: -/a.ts /a/lib/lib.d.ts +/a.ts Semantic diagnostics in builder refreshed for:: -/a.ts /a/lib/lib.d.ts +/a.ts WatchedFiles:: /tsconfig.json: @@ -85,12 +85,12 @@ Output:: Program root files: ["/a.ts","/a/lib/lib.d.ts"] Program options: {"allowUnusedLabels":false,"watch":true,"project":"/tsconfig.json","configFilePath":"/tsconfig.json"} Program files:: -/a.ts /a/lib/lib.d.ts +/a.ts Semantic diagnostics in builder refreshed for:: -/a.ts /a/lib/lib.d.ts +/a.ts WatchedFiles:: /tsconfig.json: @@ -128,12 +128,12 @@ Output:: Program root files: ["/a.ts","/a/lib/lib.d.ts"] Program options: {"allowUnusedLabels":true,"watch":true,"project":"/tsconfig.json","configFilePath":"/tsconfig.json"} Program files:: -/a.ts /a/lib/lib.d.ts +/a.ts Semantic diagnostics in builder refreshed for:: -/a.ts /a/lib/lib.d.ts +/a.ts WatchedFiles:: /tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/programUpdates/types-should-load-from-config-file-path-if-config-exists.js b/tests/baselines/reference/tscWatch/programUpdates/types-should-load-from-config-file-path-if-config-exists.js index 4b8bd538da9b5..6daced1b0bf4d 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/types-should-load-from-config-file-path-if-config-exists.js +++ b/tests/baselines/reference/tscWatch/programUpdates/types-should-load-from-config-file-path-if-config-exists.js @@ -36,13 +36,13 @@ Program root files: ["/a/b/app.ts"] Program options: {"types":["node"],"typeRoots":[],"watch":true,"project":"/a/b/tsconfig.json","configFilePath":"/a/b/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/a/b/app.ts /a/b/node_modules/@types/node/index.d.ts +/a/b/app.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts -/a/b/app.ts /a/b/node_modules/@types/node/index.d.ts +/a/b/app.ts WatchedFiles:: /a/b/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js index c9eae41a5e3a6..7eef072f7159e 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js @@ -51,14 +51,14 @@ Output:: Program root files: ["/a.ts","/b.ts","/a/lib/lib.d.ts"] Program options: {"target":2,"importsNotUsedAsValues":2,"watch":true,"configFilePath":"/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /b.ts /a.ts -/a/lib/lib.d.ts Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts /b.ts /a.ts -/a/lib/lib.d.ts WatchedFiles:: /tsconfig.json: @@ -126,14 +126,14 @@ Output:: Program root files: ["/a.ts","/b.ts","/a/lib/lib.d.ts"] Program options: {"target":2,"importsNotUsedAsValues":2,"experimentalDecorators":true,"watch":true,"configFilePath":"/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /b.ts /a.ts -/a/lib/lib.d.ts Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts /b.ts /a.ts -/a/lib/lib.d.ts WatchedFiles:: /tsconfig.json: @@ -173,14 +173,14 @@ Output:: Program root files: ["/a.ts","/b.ts","/a/lib/lib.d.ts"] Program options: {"target":2,"importsNotUsedAsValues":2,"experimentalDecorators":true,"emitDecoratorMetadata":true,"watch":true,"configFilePath":"/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /b.ts /a.ts -/a/lib/lib.d.ts Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts /b.ts /a.ts -/a/lib/lib.d.ts WatchedFiles:: /tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-when-useDefineForClassFields-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-when-useDefineForClassFields-changes.js index faaefae32a897..ceed166a240f2 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-when-useDefineForClassFields-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-when-useDefineForClassFields-changes.js @@ -39,12 +39,12 @@ Output:: Program root files: ["/a.ts","/a/lib/lib.d.ts"] Program options: {"target":2,"watch":true,"configFilePath":"/tsconfig.json"} Program files:: -/a.ts /a/lib/lib.d.ts +/a.ts Semantic diagnostics in builder refreshed for:: -/a.ts /a/lib/lib.d.ts +/a.ts WatchedFiles:: /tsconfig.json: @@ -100,12 +100,12 @@ Output:: Program root files: ["/a.ts","/a/lib/lib.d.ts"] Program options: {"target":2,"useDefineForClassFields":true,"watch":true,"configFilePath":"/tsconfig.json"} Program files:: -/a.ts /a/lib/lib.d.ts +/a.ts Semantic diagnostics in builder refreshed for:: -/a.ts /a/lib/lib.d.ts +/a.ts WatchedFiles:: /tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-forceConsistentCasingInFileNames-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-forceConsistentCasingInFileNames-changes.js index 43b900800db31..e418e298f4377 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-forceConsistentCasingInFileNames-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-forceConsistentCasingInFileNames-changes.js @@ -35,14 +35,14 @@ Output:: Program root files: ["/a.ts","/b.ts","/a/lib/lib.d.ts"] Program options: {"watch":true,"configFilePath":"/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /a.ts /b.ts -/a/lib/lib.d.ts Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts /a.ts /b.ts -/a/lib/lib.d.ts WatchedFiles:: /tsconfig.json: @@ -105,9 +105,9 @@ Output:: Program root files: ["/a.ts","/b.ts","/a/lib/lib.d.ts"] Program options: {"forceConsistentCasingInFileNames":true,"watch":true,"configFilePath":"/tsconfig.json"} Program files:: +/a/lib/lib.d.ts /a.ts /b.ts -/a/lib/lib.d.ts Semantic diagnostics in builder refreshed for:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js b/tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js index 4221bac04f8a6..f10715bf4684c 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js @@ -61,13 +61,13 @@ Program root files: ["/user/username/projects/myproject/a.ts","/user/username/pr Program options: {"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/user/username/projects/myproject/a.ts /user/username/projects/myproject/b.d.ts +/user/username/projects/myproject/a.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts -/user/username/projects/myproject/a.ts /user/username/projects/myproject/b.d.ts +/user/username/projects/myproject/a.ts WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -119,8 +119,8 @@ Program root files: ["/user/username/projects/myproject/a.ts","/user/username/pr Program options: {"skipLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/user/username/projects/myproject/a.ts /user/username/projects/myproject/b.d.ts +/user/username/projects/myproject/a.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts @@ -179,8 +179,8 @@ Program root files: ["/user/username/projects/myproject/a.ts","/user/username/pr Program options: {"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/user/username/projects/myproject/a.ts /user/username/projects/myproject/b.d.ts +/user/username/projects/myproject/a.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts @@ -245,8 +245,8 @@ Program root files: ["/user/username/projects/myproject/a.ts","/user/username/pr Program options: {"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/user/username/projects/myproject/a.ts /user/username/projects/myproject/b.d.ts +/user/username/projects/myproject/a.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts @@ -304,8 +304,8 @@ Program root files: ["/user/username/projects/myproject/a.ts","/user/username/pr Program options: {"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/user/username/projects/myproject/a.ts /user/username/projects/myproject/b.d.ts +/user/username/projects/myproject/a.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts @@ -357,8 +357,8 @@ Program root files: ["/user/username/projects/myproject/a.ts","/user/username/pr Program options: {"skipLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/user/username/projects/myproject/a.ts /user/username/projects/myproject/b.d.ts +/user/username/projects/myproject/a.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts @@ -423,8 +423,8 @@ Program root files: ["/user/username/projects/myproject/a.ts","/user/username/pr Program options: {"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/user/username/projects/myproject/a.ts /user/username/projects/myproject/b.d.ts +/user/username/projects/myproject/a.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts diff --git a/tests/baselines/reference/tscWatch/resolutionCache/when-types-in-compiler-option-are-global-and-installed-at-later-point.js b/tests/baselines/reference/tscWatch/resolutionCache/when-types-in-compiler-option-are-global-and-installed-at-later-point.js index cc54ce3b6d9fb..8c4b3ea3c1a05 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/when-types-in-compiler-option-are-global-and-installed-at-later-point.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/when-types-in-compiler-option-are-global-and-installed-at-later-point.js @@ -89,13 +89,13 @@ Program root files: ["/user/username/projects/myproject/lib/app.ts"] Program options: {"module":0,"types":["@myapp/ts-types"],"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts -/user/username/projects/myproject/lib/app.ts /user/username/projects/myproject/node_modules/@myapp/ts-types/types/somefile.define.d.ts +/user/username/projects/myproject/lib/app.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts -/user/username/projects/myproject/lib/app.ts /user/username/projects/myproject/node_modules/@myapp/ts-types/types/somefile.define.d.ts +/user/username/projects/myproject/lib/app.ts WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js index 2014f8e515324..3f7dc36226288 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js @@ -48,13 +48,13 @@ Program root files: ["/a/b/foo.ts","/a/b/bar.d.ts"] Program options: {"watch":true} Program files:: /a/lib/lib.d.ts -/a/b/foo.ts /a/b/bar.d.ts +/a/b/foo.ts Semantic diagnostics in builder refreshed for:: /a/lib/lib.d.ts -/a/b/foo.ts /a/b/bar.d.ts +/a/b/foo.ts WatchedFiles:: /a/b/foo.ts: @@ -112,12 +112,12 @@ Program root files: ["/a/b/foo.ts","/a/b/bar.d.ts"] Program options: {"watch":true} Program files:: /a/lib/lib.d.ts -/a/b/foo.ts /a/b/bar.d.ts +/a/b/foo.ts Semantic diagnostics in builder refreshed for:: -/a/b/foo.ts /a/b/bar.d.ts +/a/b/foo.ts WatchedFiles:: /a/b/foo.ts: diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js index e374a0d0dc510..de4a9a1ec5253 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js @@ -96,12 +96,12 @@ Program root files: ["/a/b/foo.ts"] Program options: {"watch":true} Program files:: /a/lib/lib.d.ts -/a/b/foo.ts /a/b/node_modules/@types/node/index.d.ts +/a/b/foo.ts Semantic diagnostics in builder refreshed for:: -/a/b/foo.ts /a/b/node_modules/@types/node/index.d.ts +/a/b/foo.ts WatchedFiles:: /a/b/foo.ts: diff --git a/tests/cases/fourslash/importNameCodeFix_noDestructureNonObjectLiteral.ts b/tests/cases/fourslash/importNameCodeFix_noDestructureNonObjectLiteral.ts index db1c899d70dc8..81d67d7ca2b15 100644 --- a/tests/cases/fourslash/importNameCodeFix_noDestructureNonObjectLiteral.ts +++ b/tests/cases/fourslash/importNameCodeFix_noDestructureNonObjectLiteral.ts @@ -29,4 +29,4 @@ // @Filename: /index.ts ////filter/**/ -verify.importFixModuleSpecifiers('', ['./object-literal', './jquery']); +verify.importFixModuleSpecifiers('', ['./jquery', './object-literal']);