@typescript-deploys/pr-build 5.4.0-pr-56794-29 → 5.4.0-pr-56805-4
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/lib.es5.d.ts +0 -5
- package/lib/lib.esnext.collection.d.ts +29 -0
- package/lib/lib.esnext.d.ts +2 -0
- package/lib/lib.esnext.object.d.ts +29 -0
- package/lib/tsc.js +13 -32
- package/lib/tsserver.js +13 -32
- package/lib/typescript.js +13 -32
- package/lib/typingsInstaller.js +3 -3
- package/package.json +2 -2
package/lib/lib.es5.d.ts
CHANGED
|
@@ -1666,11 +1666,6 @@ type Capitalize<S extends string> = intrinsic;
|
|
|
1666
1666
|
*/
|
|
1667
1667
|
type Uncapitalize<S extends string> = intrinsic;
|
|
1668
1668
|
|
|
1669
|
-
/**
|
|
1670
|
-
* Marker for non-inference type position
|
|
1671
|
-
*/
|
|
1672
|
-
type NoInfer<T> = intrinsic;
|
|
1673
|
-
|
|
1674
1669
|
/**
|
|
1675
1670
|
* Marker for contextual 'this' type
|
|
1676
1671
|
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
interface MapConstructor {
|
|
20
|
+
/**
|
|
21
|
+
* Groups members of an iterable according to the return value of the passed callback.
|
|
22
|
+
* @param items An iterable.
|
|
23
|
+
* @param keySelector A callback which will be invoked for each item in items.
|
|
24
|
+
*/
|
|
25
|
+
groupBy<Item, Key>(
|
|
26
|
+
items: Iterable<Item>,
|
|
27
|
+
keySelector: (item: Item, index: number) => Key,
|
|
28
|
+
): Map<Key, Item[]>;
|
|
29
|
+
}
|
package/lib/lib.esnext.d.ts
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
interface ObjectConstructor {
|
|
20
|
+
/**
|
|
21
|
+
* Groups members of an iterable according to the return value of the passed callback.
|
|
22
|
+
* @param items An iterable.
|
|
23
|
+
* @param keySelector A callback which will be invoked for each item in items.
|
|
24
|
+
*/
|
|
25
|
+
groupBy<Item, Key extends PropertyKey>(
|
|
26
|
+
items: Iterable<Item>,
|
|
27
|
+
keySelector: (item: Item, index: number) => Key,
|
|
28
|
+
): Partial<Record<Key, Item[]>>;
|
|
29
|
+
}
|
package/lib/tsc.js
CHANGED
|
@@ -34047,7 +34047,7 @@ var libEntries = [
|
|
|
34047
34047
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
34048
34048
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
34049
34049
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
34050
|
-
["esnext.collection", "lib.
|
|
34050
|
+
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
34051
34051
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
34052
34052
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
34053
34053
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -34057,6 +34057,7 @@ var libEntries = [
|
|
|
34057
34057
|
["esnext.promise", "lib.esnext.promise.d.ts"],
|
|
34058
34058
|
["esnext.weakref", "lib.es2021.weakref.d.ts"],
|
|
34059
34059
|
["esnext.decorators", "lib.esnext.decorators.d.ts"],
|
|
34060
|
+
["esnext.object", "lib.esnext.object.d.ts"],
|
|
34060
34061
|
["decorators", "lib.decorators.d.ts"],
|
|
34061
34062
|
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
|
34062
34063
|
];
|
|
@@ -43392,8 +43393,7 @@ var intrinsicTypeKinds = new Map(Object.entries({
|
|
|
43392
43393
|
Uppercase: 0 /* Uppercase */,
|
|
43393
43394
|
Lowercase: 1 /* Lowercase */,
|
|
43394
43395
|
Capitalize: 2 /* Capitalize */,
|
|
43395
|
-
Uncapitalize: 3 /* Uncapitalize
|
|
43396
|
-
NoInfer: 4 /* NoInfer */
|
|
43396
|
+
Uncapitalize: 3 /* Uncapitalize */
|
|
43397
43397
|
}));
|
|
43398
43398
|
var SymbolLinks = class {
|
|
43399
43399
|
};
|
|
@@ -48247,8 +48247,7 @@ function createTypeChecker(host) {
|
|
|
48247
48247
|
return visitAndTransformType(type, (type2) => conditionalTypeToTypeNode(type2));
|
|
48248
48248
|
}
|
|
48249
48249
|
if (type.flags & 33554432 /* Substitution */) {
|
|
48250
|
-
|
|
48251
|
-
return isNoInferType(type) ? factory.createTypeReferenceNode("NoInfer", [typeNode]) : typeNode;
|
|
48250
|
+
return typeToTypeNodeHelper(type.baseType, context);
|
|
48252
48251
|
}
|
|
48253
48252
|
return Debug.fail("Should be unreachable.");
|
|
48254
48253
|
function conditionalTypeToTypeNode(type2) {
|
|
@@ -56152,11 +56151,8 @@ function createTypeChecker(host) {
|
|
|
56152
56151
|
}
|
|
56153
56152
|
function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) {
|
|
56154
56153
|
const type = getDeclaredTypeOfSymbol(symbol);
|
|
56155
|
-
if (type === intrinsicMarkerType) {
|
|
56156
|
-
|
|
56157
|
-
if (typeKind !== void 0 && typeArguments && typeArguments.length === 1) {
|
|
56158
|
-
return typeKind === 4 /* NoInfer */ ? getNoInferType(typeArguments[0]) : getStringMappingType(symbol, typeArguments[0]);
|
|
56159
|
-
}
|
|
56154
|
+
if (type === intrinsicMarkerType && intrinsicTypeKinds.has(symbol.escapedName) && typeArguments && typeArguments.length === 1) {
|
|
56155
|
+
return getStringMappingType(symbol, typeArguments[0]);
|
|
56160
56156
|
}
|
|
56161
56157
|
const links = getSymbolLinks(symbol);
|
|
56162
56158
|
const typeParameters = links.typeParameters;
|
|
@@ -56310,19 +56306,10 @@ function createTypeChecker(host) {
|
|
|
56310
56306
|
}
|
|
56311
56307
|
return links.resolvedJSDocType;
|
|
56312
56308
|
}
|
|
56313
|
-
function getNoInferType(type) {
|
|
56314
|
-
return isNoInferTargetType(type) ? getOrCreateSubstitutionType(type, unknownType) : type;
|
|
56315
|
-
}
|
|
56316
|
-
function isNoInferTargetType(type) {
|
|
56317
|
-
return !!(type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, isNoInferTargetType) || type.flags & 33554432 /* Substitution */ && !isNoInferType(type) && isNoInferTargetType(type.baseType) || type.flags & 524288 /* Object */ && !isEmptyAnonymousObjectType(type) || type.flags & (465829888 /* Instantiable */ & ~33554432 /* Substitution */) && !isPatternLiteralType(type));
|
|
56318
|
-
}
|
|
56319
|
-
function isNoInferType(type) {
|
|
56320
|
-
return !!(type.flags & 33554432 /* Substitution */ && type.constraint.flags & 2 /* Unknown */);
|
|
56321
|
-
}
|
|
56322
56309
|
function getSubstitutionType(baseType, constraint) {
|
|
56323
|
-
|
|
56324
|
-
|
|
56325
|
-
|
|
56310
|
+
if (constraint.flags & 3 /* AnyOrUnknown */ || constraint === baseType || baseType.flags & 1 /* Any */) {
|
|
56311
|
+
return baseType;
|
|
56312
|
+
}
|
|
56326
56313
|
const id = `${getTypeId(baseType)}>${getTypeId(constraint)}`;
|
|
56327
56314
|
const cached = substitutionTypes.get(id);
|
|
56328
56315
|
if (cached) {
|
|
@@ -56335,7 +56322,7 @@ function createTypeChecker(host) {
|
|
|
56335
56322
|
return result;
|
|
56336
56323
|
}
|
|
56337
56324
|
function getSubstitutionIntersection(substitutionType) {
|
|
56338
|
-
return
|
|
56325
|
+
return getIntersectionType([substitutionType.constraint, substitutionType.baseType]);
|
|
56339
56326
|
}
|
|
56340
56327
|
function isUnaryTupleTypeNode(node) {
|
|
56341
56328
|
return node.kind === 189 /* TupleType */ && node.elements.length === 1;
|
|
@@ -57852,11 +57839,11 @@ function createTypeChecker(host) {
|
|
|
57852
57839
|
);
|
|
57853
57840
|
}
|
|
57854
57841
|
function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
|
|
57855
|
-
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */
|
|
57842
|
+
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
|
|
57856
57843
|
}
|
|
57857
57844
|
function getIndexType(type, indexFlags = defaultIndexFlags) {
|
|
57858
57845
|
type = getReducedType(type);
|
|
57859
|
-
return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) :
|
|
57846
|
+
return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
|
|
57860
57847
|
}
|
|
57861
57848
|
function getExtractStringType(type) {
|
|
57862
57849
|
if (keyofStringsOnly) {
|
|
@@ -59593,9 +59580,6 @@ function createTypeChecker(host) {
|
|
|
59593
59580
|
}
|
|
59594
59581
|
if (flags & 33554432 /* Substitution */) {
|
|
59595
59582
|
const newBaseType = instantiateType(type.baseType, mapper);
|
|
59596
|
-
if (isNoInferType(type)) {
|
|
59597
|
-
return getNoInferType(newBaseType);
|
|
59598
|
-
}
|
|
59599
59583
|
const newConstraint = instantiateType(type.constraint, mapper);
|
|
59600
59584
|
if (newBaseType.flags & 8650752 /* TypeVariable */ && isGenericType(newConstraint)) {
|
|
59601
59585
|
return getSubstitutionType(newBaseType, newConstraint);
|
|
@@ -64346,7 +64330,7 @@ function createTypeChecker(host) {
|
|
|
64346
64330
|
let expandingFlags = 0 /* None */;
|
|
64347
64331
|
inferFromTypes(originalSource, originalTarget);
|
|
64348
64332
|
function inferFromTypes(source, target) {
|
|
64349
|
-
if (!couldContainTypeVariables(target)
|
|
64333
|
+
if (!couldContainTypeVariables(target)) {
|
|
64350
64334
|
return;
|
|
64351
64335
|
}
|
|
64352
64336
|
if (source === wildcardType || source === blockedStringType) {
|
|
@@ -64395,9 +64379,6 @@ function createTypeChecker(host) {
|
|
|
64395
64379
|
}
|
|
64396
64380
|
}
|
|
64397
64381
|
if (target.flags & (8388608 /* IndexedAccess */ | 33554432 /* Substitution */)) {
|
|
64398
|
-
if (isNoInferType(target)) {
|
|
64399
|
-
return;
|
|
64400
|
-
}
|
|
64401
64382
|
target = getActualTypeVariable(target);
|
|
64402
64383
|
}
|
|
64403
64384
|
if (target.flags & 8650752 /* TypeVariable */) {
|
package/lib/tsserver.js
CHANGED
|
@@ -38462,7 +38462,7 @@ var libEntries = [
|
|
|
38462
38462
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
38463
38463
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
38464
38464
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
38465
|
-
["esnext.collection", "lib.
|
|
38465
|
+
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
38466
38466
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
38467
38467
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
38468
38468
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -38472,6 +38472,7 @@ var libEntries = [
|
|
|
38472
38472
|
["esnext.promise", "lib.esnext.promise.d.ts"],
|
|
38473
38473
|
["esnext.weakref", "lib.es2021.weakref.d.ts"],
|
|
38474
38474
|
["esnext.decorators", "lib.esnext.decorators.d.ts"],
|
|
38475
|
+
["esnext.object", "lib.esnext.object.d.ts"],
|
|
38475
38476
|
["decorators", "lib.decorators.d.ts"],
|
|
38476
38477
|
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
|
38477
38478
|
];
|
|
@@ -48107,8 +48108,7 @@ var intrinsicTypeKinds = new Map(Object.entries({
|
|
|
48107
48108
|
Uppercase: 0 /* Uppercase */,
|
|
48108
48109
|
Lowercase: 1 /* Lowercase */,
|
|
48109
48110
|
Capitalize: 2 /* Capitalize */,
|
|
48110
|
-
Uncapitalize: 3 /* Uncapitalize
|
|
48111
|
-
NoInfer: 4 /* NoInfer */
|
|
48111
|
+
Uncapitalize: 3 /* Uncapitalize */
|
|
48112
48112
|
}));
|
|
48113
48113
|
var SymbolLinks = class {
|
|
48114
48114
|
};
|
|
@@ -52962,8 +52962,7 @@ function createTypeChecker(host) {
|
|
|
52962
52962
|
return visitAndTransformType(type, (type2) => conditionalTypeToTypeNode(type2));
|
|
52963
52963
|
}
|
|
52964
52964
|
if (type.flags & 33554432 /* Substitution */) {
|
|
52965
|
-
|
|
52966
|
-
return isNoInferType(type) ? factory.createTypeReferenceNode("NoInfer", [typeNode]) : typeNode;
|
|
52965
|
+
return typeToTypeNodeHelper(type.baseType, context);
|
|
52967
52966
|
}
|
|
52968
52967
|
return Debug.fail("Should be unreachable.");
|
|
52969
52968
|
function conditionalTypeToTypeNode(type2) {
|
|
@@ -60867,11 +60866,8 @@ function createTypeChecker(host) {
|
|
|
60867
60866
|
}
|
|
60868
60867
|
function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) {
|
|
60869
60868
|
const type = getDeclaredTypeOfSymbol(symbol);
|
|
60870
|
-
if (type === intrinsicMarkerType) {
|
|
60871
|
-
|
|
60872
|
-
if (typeKind !== void 0 && typeArguments && typeArguments.length === 1) {
|
|
60873
|
-
return typeKind === 4 /* NoInfer */ ? getNoInferType(typeArguments[0]) : getStringMappingType(symbol, typeArguments[0]);
|
|
60874
|
-
}
|
|
60869
|
+
if (type === intrinsicMarkerType && intrinsicTypeKinds.has(symbol.escapedName) && typeArguments && typeArguments.length === 1) {
|
|
60870
|
+
return getStringMappingType(symbol, typeArguments[0]);
|
|
60875
60871
|
}
|
|
60876
60872
|
const links = getSymbolLinks(symbol);
|
|
60877
60873
|
const typeParameters = links.typeParameters;
|
|
@@ -61025,19 +61021,10 @@ function createTypeChecker(host) {
|
|
|
61025
61021
|
}
|
|
61026
61022
|
return links.resolvedJSDocType;
|
|
61027
61023
|
}
|
|
61028
|
-
function getNoInferType(type) {
|
|
61029
|
-
return isNoInferTargetType(type) ? getOrCreateSubstitutionType(type, unknownType) : type;
|
|
61030
|
-
}
|
|
61031
|
-
function isNoInferTargetType(type) {
|
|
61032
|
-
return !!(type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, isNoInferTargetType) || type.flags & 33554432 /* Substitution */ && !isNoInferType(type) && isNoInferTargetType(type.baseType) || type.flags & 524288 /* Object */ && !isEmptyAnonymousObjectType(type) || type.flags & (465829888 /* Instantiable */ & ~33554432 /* Substitution */) && !isPatternLiteralType(type));
|
|
61033
|
-
}
|
|
61034
|
-
function isNoInferType(type) {
|
|
61035
|
-
return !!(type.flags & 33554432 /* Substitution */ && type.constraint.flags & 2 /* Unknown */);
|
|
61036
|
-
}
|
|
61037
61024
|
function getSubstitutionType(baseType, constraint) {
|
|
61038
|
-
|
|
61039
|
-
|
|
61040
|
-
|
|
61025
|
+
if (constraint.flags & 3 /* AnyOrUnknown */ || constraint === baseType || baseType.flags & 1 /* Any */) {
|
|
61026
|
+
return baseType;
|
|
61027
|
+
}
|
|
61041
61028
|
const id = `${getTypeId(baseType)}>${getTypeId(constraint)}`;
|
|
61042
61029
|
const cached = substitutionTypes.get(id);
|
|
61043
61030
|
if (cached) {
|
|
@@ -61050,7 +61037,7 @@ function createTypeChecker(host) {
|
|
|
61050
61037
|
return result;
|
|
61051
61038
|
}
|
|
61052
61039
|
function getSubstitutionIntersection(substitutionType) {
|
|
61053
|
-
return
|
|
61040
|
+
return getIntersectionType([substitutionType.constraint, substitutionType.baseType]);
|
|
61054
61041
|
}
|
|
61055
61042
|
function isUnaryTupleTypeNode(node) {
|
|
61056
61043
|
return node.kind === 189 /* TupleType */ && node.elements.length === 1;
|
|
@@ -62567,11 +62554,11 @@ function createTypeChecker(host) {
|
|
|
62567
62554
|
);
|
|
62568
62555
|
}
|
|
62569
62556
|
function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
|
|
62570
|
-
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */
|
|
62557
|
+
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
|
|
62571
62558
|
}
|
|
62572
62559
|
function getIndexType(type, indexFlags = defaultIndexFlags) {
|
|
62573
62560
|
type = getReducedType(type);
|
|
62574
|
-
return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) :
|
|
62561
|
+
return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
|
|
62575
62562
|
}
|
|
62576
62563
|
function getExtractStringType(type) {
|
|
62577
62564
|
if (keyofStringsOnly) {
|
|
@@ -64308,9 +64295,6 @@ function createTypeChecker(host) {
|
|
|
64308
64295
|
}
|
|
64309
64296
|
if (flags & 33554432 /* Substitution */) {
|
|
64310
64297
|
const newBaseType = instantiateType(type.baseType, mapper);
|
|
64311
|
-
if (isNoInferType(type)) {
|
|
64312
|
-
return getNoInferType(newBaseType);
|
|
64313
|
-
}
|
|
64314
64298
|
const newConstraint = instantiateType(type.constraint, mapper);
|
|
64315
64299
|
if (newBaseType.flags & 8650752 /* TypeVariable */ && isGenericType(newConstraint)) {
|
|
64316
64300
|
return getSubstitutionType(newBaseType, newConstraint);
|
|
@@ -69061,7 +69045,7 @@ function createTypeChecker(host) {
|
|
|
69061
69045
|
let expandingFlags = 0 /* None */;
|
|
69062
69046
|
inferFromTypes(originalSource, originalTarget);
|
|
69063
69047
|
function inferFromTypes(source, target) {
|
|
69064
|
-
if (!couldContainTypeVariables(target)
|
|
69048
|
+
if (!couldContainTypeVariables(target)) {
|
|
69065
69049
|
return;
|
|
69066
69050
|
}
|
|
69067
69051
|
if (source === wildcardType || source === blockedStringType) {
|
|
@@ -69110,9 +69094,6 @@ function createTypeChecker(host) {
|
|
|
69110
69094
|
}
|
|
69111
69095
|
}
|
|
69112
69096
|
if (target.flags & (8388608 /* IndexedAccess */ | 33554432 /* Substitution */)) {
|
|
69113
|
-
if (isNoInferType(target)) {
|
|
69114
|
-
return;
|
|
69115
|
-
}
|
|
69116
69097
|
target = getActualTypeVariable(target);
|
|
69117
69098
|
}
|
|
69118
69099
|
if (target.flags & 8650752 /* TypeVariable */) {
|
package/lib/typescript.js
CHANGED
|
@@ -37962,7 +37962,7 @@ ${lanes.join("\n")}
|
|
|
37962
37962
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
37963
37963
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
37964
37964
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
37965
|
-
["esnext.collection", "lib.
|
|
37965
|
+
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
37966
37966
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
37967
37967
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
37968
37968
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -37972,6 +37972,7 @@ ${lanes.join("\n")}
|
|
|
37972
37972
|
["esnext.promise", "lib.esnext.promise.d.ts"],
|
|
37973
37973
|
["esnext.weakref", "lib.es2021.weakref.d.ts"],
|
|
37974
37974
|
["esnext.decorators", "lib.esnext.decorators.d.ts"],
|
|
37975
|
+
["esnext.object", "lib.esnext.object.d.ts"],
|
|
37975
37976
|
["decorators", "lib.decorators.d.ts"],
|
|
37976
37977
|
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
|
37977
37978
|
];
|
|
@@ -50721,8 +50722,7 @@ ${lanes.join("\n")}
|
|
|
50721
50722
|
return visitAndTransformType(type, (type2) => conditionalTypeToTypeNode(type2));
|
|
50722
50723
|
}
|
|
50723
50724
|
if (type.flags & 33554432 /* Substitution */) {
|
|
50724
|
-
|
|
50725
|
-
return isNoInferType(type) ? factory.createTypeReferenceNode("NoInfer", [typeNode]) : typeNode;
|
|
50725
|
+
return typeToTypeNodeHelper(type.baseType, context);
|
|
50726
50726
|
}
|
|
50727
50727
|
return Debug.fail("Should be unreachable.");
|
|
50728
50728
|
function conditionalTypeToTypeNode(type2) {
|
|
@@ -58626,11 +58626,8 @@ ${lanes.join("\n")}
|
|
|
58626
58626
|
}
|
|
58627
58627
|
function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) {
|
|
58628
58628
|
const type = getDeclaredTypeOfSymbol(symbol);
|
|
58629
|
-
if (type === intrinsicMarkerType) {
|
|
58630
|
-
|
|
58631
|
-
if (typeKind !== void 0 && typeArguments && typeArguments.length === 1) {
|
|
58632
|
-
return typeKind === 4 /* NoInfer */ ? getNoInferType(typeArguments[0]) : getStringMappingType(symbol, typeArguments[0]);
|
|
58633
|
-
}
|
|
58629
|
+
if (type === intrinsicMarkerType && intrinsicTypeKinds.has(symbol.escapedName) && typeArguments && typeArguments.length === 1) {
|
|
58630
|
+
return getStringMappingType(symbol, typeArguments[0]);
|
|
58634
58631
|
}
|
|
58635
58632
|
const links = getSymbolLinks(symbol);
|
|
58636
58633
|
const typeParameters = links.typeParameters;
|
|
@@ -58784,19 +58781,10 @@ ${lanes.join("\n")}
|
|
|
58784
58781
|
}
|
|
58785
58782
|
return links.resolvedJSDocType;
|
|
58786
58783
|
}
|
|
58787
|
-
function getNoInferType(type) {
|
|
58788
|
-
return isNoInferTargetType(type) ? getOrCreateSubstitutionType(type, unknownType) : type;
|
|
58789
|
-
}
|
|
58790
|
-
function isNoInferTargetType(type) {
|
|
58791
|
-
return !!(type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, isNoInferTargetType) || type.flags & 33554432 /* Substitution */ && !isNoInferType(type) && isNoInferTargetType(type.baseType) || type.flags & 524288 /* Object */ && !isEmptyAnonymousObjectType(type) || type.flags & (465829888 /* Instantiable */ & ~33554432 /* Substitution */) && !isPatternLiteralType(type));
|
|
58792
|
-
}
|
|
58793
|
-
function isNoInferType(type) {
|
|
58794
|
-
return !!(type.flags & 33554432 /* Substitution */ && type.constraint.flags & 2 /* Unknown */);
|
|
58795
|
-
}
|
|
58796
58784
|
function getSubstitutionType(baseType, constraint) {
|
|
58797
|
-
|
|
58798
|
-
|
|
58799
|
-
|
|
58785
|
+
if (constraint.flags & 3 /* AnyOrUnknown */ || constraint === baseType || baseType.flags & 1 /* Any */) {
|
|
58786
|
+
return baseType;
|
|
58787
|
+
}
|
|
58800
58788
|
const id = `${getTypeId(baseType)}>${getTypeId(constraint)}`;
|
|
58801
58789
|
const cached = substitutionTypes.get(id);
|
|
58802
58790
|
if (cached) {
|
|
@@ -58809,7 +58797,7 @@ ${lanes.join("\n")}
|
|
|
58809
58797
|
return result;
|
|
58810
58798
|
}
|
|
58811
58799
|
function getSubstitutionIntersection(substitutionType) {
|
|
58812
|
-
return
|
|
58800
|
+
return getIntersectionType([substitutionType.constraint, substitutionType.baseType]);
|
|
58813
58801
|
}
|
|
58814
58802
|
function isUnaryTupleTypeNode(node) {
|
|
58815
58803
|
return node.kind === 189 /* TupleType */ && node.elements.length === 1;
|
|
@@ -60326,11 +60314,11 @@ ${lanes.join("\n")}
|
|
|
60326
60314
|
);
|
|
60327
60315
|
}
|
|
60328
60316
|
function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
|
|
60329
|
-
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */
|
|
60317
|
+
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
|
|
60330
60318
|
}
|
|
60331
60319
|
function getIndexType(type, indexFlags = defaultIndexFlags) {
|
|
60332
60320
|
type = getReducedType(type);
|
|
60333
|
-
return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) :
|
|
60321
|
+
return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
|
|
60334
60322
|
}
|
|
60335
60323
|
function getExtractStringType(type) {
|
|
60336
60324
|
if (keyofStringsOnly) {
|
|
@@ -62067,9 +62055,6 @@ ${lanes.join("\n")}
|
|
|
62067
62055
|
}
|
|
62068
62056
|
if (flags & 33554432 /* Substitution */) {
|
|
62069
62057
|
const newBaseType = instantiateType(type.baseType, mapper);
|
|
62070
|
-
if (isNoInferType(type)) {
|
|
62071
|
-
return getNoInferType(newBaseType);
|
|
62072
|
-
}
|
|
62073
62058
|
const newConstraint = instantiateType(type.constraint, mapper);
|
|
62074
62059
|
if (newBaseType.flags & 8650752 /* TypeVariable */ && isGenericType(newConstraint)) {
|
|
62075
62060
|
return getSubstitutionType(newBaseType, newConstraint);
|
|
@@ -66820,7 +66805,7 @@ ${lanes.join("\n")}
|
|
|
66820
66805
|
let expandingFlags = 0 /* None */;
|
|
66821
66806
|
inferFromTypes(originalSource, originalTarget);
|
|
66822
66807
|
function inferFromTypes(source, target) {
|
|
66823
|
-
if (!couldContainTypeVariables(target)
|
|
66808
|
+
if (!couldContainTypeVariables(target)) {
|
|
66824
66809
|
return;
|
|
66825
66810
|
}
|
|
66826
66811
|
if (source === wildcardType || source === blockedStringType) {
|
|
@@ -66869,9 +66854,6 @@ ${lanes.join("\n")}
|
|
|
66869
66854
|
}
|
|
66870
66855
|
}
|
|
66871
66856
|
if (target.flags & (8388608 /* IndexedAccess */ | 33554432 /* Substitution */)) {
|
|
66872
|
-
if (isNoInferType(target)) {
|
|
66873
|
-
return;
|
|
66874
|
-
}
|
|
66875
66857
|
target = getActualTypeVariable(target);
|
|
66876
66858
|
}
|
|
66877
66859
|
if (target.flags & 8650752 /* TypeVariable */) {
|
|
@@ -87552,8 +87534,7 @@ ${lanes.join("\n")}
|
|
|
87552
87534
|
Uppercase: 0 /* Uppercase */,
|
|
87553
87535
|
Lowercase: 1 /* Lowercase */,
|
|
87554
87536
|
Capitalize: 2 /* Capitalize */,
|
|
87555
|
-
Uncapitalize: 3 /* Uncapitalize
|
|
87556
|
-
NoInfer: 4 /* NoInfer */
|
|
87537
|
+
Uncapitalize: 3 /* Uncapitalize */
|
|
87557
87538
|
}));
|
|
87558
87539
|
SymbolLinks = class {
|
|
87559
87540
|
};
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -25910,7 +25910,7 @@ var libEntries = [
|
|
|
25910
25910
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
25911
25911
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
25912
25912
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
25913
|
-
["esnext.collection", "lib.
|
|
25913
|
+
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
25914
25914
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
25915
25915
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
25916
25916
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -25920,6 +25920,7 @@ var libEntries = [
|
|
|
25920
25920
|
["esnext.promise", "lib.esnext.promise.d.ts"],
|
|
25921
25921
|
["esnext.weakref", "lib.es2021.weakref.d.ts"],
|
|
25922
25922
|
["esnext.decorators", "lib.esnext.decorators.d.ts"],
|
|
25923
|
+
["esnext.object", "lib.esnext.object.d.ts"],
|
|
25923
25924
|
["decorators", "lib.decorators.d.ts"],
|
|
25924
25925
|
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
|
25925
25926
|
];
|
|
@@ -29492,8 +29493,7 @@ var intrinsicTypeKinds = new Map(Object.entries({
|
|
|
29492
29493
|
Uppercase: 0 /* Uppercase */,
|
|
29493
29494
|
Lowercase: 1 /* Lowercase */,
|
|
29494
29495
|
Capitalize: 2 /* Capitalize */,
|
|
29495
|
-
Uncapitalize: 3 /* Uncapitalize
|
|
29496
|
-
NoInfer: 4 /* NoInfer */
|
|
29496
|
+
Uncapitalize: 3 /* Uncapitalize */
|
|
29497
29497
|
}));
|
|
29498
29498
|
function getNodeId(node) {
|
|
29499
29499
|
if (!node.id) {
|
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-56805-4",
|
|
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": "84be6195f00b5c654ccc38841f57e59dc9e2e91c"
|
|
118
118
|
}
|