@typescript-deploys/pr-build 5.9.0-pr-61589-11 → 5.9.0-pr-61505-58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_tsc.js +97 -48
- package/lib/typescript.d.ts +4 -0
- package/lib/typescript.js +98 -49
- package/package.json +1 -1
package/lib/_tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.9";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20250502`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -6770,7 +6770,7 @@ var Diagnostics = {
|
|
|
6770
6770
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, 1 /* Error */, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
6771
6771
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, 1 /* Error */, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
6772
6772
|
Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, 1 /* Error */, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."),
|
|
6773
|
-
|
|
6773
|
+
arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks: diag(2815, 1 /* Error */, "arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks_2815", "'arguments' cannot be referenced in property initializers or class static initialization blocks."),
|
|
6774
6774
|
Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, 1 /* Error */, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."),
|
|
6775
6775
|
Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, 1 /* Error */, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."),
|
|
6776
6776
|
Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, 1 /* Error */, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),
|
|
@@ -46584,6 +46584,7 @@ function createTypeChecker(host) {
|
|
|
46584
46584
|
getNullType: () => nullType,
|
|
46585
46585
|
getESSymbolType: () => esSymbolType,
|
|
46586
46586
|
getNeverType: () => neverType,
|
|
46587
|
+
getNonPrimitiveType: () => nonPrimitiveType,
|
|
46587
46588
|
getOptionalType: () => optionalType,
|
|
46588
46589
|
getPromiseType: () => getGlobalPromiseType(
|
|
46589
46590
|
/*reportErrors*/
|
|
@@ -47203,6 +47204,9 @@ function createTypeChecker(host) {
|
|
|
47203
47204
|
var inferenceContextNodes = [];
|
|
47204
47205
|
var inferenceContexts = [];
|
|
47205
47206
|
var inferenceContextCount = 0;
|
|
47207
|
+
var activeTypeMappers = [];
|
|
47208
|
+
var activeTypeMappersCaches = [];
|
|
47209
|
+
var activeTypeMappersCount = 0;
|
|
47206
47210
|
var emptyStringType = getStringLiteralType("");
|
|
47207
47211
|
var zeroType = getNumberLiteralType(0);
|
|
47208
47212
|
var zeroBigIntType = getBigIntLiteralType({ negative: false, base10Value: "0" });
|
|
@@ -63282,10 +63286,25 @@ function createTypeChecker(host) {
|
|
|
63282
63286
|
error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
63283
63287
|
return errorType;
|
|
63284
63288
|
}
|
|
63289
|
+
const index = findActiveMapper(mapper);
|
|
63290
|
+
if (index === -1) {
|
|
63291
|
+
pushActiveMapper(mapper);
|
|
63292
|
+
}
|
|
63293
|
+
const key = type.id + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
63294
|
+
const mapperCache = activeTypeMappersCaches[index !== -1 ? index : activeTypeMappersCount - 1];
|
|
63295
|
+
const cached = mapperCache.get(key);
|
|
63296
|
+
if (cached) {
|
|
63297
|
+
return cached;
|
|
63298
|
+
}
|
|
63285
63299
|
totalInstantiationCount++;
|
|
63286
63300
|
instantiationCount++;
|
|
63287
63301
|
instantiationDepth++;
|
|
63288
63302
|
const result = instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments);
|
|
63303
|
+
if (index === -1) {
|
|
63304
|
+
popActiveMapper();
|
|
63305
|
+
} else {
|
|
63306
|
+
mapperCache.set(key, result);
|
|
63307
|
+
}
|
|
63289
63308
|
instantiationDepth--;
|
|
63290
63309
|
return result;
|
|
63291
63310
|
}
|
|
@@ -65603,6 +65622,36 @@ function createTypeChecker(host) {
|
|
|
65603
65622
|
}
|
|
65604
65623
|
}
|
|
65605
65624
|
}
|
|
65625
|
+
if (sourceFlags & 134217728 /* TemplateLiteral */) {
|
|
65626
|
+
if (arrayIsEqualTo(source2.texts, target2.texts)) {
|
|
65627
|
+
const sourceTypes = source2.types;
|
|
65628
|
+
const targetTypes = target2.types;
|
|
65629
|
+
result2 = -1 /* True */;
|
|
65630
|
+
for (let i = 0; i < sourceTypes.length; i++) {
|
|
65631
|
+
if (!(result2 &= isRelatedTo(
|
|
65632
|
+
sourceTypes[i],
|
|
65633
|
+
targetTypes[i],
|
|
65634
|
+
3 /* Both */,
|
|
65635
|
+
/*reportErrors*/
|
|
65636
|
+
false
|
|
65637
|
+
))) {
|
|
65638
|
+
break;
|
|
65639
|
+
}
|
|
65640
|
+
}
|
|
65641
|
+
return result2;
|
|
65642
|
+
}
|
|
65643
|
+
}
|
|
65644
|
+
if (sourceFlags & 268435456 /* StringMapping */) {
|
|
65645
|
+
if (source2.symbol === target2.symbol) {
|
|
65646
|
+
return isRelatedTo(
|
|
65647
|
+
source2.type,
|
|
65648
|
+
target2.type,
|
|
65649
|
+
3 /* Both */,
|
|
65650
|
+
/*reportErrors*/
|
|
65651
|
+
false
|
|
65652
|
+
);
|
|
65653
|
+
}
|
|
65654
|
+
}
|
|
65606
65655
|
if (!(sourceFlags & 524288 /* Object */)) {
|
|
65607
65656
|
return 0 /* False */;
|
|
65608
65657
|
}
|
|
@@ -68832,6 +68881,7 @@ function createTypeChecker(host) {
|
|
|
68832
68881
|
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
68833
68882
|
}
|
|
68834
68883
|
}
|
|
68884
|
+
clearActiveMapperCaches();
|
|
68835
68885
|
}
|
|
68836
68886
|
return inference.inferredType;
|
|
68837
68887
|
}
|
|
@@ -70845,31 +70895,15 @@ function createTypeChecker(host) {
|
|
|
70845
70895
|
}
|
|
70846
70896
|
const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
|
|
70847
70897
|
const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;
|
|
70848
|
-
|
|
70849
|
-
|
|
70850
|
-
|
|
70851
|
-
|
|
70852
|
-
|
|
70853
|
-
|
|
70854
|
-
|
|
70855
|
-
|
|
70856
|
-
|
|
70857
|
-
}
|
|
70858
|
-
const directlyRelated = checkDerived ? isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType;
|
|
70859
|
-
if (!(directlyRelated.flags & 131072 /* Never */)) {
|
|
70860
|
-
matchedCandidates = appendIfUnique(matchedCandidates, c);
|
|
70861
|
-
}
|
|
70862
|
-
return directlyRelated;
|
|
70863
|
-
}
|
|
70864
|
-
));
|
|
70865
|
-
if (matchedCandidates.length !== countTypes(candidate)) {
|
|
70866
|
-
narrowedType = getUnionType([
|
|
70867
|
-
narrowedType,
|
|
70868
|
-
mapType(candidate, (c) => {
|
|
70869
|
-
return !containsType(matchedCandidates, c) ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : neverType;
|
|
70870
|
-
})
|
|
70871
|
-
]);
|
|
70872
|
-
}
|
|
70898
|
+
const narrowedType = mapType(candidate, (c) => {
|
|
70899
|
+
const discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName);
|
|
70900
|
+
const matching = discriminant && getConstituentTypeForKeyType(type, discriminant);
|
|
70901
|
+
const directlyRelated = mapType(
|
|
70902
|
+
matching || type,
|
|
70903
|
+
checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType
|
|
70904
|
+
);
|
|
70905
|
+
return directlyRelated.flags & 131072 /* Never */ ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : directlyRelated;
|
|
70906
|
+
});
|
|
70873
70907
|
return !(narrowedType.flags & 131072 /* Never */) ? narrowedType : isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, type) ? candidate : getIntersectionType([type, candidate]);
|
|
70874
70908
|
}
|
|
70875
70909
|
function narrowTypeByCallExpression(type, callExpression, assumeTrue) {
|
|
@@ -71587,8 +71621,12 @@ function createTypeChecker(host) {
|
|
|
71587
71621
|
function checkIdentifierCalculateNodeCheckFlags(node, symbol) {
|
|
71588
71622
|
if (isThisInTypeQuery(node)) return;
|
|
71589
71623
|
if (symbol === argumentsSymbol) {
|
|
71590
|
-
if (isInPropertyInitializerOrClassStaticBlock(
|
|
71591
|
-
|
|
71624
|
+
if (isInPropertyInitializerOrClassStaticBlock(
|
|
71625
|
+
node,
|
|
71626
|
+
/*ignoreArrowFunctions*/
|
|
71627
|
+
true
|
|
71628
|
+
)) {
|
|
71629
|
+
error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks);
|
|
71592
71630
|
return;
|
|
71593
71631
|
}
|
|
71594
71632
|
let container = getContainingFunction(node);
|
|
@@ -73109,6 +73147,27 @@ function createTypeChecker(host) {
|
|
|
73109
73147
|
}
|
|
73110
73148
|
}
|
|
73111
73149
|
}
|
|
73150
|
+
function pushActiveMapper(mapper) {
|
|
73151
|
+
activeTypeMappers[activeTypeMappersCount] = mapper;
|
|
73152
|
+
activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map();
|
|
73153
|
+
activeTypeMappersCount++;
|
|
73154
|
+
}
|
|
73155
|
+
function popActiveMapper() {
|
|
73156
|
+
activeTypeMappersCount--;
|
|
73157
|
+
}
|
|
73158
|
+
function findActiveMapper(mapper) {
|
|
73159
|
+
for (let i = activeTypeMappersCount - 1; i >= 0; i--) {
|
|
73160
|
+
if (mapper === activeTypeMappers[i]) {
|
|
73161
|
+
return i;
|
|
73162
|
+
}
|
|
73163
|
+
}
|
|
73164
|
+
return -1;
|
|
73165
|
+
}
|
|
73166
|
+
function clearActiveMapperCaches() {
|
|
73167
|
+
for (let i = activeTypeMappersCount - 1; i >= 0; i--) {
|
|
73168
|
+
activeTypeMappersCaches[i].clear();
|
|
73169
|
+
}
|
|
73170
|
+
}
|
|
73112
73171
|
function getContextualImportAttributeType(node) {
|
|
73113
73172
|
return getTypeOfPropertyOfContextualType(getGlobalImportAttributesType(
|
|
73114
73173
|
/*reportErrors*/
|
|
@@ -74868,31 +74927,21 @@ function createTypeChecker(host) {
|
|
|
74868
74927
|
addRelatedInfo(diagnosticMessage, createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName));
|
|
74869
74928
|
}
|
|
74870
74929
|
}
|
|
74871
|
-
function isInPropertyInitializerOrClassStaticBlock(node) {
|
|
74930
|
+
function isInPropertyInitializerOrClassStaticBlock(node, ignoreArrowFunctions) {
|
|
74872
74931
|
return !!findAncestor(node, (node2) => {
|
|
74873
74932
|
switch (node2.kind) {
|
|
74874
74933
|
case 172 /* PropertyDeclaration */:
|
|
74934
|
+
case 175 /* ClassStaticBlockDeclaration */:
|
|
74875
74935
|
return true;
|
|
74876
|
-
case
|
|
74877
|
-
case
|
|
74878
|
-
|
|
74879
|
-
case 178 /* SetAccessor */:
|
|
74880
|
-
case 305 /* SpreadAssignment */:
|
|
74881
|
-
case 167 /* ComputedPropertyName */:
|
|
74882
|
-
case 239 /* TemplateSpan */:
|
|
74883
|
-
case 294 /* JsxExpression */:
|
|
74884
|
-
case 291 /* JsxAttribute */:
|
|
74885
|
-
case 292 /* JsxAttributes */:
|
|
74886
|
-
case 293 /* JsxSpreadAttribute */:
|
|
74887
|
-
case 286 /* JsxOpeningElement */:
|
|
74888
|
-
case 233 /* ExpressionWithTypeArguments */:
|
|
74889
|
-
case 298 /* HeritageClause */:
|
|
74890
|
-
return false;
|
|
74936
|
+
case 186 /* TypeQuery */:
|
|
74937
|
+
case 287 /* JsxClosingElement */:
|
|
74938
|
+
return "quit";
|
|
74891
74939
|
case 219 /* ArrowFunction */:
|
|
74892
|
-
|
|
74893
|
-
|
|
74940
|
+
return ignoreArrowFunctions ? false : "quit";
|
|
74941
|
+
case 241 /* Block */:
|
|
74942
|
+
return isFunctionLikeDeclaration(node2.parent) && node2.parent.kind !== 219 /* ArrowFunction */ ? "quit" : false;
|
|
74894
74943
|
default:
|
|
74895
|
-
return
|
|
74944
|
+
return false;
|
|
74896
74945
|
}
|
|
74897
74946
|
});
|
|
74898
74947
|
}
|
package/lib/typescript.d.ts
CHANGED
|
@@ -6314,6 +6314,10 @@ declare namespace ts {
|
|
|
6314
6314
|
* is `never`. Instead, use `type.flags & TypeFlags.Never`.
|
|
6315
6315
|
*/
|
|
6316
6316
|
getNeverType(): Type;
|
|
6317
|
+
/**
|
|
6318
|
+
* Gets the intrinsic `object` type.
|
|
6319
|
+
*/
|
|
6320
|
+
getNonPrimitiveType(): Type;
|
|
6317
6321
|
/**
|
|
6318
6322
|
* Returns true if the "source" type is assignable to the "target" type.
|
|
6319
6323
|
*
|
package/lib/typescript.js
CHANGED
|
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2285
2285
|
|
|
2286
2286
|
// src/compiler/corePublic.ts
|
|
2287
2287
|
var versionMajorMinor = "5.9";
|
|
2288
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2288
|
+
var version = `${versionMajorMinor}.0-insiders.20250502`;
|
|
2289
2289
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2290
2290
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2291
2291
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -10156,7 +10156,7 @@ var Diagnostics = {
|
|
|
10156
10156
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, 1 /* Error */, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
10157
10157
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, 1 /* Error */, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
10158
10158
|
Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, 1 /* Error */, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."),
|
|
10159
|
-
|
|
10159
|
+
arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks: diag(2815, 1 /* Error */, "arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks_2815", "'arguments' cannot be referenced in property initializers or class static initialization blocks."),
|
|
10160
10160
|
Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, 1 /* Error */, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."),
|
|
10161
10161
|
Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, 1 /* Error */, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."),
|
|
10162
10162
|
Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, 1 /* Error */, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),
|
|
@@ -51194,6 +51194,7 @@ function createTypeChecker(host) {
|
|
|
51194
51194
|
getNullType: () => nullType,
|
|
51195
51195
|
getESSymbolType: () => esSymbolType,
|
|
51196
51196
|
getNeverType: () => neverType,
|
|
51197
|
+
getNonPrimitiveType: () => nonPrimitiveType,
|
|
51197
51198
|
getOptionalType: () => optionalType,
|
|
51198
51199
|
getPromiseType: () => getGlobalPromiseType(
|
|
51199
51200
|
/*reportErrors*/
|
|
@@ -51813,6 +51814,9 @@ function createTypeChecker(host) {
|
|
|
51813
51814
|
var inferenceContextNodes = [];
|
|
51814
51815
|
var inferenceContexts = [];
|
|
51815
51816
|
var inferenceContextCount = 0;
|
|
51817
|
+
var activeTypeMappers = [];
|
|
51818
|
+
var activeTypeMappersCaches = [];
|
|
51819
|
+
var activeTypeMappersCount = 0;
|
|
51816
51820
|
var emptyStringType = getStringLiteralType("");
|
|
51817
51821
|
var zeroType = getNumberLiteralType(0);
|
|
51818
51822
|
var zeroBigIntType = getBigIntLiteralType({ negative: false, base10Value: "0" });
|
|
@@ -67892,10 +67896,25 @@ function createTypeChecker(host) {
|
|
|
67892
67896
|
error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
67893
67897
|
return errorType;
|
|
67894
67898
|
}
|
|
67899
|
+
const index = findActiveMapper(mapper);
|
|
67900
|
+
if (index === -1) {
|
|
67901
|
+
pushActiveMapper(mapper);
|
|
67902
|
+
}
|
|
67903
|
+
const key = type.id + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
67904
|
+
const mapperCache = activeTypeMappersCaches[index !== -1 ? index : activeTypeMappersCount - 1];
|
|
67905
|
+
const cached = mapperCache.get(key);
|
|
67906
|
+
if (cached) {
|
|
67907
|
+
return cached;
|
|
67908
|
+
}
|
|
67895
67909
|
totalInstantiationCount++;
|
|
67896
67910
|
instantiationCount++;
|
|
67897
67911
|
instantiationDepth++;
|
|
67898
67912
|
const result = instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments);
|
|
67913
|
+
if (index === -1) {
|
|
67914
|
+
popActiveMapper();
|
|
67915
|
+
} else {
|
|
67916
|
+
mapperCache.set(key, result);
|
|
67917
|
+
}
|
|
67899
67918
|
instantiationDepth--;
|
|
67900
67919
|
return result;
|
|
67901
67920
|
}
|
|
@@ -70213,6 +70232,36 @@ function createTypeChecker(host) {
|
|
|
70213
70232
|
}
|
|
70214
70233
|
}
|
|
70215
70234
|
}
|
|
70235
|
+
if (sourceFlags & 134217728 /* TemplateLiteral */) {
|
|
70236
|
+
if (arrayIsEqualTo(source2.texts, target2.texts)) {
|
|
70237
|
+
const sourceTypes = source2.types;
|
|
70238
|
+
const targetTypes = target2.types;
|
|
70239
|
+
result2 = -1 /* True */;
|
|
70240
|
+
for (let i = 0; i < sourceTypes.length; i++) {
|
|
70241
|
+
if (!(result2 &= isRelatedTo(
|
|
70242
|
+
sourceTypes[i],
|
|
70243
|
+
targetTypes[i],
|
|
70244
|
+
3 /* Both */,
|
|
70245
|
+
/*reportErrors*/
|
|
70246
|
+
false
|
|
70247
|
+
))) {
|
|
70248
|
+
break;
|
|
70249
|
+
}
|
|
70250
|
+
}
|
|
70251
|
+
return result2;
|
|
70252
|
+
}
|
|
70253
|
+
}
|
|
70254
|
+
if (sourceFlags & 268435456 /* StringMapping */) {
|
|
70255
|
+
if (source2.symbol === target2.symbol) {
|
|
70256
|
+
return isRelatedTo(
|
|
70257
|
+
source2.type,
|
|
70258
|
+
target2.type,
|
|
70259
|
+
3 /* Both */,
|
|
70260
|
+
/*reportErrors*/
|
|
70261
|
+
false
|
|
70262
|
+
);
|
|
70263
|
+
}
|
|
70264
|
+
}
|
|
70216
70265
|
if (!(sourceFlags & 524288 /* Object */)) {
|
|
70217
70266
|
return 0 /* False */;
|
|
70218
70267
|
}
|
|
@@ -73442,6 +73491,7 @@ function createTypeChecker(host) {
|
|
|
73442
73491
|
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
73443
73492
|
}
|
|
73444
73493
|
}
|
|
73494
|
+
clearActiveMapperCaches();
|
|
73445
73495
|
}
|
|
73446
73496
|
return inference.inferredType;
|
|
73447
73497
|
}
|
|
@@ -75455,31 +75505,15 @@ function createTypeChecker(host) {
|
|
|
75455
75505
|
}
|
|
75456
75506
|
const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
|
|
75457
75507
|
const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;
|
|
75458
|
-
|
|
75459
|
-
|
|
75460
|
-
|
|
75461
|
-
|
|
75462
|
-
|
|
75463
|
-
|
|
75464
|
-
|
|
75465
|
-
|
|
75466
|
-
|
|
75467
|
-
}
|
|
75468
|
-
const directlyRelated = checkDerived ? isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType;
|
|
75469
|
-
if (!(directlyRelated.flags & 131072 /* Never */)) {
|
|
75470
|
-
matchedCandidates = appendIfUnique(matchedCandidates, c);
|
|
75471
|
-
}
|
|
75472
|
-
return directlyRelated;
|
|
75473
|
-
}
|
|
75474
|
-
));
|
|
75475
|
-
if (matchedCandidates.length !== countTypes(candidate)) {
|
|
75476
|
-
narrowedType = getUnionType([
|
|
75477
|
-
narrowedType,
|
|
75478
|
-
mapType(candidate, (c) => {
|
|
75479
|
-
return !containsType(matchedCandidates, c) ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : neverType;
|
|
75480
|
-
})
|
|
75481
|
-
]);
|
|
75482
|
-
}
|
|
75508
|
+
const narrowedType = mapType(candidate, (c) => {
|
|
75509
|
+
const discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName);
|
|
75510
|
+
const matching = discriminant && getConstituentTypeForKeyType(type, discriminant);
|
|
75511
|
+
const directlyRelated = mapType(
|
|
75512
|
+
matching || type,
|
|
75513
|
+
checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType
|
|
75514
|
+
);
|
|
75515
|
+
return directlyRelated.flags & 131072 /* Never */ ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : directlyRelated;
|
|
75516
|
+
});
|
|
75483
75517
|
return !(narrowedType.flags & 131072 /* Never */) ? narrowedType : isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, type) ? candidate : getIntersectionType([type, candidate]);
|
|
75484
75518
|
}
|
|
75485
75519
|
function narrowTypeByCallExpression(type, callExpression, assumeTrue) {
|
|
@@ -76197,8 +76231,12 @@ function createTypeChecker(host) {
|
|
|
76197
76231
|
function checkIdentifierCalculateNodeCheckFlags(node, symbol) {
|
|
76198
76232
|
if (isThisInTypeQuery(node)) return;
|
|
76199
76233
|
if (symbol === argumentsSymbol) {
|
|
76200
|
-
if (isInPropertyInitializerOrClassStaticBlock(
|
|
76201
|
-
|
|
76234
|
+
if (isInPropertyInitializerOrClassStaticBlock(
|
|
76235
|
+
node,
|
|
76236
|
+
/*ignoreArrowFunctions*/
|
|
76237
|
+
true
|
|
76238
|
+
)) {
|
|
76239
|
+
error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks);
|
|
76202
76240
|
return;
|
|
76203
76241
|
}
|
|
76204
76242
|
let container = getContainingFunction(node);
|
|
@@ -77719,6 +77757,27 @@ function createTypeChecker(host) {
|
|
|
77719
77757
|
}
|
|
77720
77758
|
}
|
|
77721
77759
|
}
|
|
77760
|
+
function pushActiveMapper(mapper) {
|
|
77761
|
+
activeTypeMappers[activeTypeMappersCount] = mapper;
|
|
77762
|
+
activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map();
|
|
77763
|
+
activeTypeMappersCount++;
|
|
77764
|
+
}
|
|
77765
|
+
function popActiveMapper() {
|
|
77766
|
+
activeTypeMappersCount--;
|
|
77767
|
+
}
|
|
77768
|
+
function findActiveMapper(mapper) {
|
|
77769
|
+
for (let i = activeTypeMappersCount - 1; i >= 0; i--) {
|
|
77770
|
+
if (mapper === activeTypeMappers[i]) {
|
|
77771
|
+
return i;
|
|
77772
|
+
}
|
|
77773
|
+
}
|
|
77774
|
+
return -1;
|
|
77775
|
+
}
|
|
77776
|
+
function clearActiveMapperCaches() {
|
|
77777
|
+
for (let i = activeTypeMappersCount - 1; i >= 0; i--) {
|
|
77778
|
+
activeTypeMappersCaches[i].clear();
|
|
77779
|
+
}
|
|
77780
|
+
}
|
|
77722
77781
|
function getContextualImportAttributeType(node) {
|
|
77723
77782
|
return getTypeOfPropertyOfContextualType(getGlobalImportAttributesType(
|
|
77724
77783
|
/*reportErrors*/
|
|
@@ -79478,31 +79537,21 @@ function createTypeChecker(host) {
|
|
|
79478
79537
|
addRelatedInfo(diagnosticMessage, createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName));
|
|
79479
79538
|
}
|
|
79480
79539
|
}
|
|
79481
|
-
function isInPropertyInitializerOrClassStaticBlock(node) {
|
|
79540
|
+
function isInPropertyInitializerOrClassStaticBlock(node, ignoreArrowFunctions) {
|
|
79482
79541
|
return !!findAncestor(node, (node2) => {
|
|
79483
79542
|
switch (node2.kind) {
|
|
79484
79543
|
case 172 /* PropertyDeclaration */:
|
|
79544
|
+
case 175 /* ClassStaticBlockDeclaration */:
|
|
79485
79545
|
return true;
|
|
79486
|
-
case
|
|
79487
|
-
case
|
|
79488
|
-
|
|
79489
|
-
case 178 /* SetAccessor */:
|
|
79490
|
-
case 305 /* SpreadAssignment */:
|
|
79491
|
-
case 167 /* ComputedPropertyName */:
|
|
79492
|
-
case 239 /* TemplateSpan */:
|
|
79493
|
-
case 294 /* JsxExpression */:
|
|
79494
|
-
case 291 /* JsxAttribute */:
|
|
79495
|
-
case 292 /* JsxAttributes */:
|
|
79496
|
-
case 293 /* JsxSpreadAttribute */:
|
|
79497
|
-
case 286 /* JsxOpeningElement */:
|
|
79498
|
-
case 233 /* ExpressionWithTypeArguments */:
|
|
79499
|
-
case 298 /* HeritageClause */:
|
|
79500
|
-
return false;
|
|
79546
|
+
case 186 /* TypeQuery */:
|
|
79547
|
+
case 287 /* JsxClosingElement */:
|
|
79548
|
+
return "quit";
|
|
79501
79549
|
case 219 /* ArrowFunction */:
|
|
79502
|
-
|
|
79503
|
-
|
|
79550
|
+
return ignoreArrowFunctions ? false : "quit";
|
|
79551
|
+
case 241 /* Block */:
|
|
79552
|
+
return isFunctionLikeDeclaration(node2.parent) && node2.parent.kind !== 219 /* ArrowFunction */ ? "quit" : false;
|
|
79504
79553
|
default:
|
|
79505
|
-
return
|
|
79554
|
+
return false;
|
|
79506
79555
|
}
|
|
79507
79556
|
});
|
|
79508
79557
|
}
|
|
@@ -172772,7 +172821,7 @@ var Core;
|
|
|
172772
172821
|
/*useLocalSymbolForExportSpecifier*/
|
|
172773
172822
|
!isForRenameWithPrefixAndSuffixText(options)
|
|
172774
172823
|
) || originalSymbol;
|
|
172775
|
-
const searchMeaning = node ? getIntersectingMeaningFromDeclarations(node, symbol) : 7 /* All */;
|
|
172824
|
+
const searchMeaning = node && options.use !== 2 /* Rename */ ? getIntersectingMeaningFromDeclarations(node, symbol) : 7 /* All */;
|
|
172776
172825
|
const result = [];
|
|
172777
172826
|
const state = new State(sourceFiles, sourceFilesSet, node ? getSpecialSearchKind(node) : 0 /* None */, checker, cancellationToken, searchMeaning, options, result);
|
|
172778
172827
|
const exportSpecifier = !isForRenameWithPrefixAndSuffixText(options) || !symbol.declarations ? void 0 : find(symbol.declarations, isExportSpecifier);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.9.0-pr-
|
|
5
|
+
"version": "5.9.0-pr-61505-58",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|