typescript 5.5.0-dev.20240502 → 5.5.0-dev.20240504
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 +18 -16
- package/lib/typescript.js +27 -16
- 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.5";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20240504`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -16360,6 +16360,8 @@ function getAllAccessorDeclarations(declarations, accessor) {
|
|
|
16360
16360
|
function getEffectiveTypeAnnotationNode(node) {
|
|
16361
16361
|
if (!isInJSFile(node) && isFunctionDeclaration(node))
|
|
16362
16362
|
return void 0;
|
|
16363
|
+
if (isTypeAliasDeclaration(node))
|
|
16364
|
+
return void 0;
|
|
16363
16365
|
const type = node.type;
|
|
16364
16366
|
if (type || !isInJSFile(node))
|
|
16365
16367
|
return type;
|
|
@@ -56906,7 +56908,7 @@ function createTypeChecker(host) {
|
|
|
56906
56908
|
}
|
|
56907
56909
|
}
|
|
56908
56910
|
return getNormalizedType(
|
|
56909
|
-
getIntersectionType(constraints),
|
|
56911
|
+
getIntersectionType(constraints, 2 /* NoConstraintReduction */),
|
|
56910
56912
|
/*writing*/
|
|
56911
56913
|
false
|
|
56912
56914
|
);
|
|
@@ -59711,7 +59713,7 @@ function createTypeChecker(host) {
|
|
|
59711
59713
|
result.aliasTypeArguments = aliasTypeArguments;
|
|
59712
59714
|
return result;
|
|
59713
59715
|
}
|
|
59714
|
-
function getIntersectionType(types, aliasSymbol, aliasTypeArguments
|
|
59716
|
+
function getIntersectionType(types, flags = 0 /* None */, aliasSymbol, aliasTypeArguments) {
|
|
59715
59717
|
const typeMembershipMap = /* @__PURE__ */ new Map();
|
|
59716
59718
|
const includes = addTypesToIntersection(typeMembershipMap, 0, types);
|
|
59717
59719
|
const typeSet = arrayFrom(typeMembershipMap.values());
|
|
@@ -59732,7 +59734,7 @@ function createTypeChecker(host) {
|
|
|
59732
59734
|
return includes & 16777216 /* IncludesEmptyObject */ ? neverType : includes & 32768 /* Undefined */ ? undefinedType : nullType;
|
|
59733
59735
|
}
|
|
59734
59736
|
if (includes & 4 /* String */ && includes & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || includes & 8 /* Number */ && includes & 256 /* NumberLiteral */ || includes & 64 /* BigInt */ && includes & 2048 /* BigIntLiteral */ || includes & 4096 /* ESSymbol */ && includes & 8192 /* UniqueESSymbol */ || includes & 16384 /* Void */ && includes & 32768 /* Undefined */ || includes & 16777216 /* IncludesEmptyObject */ && includes & 470302716 /* DefinitelyNonNullable */) {
|
|
59735
|
-
if (!
|
|
59737
|
+
if (!(flags & 1 /* NoSupertypeReduction */))
|
|
59736
59738
|
removeRedundantSupertypes(typeSet, includes);
|
|
59737
59739
|
}
|
|
59738
59740
|
if (includes & 262144 /* IncludesMissingType */) {
|
|
@@ -59744,7 +59746,7 @@ function createTypeChecker(host) {
|
|
|
59744
59746
|
if (typeSet.length === 1) {
|
|
59745
59747
|
return typeSet[0];
|
|
59746
59748
|
}
|
|
59747
|
-
if (typeSet.length === 2) {
|
|
59749
|
+
if (typeSet.length === 2 && !(flags & 2 /* NoConstraintReduction */)) {
|
|
59748
59750
|
const typeVarIndex = typeSet[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
|
|
59749
59751
|
const typeVariable = typeSet[typeVarIndex];
|
|
59750
59752
|
const primitiveType = typeSet[1 - typeVarIndex];
|
|
@@ -59763,27 +59765,27 @@ function createTypeChecker(host) {
|
|
|
59763
59765
|
}
|
|
59764
59766
|
}
|
|
59765
59767
|
}
|
|
59766
|
-
const id = getTypeListId(typeSet) + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
59768
|
+
const id = getTypeListId(typeSet) + (flags & 2 /* NoConstraintReduction */ ? "*" : getAliasId(aliasSymbol, aliasTypeArguments));
|
|
59767
59769
|
let result = intersectionTypes.get(id);
|
|
59768
59770
|
if (!result) {
|
|
59769
59771
|
if (includes & 1048576 /* Union */) {
|
|
59770
59772
|
if (intersectUnionsOfPrimitiveTypes(typeSet)) {
|
|
59771
|
-
result = getIntersectionType(typeSet, aliasSymbol, aliasTypeArguments);
|
|
59773
|
+
result = getIntersectionType(typeSet, flags, aliasSymbol, aliasTypeArguments);
|
|
59772
59774
|
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && t.types[0].flags & 32768 /* Undefined */))) {
|
|
59773
59775
|
const containedUndefinedType = some(typeSet, containsMissingType) ? missingType : undefinedType;
|
|
59774
59776
|
removeFromEach(typeSet, 32768 /* Undefined */);
|
|
59775
|
-
result = getUnionType([getIntersectionType(typeSet), containedUndefinedType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
59777
|
+
result = getUnionType([getIntersectionType(typeSet, flags), containedUndefinedType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
59776
59778
|
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
|
59777
59779
|
removeFromEach(typeSet, 65536 /* Null */);
|
|
59778
|
-
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
59780
|
+
result = getUnionType([getIntersectionType(typeSet, flags), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
59779
59781
|
} else if (typeSet.length >= 4) {
|
|
59780
59782
|
const middle = Math.floor(typeSet.length / 2);
|
|
59781
|
-
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
|
59783
|
+
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle), flags), getIntersectionType(typeSet.slice(middle), flags)], flags, aliasSymbol, aliasTypeArguments);
|
|
59782
59784
|
} else {
|
|
59783
59785
|
if (!checkCrossProductUnion(typeSet)) {
|
|
59784
59786
|
return errorType;
|
|
59785
59787
|
}
|
|
59786
|
-
const constituents = getCrossProductIntersections(typeSet);
|
|
59788
|
+
const constituents = getCrossProductIntersections(typeSet, flags);
|
|
59787
59789
|
const origin = some(constituents, (t) => !!(t.flags & 2097152 /* Intersection */)) && getConstituentCountOfTypes(constituents) > getConstituentCountOfTypes(typeSet) ? createOriginUnionOrIntersectionType(2097152 /* Intersection */, typeSet) : void 0;
|
|
59788
59790
|
result = getUnionType(constituents, 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin);
|
|
59789
59791
|
}
|
|
@@ -59807,7 +59809,7 @@ function createTypeChecker(host) {
|
|
|
59807
59809
|
}
|
|
59808
59810
|
return true;
|
|
59809
59811
|
}
|
|
59810
|
-
function getCrossProductIntersections(types) {
|
|
59812
|
+
function getCrossProductIntersections(types, flags) {
|
|
59811
59813
|
const count = getCrossProductUnionSize(types);
|
|
59812
59814
|
const intersections = [];
|
|
59813
59815
|
for (let i = 0; i < count; i++) {
|
|
@@ -59821,7 +59823,7 @@ function createTypeChecker(host) {
|
|
|
59821
59823
|
n = Math.floor(n / length2);
|
|
59822
59824
|
}
|
|
59823
59825
|
}
|
|
59824
|
-
const t = getIntersectionType(constituents);
|
|
59826
|
+
const t = getIntersectionType(constituents, flags);
|
|
59825
59827
|
if (!(t.flags & 131072 /* Never */))
|
|
59826
59828
|
intersections.push(t);
|
|
59827
59829
|
}
|
|
@@ -59841,7 +59843,7 @@ function createTypeChecker(host) {
|
|
|
59841
59843
|
const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1;
|
|
59842
59844
|
const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType;
|
|
59843
59845
|
const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t));
|
|
59844
|
-
links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol)
|
|
59846
|
+
links.resolvedType = getIntersectionType(types, noSupertypeReduction ? 1 /* NoSupertypeReduction */ : 0, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));
|
|
59845
59847
|
}
|
|
59846
59848
|
return links.resolvedType;
|
|
59847
59849
|
}
|
|
@@ -60532,7 +60534,7 @@ function createTypeChecker(host) {
|
|
|
60532
60534
|
if (wasMissingProp) {
|
|
60533
60535
|
return void 0;
|
|
60534
60536
|
}
|
|
60535
|
-
return accessFlags & 4 /* Writing */ ? getIntersectionType(propTypes, aliasSymbol, aliasTypeArguments) : getUnionType(propTypes, 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
60537
|
+
return accessFlags & 4 /* Writing */ ? getIntersectionType(propTypes, 0 /* None */, aliasSymbol, aliasTypeArguments) : getUnionType(propTypes, 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
60536
60538
|
}
|
|
60537
60539
|
return getPropertyTypeForIndexType(objectType, apparentObjectType, indexType, indexType, accessNode, accessFlags | 8 /* CacheSymbol */ | 64 /* ReportDeprecated */);
|
|
60538
60540
|
}
|
|
@@ -61656,7 +61658,7 @@ function createTypeChecker(host) {
|
|
|
61656
61658
|
}
|
|
61657
61659
|
const newAliasSymbol = aliasSymbol || type.aliasSymbol;
|
|
61658
61660
|
const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);
|
|
61659
|
-
return flags & 2097152 /* Intersection */ || origin && origin.flags & 2097152 /* Intersection */ ? getIntersectionType(newTypes, newAliasSymbol, newAliasTypeArguments) : getUnionType(newTypes, 1 /* Literal */, newAliasSymbol, newAliasTypeArguments);
|
|
61661
|
+
return flags & 2097152 /* Intersection */ || origin && origin.flags & 2097152 /* Intersection */ ? getIntersectionType(newTypes, 0 /* None */, newAliasSymbol, newAliasTypeArguments) : getUnionType(newTypes, 1 /* Literal */, newAliasSymbol, newAliasTypeArguments);
|
|
61660
61662
|
}
|
|
61661
61663
|
if (flags & 4194304 /* Index */) {
|
|
61662
61664
|
return getIndexType(instantiateType(type.type, mapper));
|
package/lib/typescript.js
CHANGED
|
@@ -99,6 +99,7 @@ __export(typescript_exports, {
|
|
|
99
99
|
InlayHints: () => ts_InlayHints_exports,
|
|
100
100
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
101
101
|
InternalSymbolName: () => InternalSymbolName,
|
|
102
|
+
IntersectionFlags: () => IntersectionFlags,
|
|
102
103
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
103
104
|
JSDocParsingMode: () => JSDocParsingMode,
|
|
104
105
|
JsDoc: () => ts_JsDoc_exports,
|
|
@@ -2363,7 +2364,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2363
2364
|
|
|
2364
2365
|
// src/compiler/corePublic.ts
|
|
2365
2366
|
var versionMajorMinor = "5.5";
|
|
2366
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2367
|
+
var version = `${versionMajorMinor}.0-dev.20240504`;
|
|
2367
2368
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2368
2369
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2369
2370
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6390,6 +6391,12 @@ var UnionReduction = /* @__PURE__ */ ((UnionReduction2) => {
|
|
|
6390
6391
|
UnionReduction2[UnionReduction2["Subtype"] = 2] = "Subtype";
|
|
6391
6392
|
return UnionReduction2;
|
|
6392
6393
|
})(UnionReduction || {});
|
|
6394
|
+
var IntersectionFlags = /* @__PURE__ */ ((IntersectionFlags2) => {
|
|
6395
|
+
IntersectionFlags2[IntersectionFlags2["None"] = 0] = "None";
|
|
6396
|
+
IntersectionFlags2[IntersectionFlags2["NoSupertypeReduction"] = 1] = "NoSupertypeReduction";
|
|
6397
|
+
IntersectionFlags2[IntersectionFlags2["NoConstraintReduction"] = 2] = "NoConstraintReduction";
|
|
6398
|
+
return IntersectionFlags2;
|
|
6399
|
+
})(IntersectionFlags || {});
|
|
6393
6400
|
var ContextFlags = /* @__PURE__ */ ((ContextFlags3) => {
|
|
6394
6401
|
ContextFlags3[ContextFlags3["None"] = 0] = "None";
|
|
6395
6402
|
ContextFlags3[ContextFlags3["Signature"] = 1] = "Signature";
|
|
@@ -20450,6 +20457,8 @@ function getAllAccessorDeclarations(declarations, accessor) {
|
|
|
20450
20457
|
function getEffectiveTypeAnnotationNode(node) {
|
|
20451
20458
|
if (!isInJSFile(node) && isFunctionDeclaration(node))
|
|
20452
20459
|
return void 0;
|
|
20460
|
+
if (isTypeAliasDeclaration(node))
|
|
20461
|
+
return void 0;
|
|
20453
20462
|
const type = node.type;
|
|
20454
20463
|
if (type || !isInJSFile(node))
|
|
20455
20464
|
return type;
|
|
@@ -61739,7 +61748,7 @@ function createTypeChecker(host) {
|
|
|
61739
61748
|
}
|
|
61740
61749
|
}
|
|
61741
61750
|
return getNormalizedType(
|
|
61742
|
-
getIntersectionType(constraints),
|
|
61751
|
+
getIntersectionType(constraints, 2 /* NoConstraintReduction */),
|
|
61743
61752
|
/*writing*/
|
|
61744
61753
|
false
|
|
61745
61754
|
);
|
|
@@ -64544,7 +64553,7 @@ function createTypeChecker(host) {
|
|
|
64544
64553
|
result.aliasTypeArguments = aliasTypeArguments;
|
|
64545
64554
|
return result;
|
|
64546
64555
|
}
|
|
64547
|
-
function getIntersectionType(types, aliasSymbol, aliasTypeArguments
|
|
64556
|
+
function getIntersectionType(types, flags = 0 /* None */, aliasSymbol, aliasTypeArguments) {
|
|
64548
64557
|
const typeMembershipMap = /* @__PURE__ */ new Map();
|
|
64549
64558
|
const includes = addTypesToIntersection(typeMembershipMap, 0, types);
|
|
64550
64559
|
const typeSet = arrayFrom(typeMembershipMap.values());
|
|
@@ -64565,7 +64574,7 @@ function createTypeChecker(host) {
|
|
|
64565
64574
|
return includes & 16777216 /* IncludesEmptyObject */ ? neverType : includes & 32768 /* Undefined */ ? undefinedType : nullType;
|
|
64566
64575
|
}
|
|
64567
64576
|
if (includes & 4 /* String */ && includes & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || includes & 8 /* Number */ && includes & 256 /* NumberLiteral */ || includes & 64 /* BigInt */ && includes & 2048 /* BigIntLiteral */ || includes & 4096 /* ESSymbol */ && includes & 8192 /* UniqueESSymbol */ || includes & 16384 /* Void */ && includes & 32768 /* Undefined */ || includes & 16777216 /* IncludesEmptyObject */ && includes & 470302716 /* DefinitelyNonNullable */) {
|
|
64568
|
-
if (!
|
|
64577
|
+
if (!(flags & 1 /* NoSupertypeReduction */))
|
|
64569
64578
|
removeRedundantSupertypes(typeSet, includes);
|
|
64570
64579
|
}
|
|
64571
64580
|
if (includes & 262144 /* IncludesMissingType */) {
|
|
@@ -64577,7 +64586,7 @@ function createTypeChecker(host) {
|
|
|
64577
64586
|
if (typeSet.length === 1) {
|
|
64578
64587
|
return typeSet[0];
|
|
64579
64588
|
}
|
|
64580
|
-
if (typeSet.length === 2) {
|
|
64589
|
+
if (typeSet.length === 2 && !(flags & 2 /* NoConstraintReduction */)) {
|
|
64581
64590
|
const typeVarIndex = typeSet[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
|
|
64582
64591
|
const typeVariable = typeSet[typeVarIndex];
|
|
64583
64592
|
const primitiveType = typeSet[1 - typeVarIndex];
|
|
@@ -64596,27 +64605,27 @@ function createTypeChecker(host) {
|
|
|
64596
64605
|
}
|
|
64597
64606
|
}
|
|
64598
64607
|
}
|
|
64599
|
-
const id = getTypeListId(typeSet) + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
64608
|
+
const id = getTypeListId(typeSet) + (flags & 2 /* NoConstraintReduction */ ? "*" : getAliasId(aliasSymbol, aliasTypeArguments));
|
|
64600
64609
|
let result = intersectionTypes.get(id);
|
|
64601
64610
|
if (!result) {
|
|
64602
64611
|
if (includes & 1048576 /* Union */) {
|
|
64603
64612
|
if (intersectUnionsOfPrimitiveTypes(typeSet)) {
|
|
64604
|
-
result = getIntersectionType(typeSet, aliasSymbol, aliasTypeArguments);
|
|
64613
|
+
result = getIntersectionType(typeSet, flags, aliasSymbol, aliasTypeArguments);
|
|
64605
64614
|
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && t.types[0].flags & 32768 /* Undefined */))) {
|
|
64606
64615
|
const containedUndefinedType = some(typeSet, containsMissingType) ? missingType : undefinedType;
|
|
64607
64616
|
removeFromEach(typeSet, 32768 /* Undefined */);
|
|
64608
|
-
result = getUnionType([getIntersectionType(typeSet), containedUndefinedType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
64617
|
+
result = getUnionType([getIntersectionType(typeSet, flags), containedUndefinedType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
64609
64618
|
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
|
64610
64619
|
removeFromEach(typeSet, 65536 /* Null */);
|
|
64611
|
-
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
64620
|
+
result = getUnionType([getIntersectionType(typeSet, flags), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
64612
64621
|
} else if (typeSet.length >= 4) {
|
|
64613
64622
|
const middle = Math.floor(typeSet.length / 2);
|
|
64614
|
-
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
|
64623
|
+
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle), flags), getIntersectionType(typeSet.slice(middle), flags)], flags, aliasSymbol, aliasTypeArguments);
|
|
64615
64624
|
} else {
|
|
64616
64625
|
if (!checkCrossProductUnion(typeSet)) {
|
|
64617
64626
|
return errorType;
|
|
64618
64627
|
}
|
|
64619
|
-
const constituents = getCrossProductIntersections(typeSet);
|
|
64628
|
+
const constituents = getCrossProductIntersections(typeSet, flags);
|
|
64620
64629
|
const origin = some(constituents, (t) => !!(t.flags & 2097152 /* Intersection */)) && getConstituentCountOfTypes(constituents) > getConstituentCountOfTypes(typeSet) ? createOriginUnionOrIntersectionType(2097152 /* Intersection */, typeSet) : void 0;
|
|
64621
64630
|
result = getUnionType(constituents, 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin);
|
|
64622
64631
|
}
|
|
@@ -64640,7 +64649,7 @@ function createTypeChecker(host) {
|
|
|
64640
64649
|
}
|
|
64641
64650
|
return true;
|
|
64642
64651
|
}
|
|
64643
|
-
function getCrossProductIntersections(types) {
|
|
64652
|
+
function getCrossProductIntersections(types, flags) {
|
|
64644
64653
|
const count = getCrossProductUnionSize(types);
|
|
64645
64654
|
const intersections = [];
|
|
64646
64655
|
for (let i = 0; i < count; i++) {
|
|
@@ -64654,7 +64663,7 @@ function createTypeChecker(host) {
|
|
|
64654
64663
|
n = Math.floor(n / length2);
|
|
64655
64664
|
}
|
|
64656
64665
|
}
|
|
64657
|
-
const t = getIntersectionType(constituents);
|
|
64666
|
+
const t = getIntersectionType(constituents, flags);
|
|
64658
64667
|
if (!(t.flags & 131072 /* Never */))
|
|
64659
64668
|
intersections.push(t);
|
|
64660
64669
|
}
|
|
@@ -64674,7 +64683,7 @@ function createTypeChecker(host) {
|
|
|
64674
64683
|
const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1;
|
|
64675
64684
|
const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType;
|
|
64676
64685
|
const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t));
|
|
64677
|
-
links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol)
|
|
64686
|
+
links.resolvedType = getIntersectionType(types, noSupertypeReduction ? 1 /* NoSupertypeReduction */ : 0, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));
|
|
64678
64687
|
}
|
|
64679
64688
|
return links.resolvedType;
|
|
64680
64689
|
}
|
|
@@ -65365,7 +65374,7 @@ function createTypeChecker(host) {
|
|
|
65365
65374
|
if (wasMissingProp) {
|
|
65366
65375
|
return void 0;
|
|
65367
65376
|
}
|
|
65368
|
-
return accessFlags & 4 /* Writing */ ? getIntersectionType(propTypes, aliasSymbol, aliasTypeArguments) : getUnionType(propTypes, 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
65377
|
+
return accessFlags & 4 /* Writing */ ? getIntersectionType(propTypes, 0 /* None */, aliasSymbol, aliasTypeArguments) : getUnionType(propTypes, 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
65369
65378
|
}
|
|
65370
65379
|
return getPropertyTypeForIndexType(objectType, apparentObjectType, indexType, indexType, accessNode, accessFlags | 8 /* CacheSymbol */ | 64 /* ReportDeprecated */);
|
|
65371
65380
|
}
|
|
@@ -66489,7 +66498,7 @@ function createTypeChecker(host) {
|
|
|
66489
66498
|
}
|
|
66490
66499
|
const newAliasSymbol = aliasSymbol || type.aliasSymbol;
|
|
66491
66500
|
const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);
|
|
66492
|
-
return flags & 2097152 /* Intersection */ || origin && origin.flags & 2097152 /* Intersection */ ? getIntersectionType(newTypes, newAliasSymbol, newAliasTypeArguments) : getUnionType(newTypes, 1 /* Literal */, newAliasSymbol, newAliasTypeArguments);
|
|
66501
|
+
return flags & 2097152 /* Intersection */ || origin && origin.flags & 2097152 /* Intersection */ ? getIntersectionType(newTypes, 0 /* None */, newAliasSymbol, newAliasTypeArguments) : getUnionType(newTypes, 1 /* Literal */, newAliasSymbol, newAliasTypeArguments);
|
|
66493
66502
|
}
|
|
66494
66503
|
if (flags & 4194304 /* Index */) {
|
|
66495
66504
|
return getIndexType(instantiateType(type.type, mapper));
|
|
@@ -178889,6 +178898,7 @@ __export(ts_exports2, {
|
|
|
178889
178898
|
InlayHints: () => ts_InlayHints_exports,
|
|
178890
178899
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
178891
178900
|
InternalSymbolName: () => InternalSymbolName,
|
|
178901
|
+
IntersectionFlags: () => IntersectionFlags,
|
|
178892
178902
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
178893
178903
|
JSDocParsingMode: () => JSDocParsingMode,
|
|
178894
178904
|
JsDoc: () => ts_JsDoc_exports,
|
|
@@ -193318,6 +193328,7 @@ if (typeof console !== "undefined") {
|
|
|
193318
193328
|
InlayHints,
|
|
193319
193329
|
InternalEmitFlags,
|
|
193320
193330
|
InternalSymbolName,
|
|
193331
|
+
IntersectionFlags,
|
|
193321
193332
|
InvalidatedProjectKind,
|
|
193322
193333
|
JSDocParsingMode,
|
|
193323
193334
|
JsDoc,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.5.0-dev.
|
|
5
|
+
"version": "5.5.0-dev.20240504",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"node": "20.1.0",
|
|
111
111
|
"npm": "8.19.4"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "e154d47851797a58dc32e8d1049ae1e68a210023"
|
|
114
114
|
}
|