@typescript-deploys/pr-build 5.2.0-pr-52095-19 → 5.2.0-pr-55152-6
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 +40 -65
- package/lib/tsserver.js +40 -65
- package/lib/tsserverlibrary.js +40 -65
- package/lib/typescript.js +40 -65
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -59803,6 +59803,7 @@ function createTypeChecker(host) {
|
|
|
59803
59803
|
let overrideNextErrorInfo = 0;
|
|
59804
59804
|
let lastSkippedInfo;
|
|
59805
59805
|
let incompatibleStack;
|
|
59806
|
+
let skipParentCounter = 0;
|
|
59806
59807
|
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
|
59807
59808
|
const result = isRelatedTo(
|
|
59808
59809
|
source,
|
|
@@ -59978,7 +59979,15 @@ function createTypeChecker(host) {
|
|
|
59978
59979
|
reportIncompatibleStack();
|
|
59979
59980
|
if (message.elidedInCompatabilityPyramid)
|
|
59980
59981
|
return;
|
|
59981
|
-
|
|
59982
|
+
if (skipParentCounter === 0) {
|
|
59983
|
+
errorInfo = chainDiagnosticMessages(errorInfo, message, ...args);
|
|
59984
|
+
} else {
|
|
59985
|
+
skipParentCounter--;
|
|
59986
|
+
}
|
|
59987
|
+
}
|
|
59988
|
+
function reportParentSkippedError(message, ...args) {
|
|
59989
|
+
reportError(message, ...args);
|
|
59990
|
+
skipParentCounter++;
|
|
59982
59991
|
}
|
|
59983
59992
|
function associateRelatedInfo(info) {
|
|
59984
59993
|
Debug.assert(!!errorInfo);
|
|
@@ -60315,14 +60324,14 @@ function createTypeChecker(host) {
|
|
|
60315
60324
|
}
|
|
60316
60325
|
}
|
|
60317
60326
|
if (suggestion !== void 0) {
|
|
60318
|
-
|
|
60327
|
+
reportParentSkippedError(
|
|
60319
60328
|
Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,
|
|
60320
60329
|
symbolToString(prop),
|
|
60321
60330
|
typeToString(errorTarget),
|
|
60322
60331
|
suggestion
|
|
60323
60332
|
);
|
|
60324
60333
|
} else {
|
|
60325
|
-
|
|
60334
|
+
reportParentSkippedError(
|
|
60326
60335
|
Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,
|
|
60327
60336
|
symbolToString(prop),
|
|
60328
60337
|
typeToString(errorTarget)
|
|
@@ -67253,75 +67262,41 @@ function createTypeChecker(host) {
|
|
|
67253
67262
|
return mapType(
|
|
67254
67263
|
type,
|
|
67255
67264
|
(t) => {
|
|
67256
|
-
|
|
67257
|
-
|
|
67258
|
-
|
|
67259
|
-
|
|
67260
|
-
const
|
|
67261
|
-
|
|
67262
|
-
|
|
67263
|
-
|
|
67264
|
-
|
|
67265
|
-
|
|
67266
|
-
|
|
67267
|
-
|
|
67268
|
-
}
|
|
67269
|
-
const typeOfConcreteProperty = getTypeOfConcretePropertyOfContextualType(t2);
|
|
67270
|
-
if (typeOfConcreteProperty) {
|
|
67271
|
-
concretePropertyTypes = append(concretePropertyTypes, typeOfConcreteProperty);
|
|
67272
|
-
continue;
|
|
67273
|
-
}
|
|
67274
|
-
applicableIndexInfoCandidates = append(applicableIndexInfoCandidates, t2);
|
|
67275
|
-
}
|
|
67276
|
-
if (concretePropertyTypes) {
|
|
67277
|
-
return getIntersectionType(concatenate(concretePropertyTypes, applicableIndexedMappedTypeSubstitions));
|
|
67265
|
+
var _a;
|
|
67266
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
67267
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
67268
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
67269
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
67270
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
67271
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
67272
|
+
}
|
|
67273
|
+
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
67274
|
+
const prop = getPropertyOfType(t, name);
|
|
67275
|
+
if (prop) {
|
|
67276
|
+
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
67278
67277
|
}
|
|
67279
|
-
|
|
67280
|
-
|
|
67281
|
-
|
|
67278
|
+
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
67279
|
+
const restType = getElementTypeOfSliceOfTupleType(
|
|
67280
|
+
t,
|
|
67281
|
+
t.target.fixedLength,
|
|
67282
|
+
/*endSkipCount*/
|
|
67283
|
+
0,
|
|
67284
|
+
/*writing*/
|
|
67285
|
+
false,
|
|
67286
|
+
/*noReductions*/
|
|
67287
|
+
true
|
|
67288
|
+
);
|
|
67289
|
+
if (restType) {
|
|
67290
|
+
return restType;
|
|
67291
|
+
}
|
|
67282
67292
|
}
|
|
67283
|
-
return void 0;
|
|
67293
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
67284
67294
|
}
|
|
67285
|
-
return
|
|
67295
|
+
return void 0;
|
|
67286
67296
|
},
|
|
67287
67297
|
/*noReductions*/
|
|
67288
67298
|
true
|
|
67289
67299
|
);
|
|
67290
|
-
function getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t) {
|
|
67291
|
-
const constraint = getConstraintTypeFromMappedType(t);
|
|
67292
|
-
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
67293
|
-
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
67294
|
-
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
67295
|
-
return substituteIndexedMappedType(t, propertyNameType);
|
|
67296
|
-
}
|
|
67297
|
-
return void 0;
|
|
67298
|
-
}
|
|
67299
|
-
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
67300
|
-
const prop = getPropertyOfType(t, name);
|
|
67301
|
-
if (prop) {
|
|
67302
|
-
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
67303
|
-
}
|
|
67304
|
-
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
67305
|
-
const restType = getElementTypeOfSliceOfTupleType(
|
|
67306
|
-
t,
|
|
67307
|
-
t.target.fixedLength,
|
|
67308
|
-
/*endSkipCount*/
|
|
67309
|
-
0,
|
|
67310
|
-
/*writing*/
|
|
67311
|
-
false,
|
|
67312
|
-
/*noReductions*/
|
|
67313
|
-
true
|
|
67314
|
-
);
|
|
67315
|
-
if (restType) {
|
|
67316
|
-
return restType;
|
|
67317
|
-
}
|
|
67318
|
-
}
|
|
67319
|
-
return void 0;
|
|
67320
|
-
}
|
|
67321
|
-
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
67322
|
-
var _a;
|
|
67323
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
67324
|
-
}
|
|
67325
67300
|
}
|
|
67326
67301
|
function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
|
|
67327
67302
|
Debug.assert(isObjectLiteralMethod(node));
|
package/lib/tsserver.js
CHANGED
|
@@ -64512,6 +64512,7 @@ function createTypeChecker(host) {
|
|
|
64512
64512
|
let overrideNextErrorInfo = 0;
|
|
64513
64513
|
let lastSkippedInfo;
|
|
64514
64514
|
let incompatibleStack;
|
|
64515
|
+
let skipParentCounter = 0;
|
|
64515
64516
|
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
|
64516
64517
|
const result = isRelatedTo(
|
|
64517
64518
|
source,
|
|
@@ -64687,7 +64688,15 @@ function createTypeChecker(host) {
|
|
|
64687
64688
|
reportIncompatibleStack();
|
|
64688
64689
|
if (message.elidedInCompatabilityPyramid)
|
|
64689
64690
|
return;
|
|
64690
|
-
|
|
64691
|
+
if (skipParentCounter === 0) {
|
|
64692
|
+
errorInfo = chainDiagnosticMessages(errorInfo, message, ...args);
|
|
64693
|
+
} else {
|
|
64694
|
+
skipParentCounter--;
|
|
64695
|
+
}
|
|
64696
|
+
}
|
|
64697
|
+
function reportParentSkippedError(message, ...args) {
|
|
64698
|
+
reportError(message, ...args);
|
|
64699
|
+
skipParentCounter++;
|
|
64691
64700
|
}
|
|
64692
64701
|
function associateRelatedInfo(info) {
|
|
64693
64702
|
Debug.assert(!!errorInfo);
|
|
@@ -65024,14 +65033,14 @@ function createTypeChecker(host) {
|
|
|
65024
65033
|
}
|
|
65025
65034
|
}
|
|
65026
65035
|
if (suggestion !== void 0) {
|
|
65027
|
-
|
|
65036
|
+
reportParentSkippedError(
|
|
65028
65037
|
Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,
|
|
65029
65038
|
symbolToString(prop),
|
|
65030
65039
|
typeToString(errorTarget),
|
|
65031
65040
|
suggestion
|
|
65032
65041
|
);
|
|
65033
65042
|
} else {
|
|
65034
|
-
|
|
65043
|
+
reportParentSkippedError(
|
|
65035
65044
|
Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,
|
|
65036
65045
|
symbolToString(prop),
|
|
65037
65046
|
typeToString(errorTarget)
|
|
@@ -71962,75 +71971,41 @@ function createTypeChecker(host) {
|
|
|
71962
71971
|
return mapType(
|
|
71963
71972
|
type,
|
|
71964
71973
|
(t) => {
|
|
71965
|
-
|
|
71966
|
-
|
|
71967
|
-
|
|
71968
|
-
|
|
71969
|
-
const
|
|
71970
|
-
|
|
71971
|
-
|
|
71972
|
-
|
|
71973
|
-
|
|
71974
|
-
|
|
71975
|
-
|
|
71976
|
-
|
|
71977
|
-
}
|
|
71978
|
-
const typeOfConcreteProperty = getTypeOfConcretePropertyOfContextualType(t2);
|
|
71979
|
-
if (typeOfConcreteProperty) {
|
|
71980
|
-
concretePropertyTypes = append(concretePropertyTypes, typeOfConcreteProperty);
|
|
71981
|
-
continue;
|
|
71982
|
-
}
|
|
71983
|
-
applicableIndexInfoCandidates = append(applicableIndexInfoCandidates, t2);
|
|
71984
|
-
}
|
|
71985
|
-
if (concretePropertyTypes) {
|
|
71986
|
-
return getIntersectionType(concatenate(concretePropertyTypes, applicableIndexedMappedTypeSubstitions));
|
|
71974
|
+
var _a;
|
|
71975
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
71976
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
71977
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
71978
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
71979
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
71980
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
71981
|
+
}
|
|
71982
|
+
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
71983
|
+
const prop = getPropertyOfType(t, name);
|
|
71984
|
+
if (prop) {
|
|
71985
|
+
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
71987
71986
|
}
|
|
71988
|
-
|
|
71989
|
-
|
|
71990
|
-
|
|
71987
|
+
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
71988
|
+
const restType = getElementTypeOfSliceOfTupleType(
|
|
71989
|
+
t,
|
|
71990
|
+
t.target.fixedLength,
|
|
71991
|
+
/*endSkipCount*/
|
|
71992
|
+
0,
|
|
71993
|
+
/*writing*/
|
|
71994
|
+
false,
|
|
71995
|
+
/*noReductions*/
|
|
71996
|
+
true
|
|
71997
|
+
);
|
|
71998
|
+
if (restType) {
|
|
71999
|
+
return restType;
|
|
72000
|
+
}
|
|
71991
72001
|
}
|
|
71992
|
-
return void 0;
|
|
72002
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
71993
72003
|
}
|
|
71994
|
-
return
|
|
72004
|
+
return void 0;
|
|
71995
72005
|
},
|
|
71996
72006
|
/*noReductions*/
|
|
71997
72007
|
true
|
|
71998
72008
|
);
|
|
71999
|
-
function getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t) {
|
|
72000
|
-
const constraint = getConstraintTypeFromMappedType(t);
|
|
72001
|
-
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
72002
|
-
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
72003
|
-
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
72004
|
-
return substituteIndexedMappedType(t, propertyNameType);
|
|
72005
|
-
}
|
|
72006
|
-
return void 0;
|
|
72007
|
-
}
|
|
72008
|
-
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
72009
|
-
const prop = getPropertyOfType(t, name);
|
|
72010
|
-
if (prop) {
|
|
72011
|
-
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
72012
|
-
}
|
|
72013
|
-
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
72014
|
-
const restType = getElementTypeOfSliceOfTupleType(
|
|
72015
|
-
t,
|
|
72016
|
-
t.target.fixedLength,
|
|
72017
|
-
/*endSkipCount*/
|
|
72018
|
-
0,
|
|
72019
|
-
/*writing*/
|
|
72020
|
-
false,
|
|
72021
|
-
/*noReductions*/
|
|
72022
|
-
true
|
|
72023
|
-
);
|
|
72024
|
-
if (restType) {
|
|
72025
|
-
return restType;
|
|
72026
|
-
}
|
|
72027
|
-
}
|
|
72028
|
-
return void 0;
|
|
72029
|
-
}
|
|
72030
|
-
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
72031
|
-
var _a;
|
|
72032
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
72033
|
-
}
|
|
72034
72009
|
}
|
|
72035
72010
|
function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
|
|
72036
72011
|
Debug.assert(isObjectLiteralMethod(node));
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -62277,6 +62277,7 @@ ${lanes.join("\n")}
|
|
|
62277
62277
|
let overrideNextErrorInfo = 0;
|
|
62278
62278
|
let lastSkippedInfo;
|
|
62279
62279
|
let incompatibleStack;
|
|
62280
|
+
let skipParentCounter = 0;
|
|
62280
62281
|
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
|
62281
62282
|
const result = isRelatedTo(
|
|
62282
62283
|
source,
|
|
@@ -62452,7 +62453,15 @@ ${lanes.join("\n")}
|
|
|
62452
62453
|
reportIncompatibleStack();
|
|
62453
62454
|
if (message.elidedInCompatabilityPyramid)
|
|
62454
62455
|
return;
|
|
62455
|
-
|
|
62456
|
+
if (skipParentCounter === 0) {
|
|
62457
|
+
errorInfo = chainDiagnosticMessages(errorInfo, message, ...args);
|
|
62458
|
+
} else {
|
|
62459
|
+
skipParentCounter--;
|
|
62460
|
+
}
|
|
62461
|
+
}
|
|
62462
|
+
function reportParentSkippedError(message, ...args) {
|
|
62463
|
+
reportError(message, ...args);
|
|
62464
|
+
skipParentCounter++;
|
|
62456
62465
|
}
|
|
62457
62466
|
function associateRelatedInfo(info) {
|
|
62458
62467
|
Debug.assert(!!errorInfo);
|
|
@@ -62789,14 +62798,14 @@ ${lanes.join("\n")}
|
|
|
62789
62798
|
}
|
|
62790
62799
|
}
|
|
62791
62800
|
if (suggestion !== void 0) {
|
|
62792
|
-
|
|
62801
|
+
reportParentSkippedError(
|
|
62793
62802
|
Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,
|
|
62794
62803
|
symbolToString(prop),
|
|
62795
62804
|
typeToString(errorTarget),
|
|
62796
62805
|
suggestion
|
|
62797
62806
|
);
|
|
62798
62807
|
} else {
|
|
62799
|
-
|
|
62808
|
+
reportParentSkippedError(
|
|
62800
62809
|
Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,
|
|
62801
62810
|
symbolToString(prop),
|
|
62802
62811
|
typeToString(errorTarget)
|
|
@@ -69727,75 +69736,41 @@ ${lanes.join("\n")}
|
|
|
69727
69736
|
return mapType(
|
|
69728
69737
|
type,
|
|
69729
69738
|
(t) => {
|
|
69730
|
-
|
|
69731
|
-
|
|
69732
|
-
|
|
69733
|
-
|
|
69734
|
-
const
|
|
69735
|
-
|
|
69736
|
-
|
|
69737
|
-
|
|
69738
|
-
|
|
69739
|
-
|
|
69740
|
-
|
|
69741
|
-
|
|
69742
|
-
}
|
|
69743
|
-
const typeOfConcreteProperty = getTypeOfConcretePropertyOfContextualType(t2);
|
|
69744
|
-
if (typeOfConcreteProperty) {
|
|
69745
|
-
concretePropertyTypes = append(concretePropertyTypes, typeOfConcreteProperty);
|
|
69746
|
-
continue;
|
|
69747
|
-
}
|
|
69748
|
-
applicableIndexInfoCandidates = append(applicableIndexInfoCandidates, t2);
|
|
69749
|
-
}
|
|
69750
|
-
if (concretePropertyTypes) {
|
|
69751
|
-
return getIntersectionType(concatenate(concretePropertyTypes, applicableIndexedMappedTypeSubstitions));
|
|
69739
|
+
var _a;
|
|
69740
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
69741
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
69742
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
69743
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
69744
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
69745
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
69746
|
+
}
|
|
69747
|
+
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
69748
|
+
const prop = getPropertyOfType(t, name);
|
|
69749
|
+
if (prop) {
|
|
69750
|
+
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
69752
69751
|
}
|
|
69753
|
-
|
|
69754
|
-
|
|
69755
|
-
|
|
69752
|
+
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
69753
|
+
const restType = getElementTypeOfSliceOfTupleType(
|
|
69754
|
+
t,
|
|
69755
|
+
t.target.fixedLength,
|
|
69756
|
+
/*endSkipCount*/
|
|
69757
|
+
0,
|
|
69758
|
+
/*writing*/
|
|
69759
|
+
false,
|
|
69760
|
+
/*noReductions*/
|
|
69761
|
+
true
|
|
69762
|
+
);
|
|
69763
|
+
if (restType) {
|
|
69764
|
+
return restType;
|
|
69765
|
+
}
|
|
69756
69766
|
}
|
|
69757
|
-
return void 0;
|
|
69767
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
69758
69768
|
}
|
|
69759
|
-
return
|
|
69769
|
+
return void 0;
|
|
69760
69770
|
},
|
|
69761
69771
|
/*noReductions*/
|
|
69762
69772
|
true
|
|
69763
69773
|
);
|
|
69764
|
-
function getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t) {
|
|
69765
|
-
const constraint = getConstraintTypeFromMappedType(t);
|
|
69766
|
-
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
69767
|
-
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
69768
|
-
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
69769
|
-
return substituteIndexedMappedType(t, propertyNameType);
|
|
69770
|
-
}
|
|
69771
|
-
return void 0;
|
|
69772
|
-
}
|
|
69773
|
-
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
69774
|
-
const prop = getPropertyOfType(t, name);
|
|
69775
|
-
if (prop) {
|
|
69776
|
-
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
69777
|
-
}
|
|
69778
|
-
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
69779
|
-
const restType = getElementTypeOfSliceOfTupleType(
|
|
69780
|
-
t,
|
|
69781
|
-
t.target.fixedLength,
|
|
69782
|
-
/*endSkipCount*/
|
|
69783
|
-
0,
|
|
69784
|
-
/*writing*/
|
|
69785
|
-
false,
|
|
69786
|
-
/*noReductions*/
|
|
69787
|
-
true
|
|
69788
|
-
);
|
|
69789
|
-
if (restType) {
|
|
69790
|
-
return restType;
|
|
69791
|
-
}
|
|
69792
|
-
}
|
|
69793
|
-
return void 0;
|
|
69794
|
-
}
|
|
69795
|
-
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
69796
|
-
var _a;
|
|
69797
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
69798
|
-
}
|
|
69799
69774
|
}
|
|
69800
69775
|
function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
|
|
69801
69776
|
Debug.assert(isObjectLiteralMethod(node));
|
package/lib/typescript.js
CHANGED
|
@@ -62277,6 +62277,7 @@ ${lanes.join("\n")}
|
|
|
62277
62277
|
let overrideNextErrorInfo = 0;
|
|
62278
62278
|
let lastSkippedInfo;
|
|
62279
62279
|
let incompatibleStack;
|
|
62280
|
+
let skipParentCounter = 0;
|
|
62280
62281
|
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
|
62281
62282
|
const result = isRelatedTo(
|
|
62282
62283
|
source,
|
|
@@ -62452,7 +62453,15 @@ ${lanes.join("\n")}
|
|
|
62452
62453
|
reportIncompatibleStack();
|
|
62453
62454
|
if (message.elidedInCompatabilityPyramid)
|
|
62454
62455
|
return;
|
|
62455
|
-
|
|
62456
|
+
if (skipParentCounter === 0) {
|
|
62457
|
+
errorInfo = chainDiagnosticMessages(errorInfo, message, ...args);
|
|
62458
|
+
} else {
|
|
62459
|
+
skipParentCounter--;
|
|
62460
|
+
}
|
|
62461
|
+
}
|
|
62462
|
+
function reportParentSkippedError(message, ...args) {
|
|
62463
|
+
reportError(message, ...args);
|
|
62464
|
+
skipParentCounter++;
|
|
62456
62465
|
}
|
|
62457
62466
|
function associateRelatedInfo(info) {
|
|
62458
62467
|
Debug.assert(!!errorInfo);
|
|
@@ -62789,14 +62798,14 @@ ${lanes.join("\n")}
|
|
|
62789
62798
|
}
|
|
62790
62799
|
}
|
|
62791
62800
|
if (suggestion !== void 0) {
|
|
62792
|
-
|
|
62801
|
+
reportParentSkippedError(
|
|
62793
62802
|
Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,
|
|
62794
62803
|
symbolToString(prop),
|
|
62795
62804
|
typeToString(errorTarget),
|
|
62796
62805
|
suggestion
|
|
62797
62806
|
);
|
|
62798
62807
|
} else {
|
|
62799
|
-
|
|
62808
|
+
reportParentSkippedError(
|
|
62800
62809
|
Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,
|
|
62801
62810
|
symbolToString(prop),
|
|
62802
62811
|
typeToString(errorTarget)
|
|
@@ -69727,75 +69736,41 @@ ${lanes.join("\n")}
|
|
|
69727
69736
|
return mapType(
|
|
69728
69737
|
type,
|
|
69729
69738
|
(t) => {
|
|
69730
|
-
|
|
69731
|
-
|
|
69732
|
-
|
|
69733
|
-
|
|
69734
|
-
const
|
|
69735
|
-
|
|
69736
|
-
|
|
69737
|
-
|
|
69738
|
-
|
|
69739
|
-
|
|
69740
|
-
|
|
69741
|
-
|
|
69742
|
-
}
|
|
69743
|
-
const typeOfConcreteProperty = getTypeOfConcretePropertyOfContextualType(t2);
|
|
69744
|
-
if (typeOfConcreteProperty) {
|
|
69745
|
-
concretePropertyTypes = append(concretePropertyTypes, typeOfConcreteProperty);
|
|
69746
|
-
continue;
|
|
69747
|
-
}
|
|
69748
|
-
applicableIndexInfoCandidates = append(applicableIndexInfoCandidates, t2);
|
|
69749
|
-
}
|
|
69750
|
-
if (concretePropertyTypes) {
|
|
69751
|
-
return getIntersectionType(concatenate(concretePropertyTypes, applicableIndexedMappedTypeSubstitions));
|
|
69739
|
+
var _a;
|
|
69740
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
69741
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
69742
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
69743
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
69744
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
69745
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
69746
|
+
}
|
|
69747
|
+
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
69748
|
+
const prop = getPropertyOfType(t, name);
|
|
69749
|
+
if (prop) {
|
|
69750
|
+
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
69752
69751
|
}
|
|
69753
|
-
|
|
69754
|
-
|
|
69755
|
-
|
|
69752
|
+
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
69753
|
+
const restType = getElementTypeOfSliceOfTupleType(
|
|
69754
|
+
t,
|
|
69755
|
+
t.target.fixedLength,
|
|
69756
|
+
/*endSkipCount*/
|
|
69757
|
+
0,
|
|
69758
|
+
/*writing*/
|
|
69759
|
+
false,
|
|
69760
|
+
/*noReductions*/
|
|
69761
|
+
true
|
|
69762
|
+
);
|
|
69763
|
+
if (restType) {
|
|
69764
|
+
return restType;
|
|
69765
|
+
}
|
|
69756
69766
|
}
|
|
69757
|
-
return void 0;
|
|
69767
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
69758
69768
|
}
|
|
69759
|
-
return
|
|
69769
|
+
return void 0;
|
|
69760
69770
|
},
|
|
69761
69771
|
/*noReductions*/
|
|
69762
69772
|
true
|
|
69763
69773
|
);
|
|
69764
|
-
function getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t) {
|
|
69765
|
-
const constraint = getConstraintTypeFromMappedType(t);
|
|
69766
|
-
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
69767
|
-
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
69768
|
-
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
69769
|
-
return substituteIndexedMappedType(t, propertyNameType);
|
|
69770
|
-
}
|
|
69771
|
-
return void 0;
|
|
69772
|
-
}
|
|
69773
|
-
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
69774
|
-
const prop = getPropertyOfType(t, name);
|
|
69775
|
-
if (prop) {
|
|
69776
|
-
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
69777
|
-
}
|
|
69778
|
-
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
69779
|
-
const restType = getElementTypeOfSliceOfTupleType(
|
|
69780
|
-
t,
|
|
69781
|
-
t.target.fixedLength,
|
|
69782
|
-
/*endSkipCount*/
|
|
69783
|
-
0,
|
|
69784
|
-
/*writing*/
|
|
69785
|
-
false,
|
|
69786
|
-
/*noReductions*/
|
|
69787
|
-
true
|
|
69788
|
-
);
|
|
69789
|
-
if (restType) {
|
|
69790
|
-
return restType;
|
|
69791
|
-
}
|
|
69792
|
-
}
|
|
69793
|
-
return void 0;
|
|
69794
|
-
}
|
|
69795
|
-
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
69796
|
-
var _a;
|
|
69797
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
69798
|
-
}
|
|
69799
69774
|
}
|
|
69800
69775
|
function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
|
|
69801
69776
|
Debug.assert(isObjectLiteralMethod(node));
|
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.2.0-pr-
|
|
5
|
+
"version": "5.2.0-pr-55152-6",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "062d58235d643d625d0146f1a13636d8bec5a8a9"
|
|
118
118
|
}
|