@@ -96,7 +96,7 @@ var ts;
96
96
// The following is baselined as a literal template type without intervention
97
97
/** The version of the TypeScript compiler release */
98
98
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
99
- ts.version = "4.3.2 ";
99
+ ts.version = "4.3.3 ";
100
100
/* @internal */
101
101
var Comparison;
102
102
(function (Comparison) {
@@ -29268,8 +29268,8 @@ var ts;
29268
29268
visitNode(cbNode, node.typeExpression) ||
29269
29269
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
29270
29270
: visitNode(cbNode, node.typeExpression) ||
29271
- visitNode(cbNode, node.name)) ||
29272
- (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
29271
+ visitNode(cbNode, node.name) ||
29272
+ (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment) ));
29273
29273
case 320 /* JSDocAuthorTag */:
29274
29274
return visitNode(cbNode, node.tagName) ||
29275
29275
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -37382,6 +37382,8 @@ var ts;
37382
37382
{
37383
37383
name: "strict",
37384
37384
type: "boolean",
37385
+ // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here
37386
+ // The value of each strictFlag depends on own strictFlag value or this and never accessed directly.
37385
37387
showInSimplifiedHelpView: true,
37386
37388
category: ts.Diagnostics.Strict_Type_Checking_Options,
37387
37389
description: ts.Diagnostics.Enable_all_strict_type_checking_options
@@ -59168,8 +59170,7 @@ var ts;
59168
59170
return type;
59169
59171
}
59170
59172
function maybeTypeParameterReference(node) {
59171
- return !(node.kind === 158 /* QualifiedName */ ||
59172
- node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
59173
+ return !(node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
59173
59174
node.parent.kind === 196 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
59174
59175
}
59175
59176
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -59197,7 +59198,10 @@ var ts;
59197
59198
return true;
59198
59199
case 166 /* MethodDeclaration */:
59199
59200
case 165 /* MethodSignature */:
59200
- return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
59201
+ return !node.type && !!node.body ||
59202
+ ts.some(node.typeParameters, containsReference) ||
59203
+ ts.some(node.parameters, containsReference) ||
59204
+ !!node.type && containsReference(node.type);
59201
59205
}
59202
59206
return !!ts.forEachChild(node, containsReference);
59203
59207
}
@@ -64580,12 +64584,14 @@ var ts;
64580
64584
applyToReturnTypes(source, target, inferFromTypes);
64581
64585
}
64582
64586
function inferFromIndexTypes(source, target) {
64587
+ // Inferences across mapped type index signatures are pretty much the same a inferences to homomorphic variables
64588
+ var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* Mapped */) ? 8 /* HomomorphicMappedType */ : 0;
64583
64589
var targetStringIndexType = getIndexTypeOfType(target, 0 /* String */);
64584
64590
if (targetStringIndexType) {
64585
64591
var sourceIndexType = getIndexTypeOfType(source, 0 /* String */) ||
64586
64592
getImplicitIndexTypeOfType(source, 0 /* String */);
64587
64593
if (sourceIndexType) {
64588
- inferFromTypes (sourceIndexType, targetStringIndexType);
64594
+ inferWithPriority (sourceIndexType, targetStringIndexType, priority );
64589
64595
}
64590
64596
}
64591
64597
var targetNumberIndexType = getIndexTypeOfType(target, 1 /* Number */);
@@ -64594,7 +64600,7 @@ var ts;
64594
64600
getIndexTypeOfType(source, 0 /* String */) ||
64595
64601
getImplicitIndexTypeOfType(source, 1 /* Number */);
64596
64602
if (sourceIndexType) {
64597
- inferFromTypes (sourceIndexType, targetNumberIndexType);
64603
+ inferWithPriority (sourceIndexType, targetNumberIndexType, priority );
64598
64604
}
64599
64605
}
64600
64606
}
@@ -85910,6 +85916,7 @@ var ts;
85910
85916
case 120 /* PrivateKeyword */:
85911
85917
case 121 /* ProtectedKeyword */:
85912
85918
case 125 /* AbstractKeyword */:
85919
+ case 156 /* OverrideKeyword */:
85913
85920
case 84 /* ConstKeyword */:
85914
85921
case 133 /* DeclareKeyword */:
85915
85922
case 142 /* ReadonlyKeyword */:
@@ -107102,11 +107109,21 @@ var ts;
107102
107109
// JsxText will be written with its leading whitespace, so don't add more manually.
107103
107110
return 0;
107104
107111
}
107105
- else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
107106
- return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
107107
- }
107108
- else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
107109
- return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
107112
+ else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
107113
+ if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
107114
+ return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
107115
+ }
107116
+ // If `preserveSourceNewlines` is `false` we do not intend to preserve the effective lines between the
107117
+ // previous and next node. Instead we naively check whether nodes are on separate lines within the
107118
+ // same node parent. If so, we intend to preserve a single line terminator. This is less precise and
107119
+ // expensive than checking with `preserveSourceNewlines` as above, but the goal is not to preserve the
107120
+ // effective source lines between two sibling nodes.
107121
+ else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
107122
+ return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
107123
+ }
107124
+ // If the two nodes are not comparable, add a line terminator based on the format that can indicate
107125
+ // whether new lines are preferred or not.
107126
+ return format & 65536 /* PreferNewLine */ ? 1 : 0;
107110
107127
}
107111
107128
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
107112
107129
return 1;
@@ -107746,10 +107763,13 @@ var ts;
107746
107763
}
107747
107764
exitComment();
107748
107765
}
107766
+ function originalNodesHaveSameParent(nodeA, nodeB) {
107767
+ nodeA = ts.getOriginalNode(nodeA);
107768
+ // For performance, do not call `getOriginalNode` for `nodeB` if `nodeA` doesn't even
107769
+ // have a parent node.
107770
+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
107771
+ }
107749
107772
function siblingNodePositionsAreComparable(previousNode, nextNode) {
107750
- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
107751
- return false;
107752
- }
107753
107773
if (nextNode.pos < previousNode.end) {
107754
107774
return false;
107755
107775
}
@@ -113122,8 +113142,14 @@ var ts;
113122
113142
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
113123
113143
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
113124
113144
var name = _a[_i];
113125
- var optionInfo = optionsNameMap.get(name.toLowerCase());
113126
- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
113145
+ var optionKey = name.toLowerCase();
113146
+ var optionInfo = optionsNameMap.get(optionKey);
113147
+ if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
113148
+ // We need to store `strict`, even though it won't be examined directly, so that the
113149
+ // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
113150
+ optionKey === "strict" ||
113151
+ // We need to store these to determine whether `lib` files need to be rechecked.
113152
+ optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
113127
113153
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
113128
113154
}
113129
113155
}
0 commit comments