@typescript-deploys/pr-build 5.4.0-pr-56939-8 → 5.4.0-pr-56911-7
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 +27 -23
- package/lib/tsserver.js +30 -25
- package/lib/typescript.js +30 -25
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
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.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240104`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -44254,6 +44254,19 @@ function createTypeChecker(host) {
|
|
|
44254
44254
|
emptyArray
|
|
44255
44255
|
);
|
|
44256
44256
|
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
44257
|
+
var keyofConstraintObjectType = createAnonymousType(
|
|
44258
|
+
/*symbol*/
|
|
44259
|
+
void 0,
|
|
44260
|
+
emptySymbols,
|
|
44261
|
+
emptyArray,
|
|
44262
|
+
emptyArray,
|
|
44263
|
+
[stringType, numberType, esSymbolType].map((t) => createIndexInfo(
|
|
44264
|
+
t,
|
|
44265
|
+
unknownType,
|
|
44266
|
+
/*isReadonly*/
|
|
44267
|
+
false
|
|
44268
|
+
))
|
|
44269
|
+
);
|
|
44257
44270
|
var emptyGenericType = createAnonymousType(
|
|
44258
44271
|
/*symbol*/
|
|
44259
44272
|
void 0,
|
|
@@ -54530,17 +54543,13 @@ function createTypeChecker(host) {
|
|
|
54530
54543
|
function replaceIndexedAccess(instantiable, type, replacement) {
|
|
54531
54544
|
return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
|
|
54532
54545
|
}
|
|
54533
|
-
function
|
|
54546
|
+
function getReverseMappedTypeMembersLimitingConstraint(type) {
|
|
54534
54547
|
const constraint = getConstraintTypeFromMappedType(type.mappedType);
|
|
54535
|
-
if (
|
|
54536
|
-
return;
|
|
54537
|
-
}
|
|
54538
|
-
const origin = constraint.flags & 1048576 /* Union */ ? constraint.origin : constraint;
|
|
54539
|
-
if (!origin || !(origin.flags & 2097152 /* Intersection */)) {
|
|
54548
|
+
if (constraint === type.constraintType) {
|
|
54540
54549
|
return;
|
|
54541
54550
|
}
|
|
54542
|
-
const
|
|
54543
|
-
return
|
|
54551
|
+
const mapper = appendTypeMapping(type.mappedType.mapper, type.constraintType.type, keyofConstraintObjectType);
|
|
54552
|
+
return getBaseConstraintOrType(instantiateType(constraint, mapper));
|
|
54544
54553
|
}
|
|
54545
54554
|
function resolveReverseMappedTypeMembers(type) {
|
|
54546
54555
|
const indexInfo = getIndexInfoOfType(type.source, stringType);
|
|
@@ -54549,11 +54558,11 @@ function createTypeChecker(host) {
|
|
|
54549
54558
|
const optionalMask = modifiers & 4 /* IncludeOptional */ ? 0 : 16777216 /* Optional */;
|
|
54550
54559
|
const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly)] : emptyArray;
|
|
54551
54560
|
const members = createSymbolTable();
|
|
54552
|
-
const
|
|
54561
|
+
const membersLimitingConstraint = getReverseMappedTypeMembersLimitingConstraint(type);
|
|
54553
54562
|
for (const prop of getPropertiesOfType(type.source)) {
|
|
54554
|
-
if (
|
|
54563
|
+
if (membersLimitingConstraint) {
|
|
54555
54564
|
const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
|
|
54556
|
-
if (!isTypeAssignableTo(propertyNameType,
|
|
54565
|
+
if (!isTypeAssignableTo(propertyNameType, membersLimitingConstraint)) {
|
|
54557
54566
|
continue;
|
|
54558
54567
|
}
|
|
54559
54568
|
}
|
|
@@ -64831,7 +64840,7 @@ function createTypeChecker(host) {
|
|
|
64831
64840
|
}
|
|
64832
64841
|
}
|
|
64833
64842
|
function inferToMappedType(source, target, constraintType) {
|
|
64834
|
-
if (constraintType.flags &
|
|
64843
|
+
if (constraintType.flags & 3145728 /* UnionOrIntersection */) {
|
|
64835
64844
|
let result = false;
|
|
64836
64845
|
for (const type of constraintType.types) {
|
|
64837
64846
|
result = inferToMappedType(source, target, type) || result;
|
|
@@ -75732,7 +75741,7 @@ function createTypeChecker(host) {
|
|
|
75732
75741
|
const context = getInferenceContext(node);
|
|
75733
75742
|
const returnType = context.signature && getReturnTypeOfSignature(context.signature);
|
|
75734
75743
|
const returnSignature = returnType && getSingleCallOrConstructSignature(returnType);
|
|
75735
|
-
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences,
|
|
75744
|
+
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
75736
75745
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
75737
75746
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
75738
75747
|
const inferences = map(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
@@ -75751,8 +75760,8 @@ function createTypeChecker(host) {
|
|
|
75751
75760
|
applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
75752
75761
|
inferTypes(inferences, source, target);
|
|
75753
75762
|
});
|
|
75754
|
-
|
|
75755
|
-
|
|
75763
|
+
if (!hasOverlappingInferences(context.inferences, inferences)) {
|
|
75764
|
+
mergeInferences(context.inferences, inferences);
|
|
75756
75765
|
context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);
|
|
75757
75766
|
return getOrCreateTypeFromSignature(instantiatedSignature);
|
|
75758
75767
|
}
|
|
@@ -75785,17 +75794,12 @@ function createTypeChecker(host) {
|
|
|
75785
75794
|
}
|
|
75786
75795
|
return false;
|
|
75787
75796
|
}
|
|
75788
|
-
function
|
|
75789
|
-
let merged = false;
|
|
75790
|
-
const areOverlapping = hasOverlappingInferences(target, source);
|
|
75797
|
+
function mergeInferences(target, source) {
|
|
75791
75798
|
for (let i = 0; i < target.length; i++) {
|
|
75792
|
-
if (
|
|
75799
|
+
if (!hasInferenceCandidates(target[i]) && hasInferenceCandidates(source[i])) {
|
|
75793
75800
|
target[i] = source[i];
|
|
75794
|
-
target[i].priority = 0 /* None */;
|
|
75795
|
-
merged = true;
|
|
75796
75801
|
}
|
|
75797
75802
|
}
|
|
75798
|
-
return merged;
|
|
75799
75803
|
}
|
|
75800
75804
|
function getUniqueTypeParameters(context, typeParameters) {
|
|
75801
75805
|
const result = [];
|
package/lib/tsserver.js
CHANGED
|
@@ -2341,7 +2341,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2341
2341
|
|
|
2342
2342
|
// src/compiler/corePublic.ts
|
|
2343
2343
|
var versionMajorMinor = "5.4";
|
|
2344
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2344
|
+
var version = `${versionMajorMinor}.0-insiders.20240104`;
|
|
2345
2345
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2346
2346
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2347
2347
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -48982,6 +48982,19 @@ function createTypeChecker(host) {
|
|
|
48982
48982
|
emptyArray
|
|
48983
48983
|
);
|
|
48984
48984
|
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
48985
|
+
var keyofConstraintObjectType = createAnonymousType(
|
|
48986
|
+
/*symbol*/
|
|
48987
|
+
void 0,
|
|
48988
|
+
emptySymbols,
|
|
48989
|
+
emptyArray,
|
|
48990
|
+
emptyArray,
|
|
48991
|
+
[stringType, numberType, esSymbolType].map((t) => createIndexInfo(
|
|
48992
|
+
t,
|
|
48993
|
+
unknownType,
|
|
48994
|
+
/*isReadonly*/
|
|
48995
|
+
false
|
|
48996
|
+
))
|
|
48997
|
+
);
|
|
48985
48998
|
var emptyGenericType = createAnonymousType(
|
|
48986
48999
|
/*symbol*/
|
|
48987
49000
|
void 0,
|
|
@@ -59258,17 +59271,13 @@ function createTypeChecker(host) {
|
|
|
59258
59271
|
function replaceIndexedAccess(instantiable, type, replacement) {
|
|
59259
59272
|
return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
|
|
59260
59273
|
}
|
|
59261
|
-
function
|
|
59274
|
+
function getReverseMappedTypeMembersLimitingConstraint(type) {
|
|
59262
59275
|
const constraint = getConstraintTypeFromMappedType(type.mappedType);
|
|
59263
|
-
if (
|
|
59264
|
-
return;
|
|
59265
|
-
}
|
|
59266
|
-
const origin = constraint.flags & 1048576 /* Union */ ? constraint.origin : constraint;
|
|
59267
|
-
if (!origin || !(origin.flags & 2097152 /* Intersection */)) {
|
|
59276
|
+
if (constraint === type.constraintType) {
|
|
59268
59277
|
return;
|
|
59269
59278
|
}
|
|
59270
|
-
const
|
|
59271
|
-
return
|
|
59279
|
+
const mapper = appendTypeMapping(type.mappedType.mapper, type.constraintType.type, keyofConstraintObjectType);
|
|
59280
|
+
return getBaseConstraintOrType(instantiateType(constraint, mapper));
|
|
59272
59281
|
}
|
|
59273
59282
|
function resolveReverseMappedTypeMembers(type) {
|
|
59274
59283
|
const indexInfo = getIndexInfoOfType(type.source, stringType);
|
|
@@ -59277,11 +59286,11 @@ function createTypeChecker(host) {
|
|
|
59277
59286
|
const optionalMask = modifiers & 4 /* IncludeOptional */ ? 0 : 16777216 /* Optional */;
|
|
59278
59287
|
const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly)] : emptyArray;
|
|
59279
59288
|
const members = createSymbolTable();
|
|
59280
|
-
const
|
|
59289
|
+
const membersLimitingConstraint = getReverseMappedTypeMembersLimitingConstraint(type);
|
|
59281
59290
|
for (const prop of getPropertiesOfType(type.source)) {
|
|
59282
|
-
if (
|
|
59291
|
+
if (membersLimitingConstraint) {
|
|
59283
59292
|
const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
|
|
59284
|
-
if (!isTypeAssignableTo(propertyNameType,
|
|
59293
|
+
if (!isTypeAssignableTo(propertyNameType, membersLimitingConstraint)) {
|
|
59285
59294
|
continue;
|
|
59286
59295
|
}
|
|
59287
59296
|
}
|
|
@@ -69559,7 +69568,7 @@ function createTypeChecker(host) {
|
|
|
69559
69568
|
}
|
|
69560
69569
|
}
|
|
69561
69570
|
function inferToMappedType(source, target, constraintType) {
|
|
69562
|
-
if (constraintType.flags &
|
|
69571
|
+
if (constraintType.flags & 3145728 /* UnionOrIntersection */) {
|
|
69563
69572
|
let result = false;
|
|
69564
69573
|
for (const type of constraintType.types) {
|
|
69565
69574
|
result = inferToMappedType(source, target, type) || result;
|
|
@@ -80460,7 +80469,7 @@ function createTypeChecker(host) {
|
|
|
80460
80469
|
const context = getInferenceContext(node);
|
|
80461
80470
|
const returnType = context.signature && getReturnTypeOfSignature(context.signature);
|
|
80462
80471
|
const returnSignature = returnType && getSingleCallOrConstructSignature(returnType);
|
|
80463
|
-
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences,
|
|
80472
|
+
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
80464
80473
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
80465
80474
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
80466
80475
|
const inferences = map(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
@@ -80479,8 +80488,8 @@ function createTypeChecker(host) {
|
|
|
80479
80488
|
applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
80480
80489
|
inferTypes(inferences, source, target);
|
|
80481
80490
|
});
|
|
80482
|
-
|
|
80483
|
-
|
|
80491
|
+
if (!hasOverlappingInferences(context.inferences, inferences)) {
|
|
80492
|
+
mergeInferences(context.inferences, inferences);
|
|
80484
80493
|
context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);
|
|
80485
80494
|
return getOrCreateTypeFromSignature(instantiatedSignature);
|
|
80486
80495
|
}
|
|
@@ -80513,17 +80522,12 @@ function createTypeChecker(host) {
|
|
|
80513
80522
|
}
|
|
80514
80523
|
return false;
|
|
80515
80524
|
}
|
|
80516
|
-
function
|
|
80517
|
-
let merged = false;
|
|
80518
|
-
const areOverlapping = hasOverlappingInferences(target, source);
|
|
80525
|
+
function mergeInferences(target, source) {
|
|
80519
80526
|
for (let i = 0; i < target.length; i++) {
|
|
80520
|
-
if (
|
|
80527
|
+
if (!hasInferenceCandidates(target[i]) && hasInferenceCandidates(source[i])) {
|
|
80521
80528
|
target[i] = source[i];
|
|
80522
|
-
target[i].priority = 0 /* None */;
|
|
80523
|
-
merged = true;
|
|
80524
80529
|
}
|
|
80525
80530
|
}
|
|
80526
|
-
return merged;
|
|
80527
80531
|
}
|
|
80528
80532
|
function getUniqueTypeParameters(context, typeParameters) {
|
|
80529
80533
|
const result = [];
|
|
@@ -147133,13 +147137,14 @@ function getPropertySymbolsFromContextualType(node, checker, contextualType, uni
|
|
|
147133
147137
|
const symbol = contextualType.getProperty(name);
|
|
147134
147138
|
return symbol ? [symbol] : emptyArray;
|
|
147135
147139
|
}
|
|
147136
|
-
const
|
|
147140
|
+
const filteredTypes = isObjectLiteralExpression(node.parent) || isJsxAttributes(node.parent) ? filter(contextualType.types, (t) => !checker.isTypeInvalidDueToUnionDiscriminant(t, node.parent)) : contextualType.types;
|
|
147141
|
+
const discriminatedPropertySymbols = mapDefined(filteredTypes, (t) => t.getProperty(name));
|
|
147137
147142
|
if (unionSymbolOk && (discriminatedPropertySymbols.length === 0 || discriminatedPropertySymbols.length === contextualType.types.length)) {
|
|
147138
147143
|
const symbol = contextualType.getProperty(name);
|
|
147139
147144
|
if (symbol)
|
|
147140
147145
|
return [symbol];
|
|
147141
147146
|
}
|
|
147142
|
-
if (
|
|
147147
|
+
if (!filteredTypes.length && !discriminatedPropertySymbols.length) {
|
|
147143
147148
|
return mapDefined(contextualType.types, (t) => t.getProperty(name));
|
|
147144
147149
|
}
|
|
147145
147150
|
return deduplicate(discriminatedPropertySymbols, equateValues);
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20240104`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -46736,6 +46736,19 @@ ${lanes.join("\n")}
|
|
|
46736
46736
|
emptyArray
|
|
46737
46737
|
);
|
|
46738
46738
|
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
46739
|
+
var keyofConstraintObjectType = createAnonymousType(
|
|
46740
|
+
/*symbol*/
|
|
46741
|
+
void 0,
|
|
46742
|
+
emptySymbols,
|
|
46743
|
+
emptyArray,
|
|
46744
|
+
emptyArray,
|
|
46745
|
+
[stringType, numberType, esSymbolType].map((t) => createIndexInfo(
|
|
46746
|
+
t,
|
|
46747
|
+
unknownType,
|
|
46748
|
+
/*isReadonly*/
|
|
46749
|
+
false
|
|
46750
|
+
))
|
|
46751
|
+
);
|
|
46739
46752
|
var emptyGenericType = createAnonymousType(
|
|
46740
46753
|
/*symbol*/
|
|
46741
46754
|
void 0,
|
|
@@ -57012,17 +57025,13 @@ ${lanes.join("\n")}
|
|
|
57012
57025
|
function replaceIndexedAccess(instantiable, type, replacement) {
|
|
57013
57026
|
return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
|
|
57014
57027
|
}
|
|
57015
|
-
function
|
|
57028
|
+
function getReverseMappedTypeMembersLimitingConstraint(type) {
|
|
57016
57029
|
const constraint = getConstraintTypeFromMappedType(type.mappedType);
|
|
57017
|
-
if (
|
|
57018
|
-
return;
|
|
57019
|
-
}
|
|
57020
|
-
const origin = constraint.flags & 1048576 /* Union */ ? constraint.origin : constraint;
|
|
57021
|
-
if (!origin || !(origin.flags & 2097152 /* Intersection */)) {
|
|
57030
|
+
if (constraint === type.constraintType) {
|
|
57022
57031
|
return;
|
|
57023
57032
|
}
|
|
57024
|
-
const
|
|
57025
|
-
return
|
|
57033
|
+
const mapper = appendTypeMapping(type.mappedType.mapper, type.constraintType.type, keyofConstraintObjectType);
|
|
57034
|
+
return getBaseConstraintOrType(instantiateType(constraint, mapper));
|
|
57026
57035
|
}
|
|
57027
57036
|
function resolveReverseMappedTypeMembers(type) {
|
|
57028
57037
|
const indexInfo = getIndexInfoOfType(type.source, stringType);
|
|
@@ -57031,11 +57040,11 @@ ${lanes.join("\n")}
|
|
|
57031
57040
|
const optionalMask = modifiers & 4 /* IncludeOptional */ ? 0 : 16777216 /* Optional */;
|
|
57032
57041
|
const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly)] : emptyArray;
|
|
57033
57042
|
const members = createSymbolTable();
|
|
57034
|
-
const
|
|
57043
|
+
const membersLimitingConstraint = getReverseMappedTypeMembersLimitingConstraint(type);
|
|
57035
57044
|
for (const prop of getPropertiesOfType(type.source)) {
|
|
57036
|
-
if (
|
|
57045
|
+
if (membersLimitingConstraint) {
|
|
57037
57046
|
const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
|
|
57038
|
-
if (!isTypeAssignableTo(propertyNameType,
|
|
57047
|
+
if (!isTypeAssignableTo(propertyNameType, membersLimitingConstraint)) {
|
|
57039
57048
|
continue;
|
|
57040
57049
|
}
|
|
57041
57050
|
}
|
|
@@ -67313,7 +67322,7 @@ ${lanes.join("\n")}
|
|
|
67313
67322
|
}
|
|
67314
67323
|
}
|
|
67315
67324
|
function inferToMappedType(source, target, constraintType) {
|
|
67316
|
-
if (constraintType.flags &
|
|
67325
|
+
if (constraintType.flags & 3145728 /* UnionOrIntersection */) {
|
|
67317
67326
|
let result = false;
|
|
67318
67327
|
for (const type of constraintType.types) {
|
|
67319
67328
|
result = inferToMappedType(source, target, type) || result;
|
|
@@ -78214,7 +78223,7 @@ ${lanes.join("\n")}
|
|
|
78214
78223
|
const context = getInferenceContext(node);
|
|
78215
78224
|
const returnType = context.signature && getReturnTypeOfSignature(context.signature);
|
|
78216
78225
|
const returnSignature = returnType && getSingleCallOrConstructSignature(returnType);
|
|
78217
|
-
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences,
|
|
78226
|
+
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
78218
78227
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
78219
78228
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
78220
78229
|
const inferences = map(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
@@ -78233,8 +78242,8 @@ ${lanes.join("\n")}
|
|
|
78233
78242
|
applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
78234
78243
|
inferTypes(inferences, source, target);
|
|
78235
78244
|
});
|
|
78236
|
-
|
|
78237
|
-
|
|
78245
|
+
if (!hasOverlappingInferences(context.inferences, inferences)) {
|
|
78246
|
+
mergeInferences(context.inferences, inferences);
|
|
78238
78247
|
context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);
|
|
78239
78248
|
return getOrCreateTypeFromSignature(instantiatedSignature);
|
|
78240
78249
|
}
|
|
@@ -78267,17 +78276,12 @@ ${lanes.join("\n")}
|
|
|
78267
78276
|
}
|
|
78268
78277
|
return false;
|
|
78269
78278
|
}
|
|
78270
|
-
function
|
|
78271
|
-
let merged = false;
|
|
78272
|
-
const areOverlapping = hasOverlappingInferences(target, source);
|
|
78279
|
+
function mergeInferences(target, source) {
|
|
78273
78280
|
for (let i = 0; i < target.length; i++) {
|
|
78274
|
-
if (
|
|
78281
|
+
if (!hasInferenceCandidates(target[i]) && hasInferenceCandidates(source[i])) {
|
|
78275
78282
|
target[i] = source[i];
|
|
78276
|
-
target[i].priority = 0 /* None */;
|
|
78277
|
-
merged = true;
|
|
78278
78283
|
}
|
|
78279
78284
|
}
|
|
78280
|
-
return merged;
|
|
78281
78285
|
}
|
|
78282
78286
|
function getUniqueTypeParameters(context, typeParameters) {
|
|
78283
78287
|
const result = [];
|
|
@@ -145063,13 +145067,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
145063
145067
|
const symbol = contextualType.getProperty(name);
|
|
145064
145068
|
return symbol ? [symbol] : emptyArray;
|
|
145065
145069
|
}
|
|
145066
|
-
const
|
|
145070
|
+
const filteredTypes = isObjectLiteralExpression(node.parent) || isJsxAttributes(node.parent) ? filter(contextualType.types, (t) => !checker.isTypeInvalidDueToUnionDiscriminant(t, node.parent)) : contextualType.types;
|
|
145071
|
+
const discriminatedPropertySymbols = mapDefined(filteredTypes, (t) => t.getProperty(name));
|
|
145067
145072
|
if (unionSymbolOk && (discriminatedPropertySymbols.length === 0 || discriminatedPropertySymbols.length === contextualType.types.length)) {
|
|
145068
145073
|
const symbol = contextualType.getProperty(name);
|
|
145069
145074
|
if (symbol)
|
|
145070
145075
|
return [symbol];
|
|
145071
145076
|
}
|
|
145072
|
-
if (
|
|
145077
|
+
if (!filteredTypes.length && !discriminatedPropertySymbols.length) {
|
|
145073
145078
|
return mapDefined(contextualType.types, (t) => t.getProperty(name));
|
|
145074
145079
|
}
|
|
145075
145080
|
return deduplicate(discriminatedPropertySymbols, equateValues);
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20240104`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
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.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-56911-7",
|
|
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": "3baf3b4e1804f2f32ace0d49b294bcf08f3ee314"
|
|
118
118
|
}
|