@@ -23776,8 +23776,8 @@ var ts;
23776
23776
visitNode(cbNode, node.typeExpression) ||
23777
23777
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
23778
23778
: 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) ));
23781
23781
case 324:
23782
23782
return visitNode(cbNode, node.tagName) ||
23783
23783
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -36917,6 +36917,9 @@ var ts;
36917
36917
var requireSymbol = createSymbol(4, "require");
36918
36918
var apparentArgumentCount;
36919
36919
var checker = {
36920
+ setSymbolChainCache: function (cache) {
36921
+ nodeBuilder.setSymbolChainCache(cache);
36922
+ },
36920
36923
getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
36921
36924
getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
36922
36925
getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; },
@@ -40186,7 +40189,9 @@ var ts;
40186
40189
return !!type.symbol && !!(type.symbol.flags & 32) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288) && !!(ts.getObjectFlags(type) & 16777216)));
40187
40190
}
40188
40191
function createNodeBuilder() {
40192
+ var symbolChainCache;
40189
40193
return {
40194
+ setSymbolChainCache: function (cache) { symbolChainCache = cache; },
40190
40195
typeToTypeNode: function (type, enclosingDeclaration, flags, tracker) {
40191
40196
return withContext(enclosingDeclaration, flags, tracker, function (context) { return typeToTypeNodeHelper(type, context); });
40192
40197
},
@@ -40233,6 +40238,7 @@ var ts;
40233
40238
fileExists: function (fileName) { return host.fileExists(fileName); },
40234
40239
getFileIncludeReasons: function () { return host.getFileIncludeReasons(); },
40235
40240
} : undefined },
40241
+ cache: symbolChainCache,
40236
40242
encounteredError: false,
40237
40243
reportedDiagnostic: false,
40238
40244
visitedTypes: undefined,
@@ -41175,6 +41181,29 @@ var ts;
41175
41181
}
41176
41182
return chain;
41177
41183
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) {
41178
41207
var accessibleSymbolChain = getAccessibleSymbolChain(symbol, context.enclosingDeclaration, meaning, !!(context.flags & 128));
41179
41208
var parentSpecifiers;
41180
41209
if (!accessibleSymbolChain ||
@@ -72587,6 +72616,7 @@ var ts;
72587
72616
case 121:
72588
72617
case 122:
72589
72618
case 126:
72619
+ case 157:
72590
72620
case 85:
72591
72621
case 134:
72592
72622
case 143:
@@ -88413,11 +88443,14 @@ var ts;
88413
88443
if (nextNode.kind === 11) {
88414
88444
return 0;
88415
88445
}
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;
88421
88454
}
88422
88455
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
88423
88456
return 1;
@@ -88963,10 +88996,11 @@ var ts;
88963
88996
}
88964
88997
exitComment();
88965
88998
}
88999
+ function originalNodesHaveSameParent(nodeA, nodeB) {
89000
+ nodeA = ts.getOriginalNode(nodeA);
89001
+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
89002
+ }
88966
89003
function siblingNodePositionsAreComparable(previousNode, nextNode) {
88967
- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
88968
- return false;
88969
- }
88970
89004
if (nextNode.pos < previousNode.end) {
88971
89005
return false;
88972
89006
}
@@ -93601,8 +93635,11 @@ var ts;
93601
93635
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
93602
93636
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
93603
93637
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") {
93606
93643
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
93607
93644
}
93608
93645
}
@@ -95157,7 +95194,7 @@ var ts;
95157
95194
getCanonicalFileName: ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)
95158
95195
} : undefined;
95159
95196
function createDiagnosticReporter(system, pretty) {
95160
- var host = system === ts.sys ? sysFormatDiagnosticsHost : {
95197
+ var host = system === ts.sys && sysFormatDiagnosticsHost ? sysFormatDiagnosticsHost : {
95161
95198
getCurrentDirectory: function () { return system.getCurrentDirectory(); },
95162
95199
getNewLine: function () { return system.newLine; },
95163
95200
getCanonicalFileName: ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames),
@@ -96750,7 +96787,7 @@ var ts;
96750
96787
},
96751
96788
emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
96752
96789
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)) ); });
96754
96791
}
96755
96792
executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
96756
96793
if (step === BuildStep.EmitBuildInfo) {
@@ -96832,13 +96869,14 @@ var ts;
96832
96869
}
96833
96870
function emit(writeFileCallback, cancellationToken, customTransformers) {
96834
96871
var _a;
96872
+ var _b, _c;
96835
96873
ts.Debug.assertIsDefined(program);
96836
96874
ts.Debug.assert(step === BuildStep.Emit);
96837
96875
program.backupState();
96838
96876
var declDiagnostics;
96839
96877
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
96840
96878
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;
96842
96880
if (declDiagnostics) {
96843
96881
program.restoreState();
96844
96882
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
@@ -96915,6 +96953,7 @@ var ts;
96915
96953
return emitDiagnostics;
96916
96954
}
96917
96955
function emitBundle(writeFileCallback, customTransformers) {
96956
+ var _a, _b;
96918
96957
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
96919
96958
if (state.options.dry) {
96920
96959
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -96929,7 +96968,7 @@ var ts;
96929
96968
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
96930
96969
var refName = resolveProjectName(state, ref.path);
96931
96970
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)) );
96933
96972
if (ts.isString(outputFiles)) {
96934
96973
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
96935
96974
step = BuildStep.BuildInvalidatedProjectOfBundle;
0 commit comments