@@ -23776,8 +23776,8 @@ var ts;
2377623776 visitNode(cbNode, node.typeExpression) ||
2377723777 (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
2377823778 : visitNode(cbNode, node.typeExpression) ||
23779- visitNode(cbNode, node.name)) ||
23780- (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
23779+ visitNode(cbNode, node.name) ||
23780+ (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment) ));
2378123781 case 324:
2378223782 return visitNode(cbNode, node.tagName) ||
2378323783 (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -36917,6 +36917,9 @@ var ts;
3691736917 var requireSymbol = createSymbol(4, "require");
3691836918 var apparentArgumentCount;
3691936919 var checker = {
36920+ setSymbolChainCache: function (cache) {
36921+ nodeBuilder.setSymbolChainCache(cache);
36922+ },
3692036923 getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
3692136924 getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
3692236925 getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; },
@@ -40186,7 +40189,9 @@ var ts;
4018640189 return !!type.symbol && !!(type.symbol.flags & 32) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288) && !!(ts.getObjectFlags(type) & 16777216)));
4018740190 }
4018840191 function createNodeBuilder() {
40192+ var symbolChainCache;
4018940193 return {
40194+ setSymbolChainCache: function (cache) { symbolChainCache = cache; },
4019040195 typeToTypeNode: function (type, enclosingDeclaration, flags, tracker) {
4019140196 return withContext(enclosingDeclaration, flags, tracker, function (context) { return typeToTypeNodeHelper(type, context); });
4019240197 },
@@ -40233,6 +40238,7 @@ var ts;
4023340238 fileExists: function (fileName) { return host.fileExists(fileName); },
4023440239 getFileIncludeReasons: function () { return host.getFileIncludeReasons(); },
4023540240 } : undefined },
40241+ cache: symbolChainCache,
4023640242 encounteredError: false,
4023740243 reportedDiagnostic: false,
4023840244 visitedTypes: undefined,
@@ -41175,6 +41181,29 @@ var ts;
4117541181 }
4117641182 return chain;
4117741183 function getSymbolChain(symbol, meaning, endOfChain) {
41184+ var key;
41185+ var result;
41186+ if (context.cache) {
41187+ key = {
41188+ symbol: symbol,
41189+ enclosingDeclaration: context.enclosingDeclaration,
41190+ flags: context.flags,
41191+ meaning: meaning,
41192+ yieldModuleSymbol: yieldModuleSymbol,
41193+ endOfChain: endOfChain
41194+ };
41195+ result = context.cache.lookup(key);
41196+ if (result) {
41197+ return result;
41198+ }
41199+ }
41200+ result = doGetSymbolChain(symbol, meaning, endOfChain);
41201+ if (result && key && context.cache) {
41202+ context.cache.cache(key, result);
41203+ }
41204+ return result;
41205+ }
41206+ function doGetSymbolChain(symbol, meaning, endOfChain) {
4117841207 var accessibleSymbolChain = getAccessibleSymbolChain(symbol, context.enclosingDeclaration, meaning, !!(context.flags & 128));
4117941208 var parentSpecifiers;
4118041209 if (!accessibleSymbolChain ||
@@ -72587,6 +72616,7 @@ var ts;
7258772616 case 121:
7258872617 case 122:
7258972618 case 126:
72619+ case 157:
7259072620 case 85:
7259172621 case 134:
7259272622 case 143:
@@ -88413,11 +88443,14 @@ var ts;
8841388443 if (nextNode.kind === 11) {
8841488444 return 0;
8841588445 }
88416- else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
88417- return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
88418- }
88419- else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
88420- return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
88446+ else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
88447+ if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
88448+ return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
88449+ }
88450+ else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
88451+ return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
88452+ }
88453+ return format & 65536 ? 1 : 0;
8842188454 }
8842288455 else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
8842388456 return 1;
@@ -88963,10 +88996,11 @@ var ts;
8896388996 }
8896488997 exitComment();
8896588998 }
88999+ function originalNodesHaveSameParent(nodeA, nodeB) {
89000+ nodeA = ts.getOriginalNode(nodeA);
89001+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
89002+ }
8896689003 function siblingNodePositionsAreComparable(previousNode, nextNode) {
88967- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
88968- return false;
88969- }
8897089004 if (nextNode.pos < previousNode.end) {
8897189005 return false;
8897289006 }
@@ -93601,8 +93635,11 @@ var ts;
9360193635 var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
9360293636 for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
9360393637 var name = _a[_i];
93604- var optionInfo = optionsNameMap.get(name.toLowerCase());
93605- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
93638+ var optionKey = name.toLowerCase();
93639+ var optionInfo = optionsNameMap.get(optionKey);
93640+ if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
93641+ optionKey === "strict" ||
93642+ optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
9360693643 (result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
9360793644 }
9360893645 }
@@ -95157,7 +95194,7 @@ var ts;
9515795194 getCanonicalFileName: ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)
9515895195 } : undefined;
9515995196 function createDiagnosticReporter(system, pretty) {
95160- var host = system === ts.sys ? sysFormatDiagnosticsHost : {
95197+ var host = system === ts.sys && sysFormatDiagnosticsHost ? sysFormatDiagnosticsHost : {
9516195198 getCurrentDirectory: function () { return system.getCurrentDirectory(); },
9516295199 getNewLine: function () { return system.newLine; },
9516395200 getCanonicalFileName: ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames),
@@ -96750,7 +96787,7 @@ var ts;
9675096787 },
9675196788 emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
9675296789 if (targetSourceFile || emitOnlyDtsFiles) {
96753- return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
96790+ return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)) ); });
9675496791 }
9675596792 executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
9675696793 if (step === BuildStep.EmitBuildInfo) {
@@ -96832,13 +96869,14 @@ var ts;
9683296869 }
9683396870 function emit(writeFileCallback, cancellationToken, customTransformers) {
9683496871 var _a;
96872+ var _b, _c;
9683596873 ts.Debug.assertIsDefined(program);
9683696874 ts.Debug.assert(step === BuildStep.Emit);
9683796875 program.backupState();
9683896876 var declDiagnostics;
9683996877 var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
9684096878 var outputFiles = [];
96841- var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers).emitResult;
96879+ var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project)) ).emitResult;
9684296880 if (declDiagnostics) {
9684396881 program.restoreState();
9684496882 (_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
@@ -96915,6 +96953,7 @@ var ts;
9691596953 return emitDiagnostics;
9691696954 }
9691796955 function emitBundle(writeFileCallback, customTransformers) {
96956+ var _a, _b;
9691896957 ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
9691996958 if (state.options.dry) {
9692096959 reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -96929,7 +96968,7 @@ var ts;
9692996968 var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
9693096969 var refName = resolveProjectName(state, ref.path);
9693196970 return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
96932- }, customTransformers);
96971+ }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)) );
9693396972 if (ts.isString(outputFiles)) {
9693496973 reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
9693596974 step = BuildStep.BuildInvalidatedProjectOfBundle;
0 commit comments