@typescript-deploys/pr-build 5.6.0-pr-52095-40 → 5.6.0-pr-59504-2
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 +31 -66
- package/lib/typescript.js +35 -73
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.6";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240801`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -51650,6 +51650,8 @@ function createTypeChecker(host) {
|
|
|
51650
51650
|
}
|
|
51651
51651
|
introducesError = true;
|
|
51652
51652
|
return { introducesError, node, sym };
|
|
51653
|
+
} else {
|
|
51654
|
+
sym = symAtLocation;
|
|
51653
51655
|
}
|
|
51654
51656
|
}
|
|
51655
51657
|
if (sym) {
|
|
@@ -71169,78 +71171,41 @@ function createTypeChecker(host) {
|
|
|
71169
71171
|
return mapType(
|
|
71170
71172
|
type,
|
|
71171
71173
|
(t) => {
|
|
71172
|
-
|
|
71173
|
-
|
|
71174
|
-
|
|
71175
|
-
|
|
71176
|
-
const
|
|
71177
|
-
|
|
71178
|
-
|
|
71179
|
-
|
|
71180
|
-
|
|
71181
|
-
|
|
71182
|
-
|
|
71183
|
-
|
|
71184
|
-
}
|
|
71185
|
-
const typeOfConcreteProperty = getTypeOfConcretePropertyOfContextualType(t2);
|
|
71186
|
-
if (typeOfConcreteProperty) {
|
|
71187
|
-
concretePropertyTypes = append(concretePropertyTypes, typeOfConcreteProperty);
|
|
71188
|
-
continue;
|
|
71189
|
-
}
|
|
71190
|
-
applicableIndexInfoCandidates = append(applicableIndexInfoCandidates, t2);
|
|
71191
|
-
}
|
|
71192
|
-
if (concretePropertyTypes) {
|
|
71193
|
-
return getIntersectionType(concatenate(concretePropertyTypes, applicableIndexedMappedTypeSubstitions));
|
|
71174
|
+
var _a;
|
|
71175
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
71176
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
71177
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
71178
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
71179
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
71180
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
71181
|
+
}
|
|
71182
|
+
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
71183
|
+
const prop = getPropertyOfType(t, name);
|
|
71184
|
+
if (prop) {
|
|
71185
|
+
return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop.flags & 16777216 /* Optional */));
|
|
71194
71186
|
}
|
|
71195
|
-
|
|
71196
|
-
|
|
71197
|
-
|
|
71187
|
+
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
71188
|
+
const restType = getElementTypeOfSliceOfTupleType(
|
|
71189
|
+
t,
|
|
71190
|
+
t.target.fixedLength,
|
|
71191
|
+
/*endSkipCount*/
|
|
71192
|
+
0,
|
|
71193
|
+
/*writing*/
|
|
71194
|
+
false,
|
|
71195
|
+
/*noReductions*/
|
|
71196
|
+
true
|
|
71197
|
+
);
|
|
71198
|
+
if (restType) {
|
|
71199
|
+
return restType;
|
|
71200
|
+
}
|
|
71198
71201
|
}
|
|
71199
|
-
return void 0;
|
|
71202
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
71200
71203
|
}
|
|
71201
|
-
return
|
|
71204
|
+
return void 0;
|
|
71202
71205
|
},
|
|
71203
71206
|
/*noReductions*/
|
|
71204
71207
|
true
|
|
71205
71208
|
);
|
|
71206
|
-
function getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t) {
|
|
71207
|
-
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
71208
|
-
const constraint = getConstraintTypeFromMappedType(t);
|
|
71209
|
-
if (constraint.flags & 16777216 /* Conditional */ && getReducedType(getTrueTypeFromConditionalType(constraint)).flags & 131072 /* Never */ && isTypeAssignableTo(propertyNameType, constraint.extendsType)) {
|
|
71210
|
-
return void 0;
|
|
71211
|
-
}
|
|
71212
|
-
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
71213
|
-
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
71214
|
-
return substituteIndexedMappedType(t, propertyNameType);
|
|
71215
|
-
}
|
|
71216
|
-
return void 0;
|
|
71217
|
-
}
|
|
71218
|
-
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
71219
|
-
const prop = getPropertyOfType(t, name);
|
|
71220
|
-
if (prop) {
|
|
71221
|
-
return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop.flags & 16777216 /* Optional */));
|
|
71222
|
-
}
|
|
71223
|
-
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
71224
|
-
const restType = getElementTypeOfSliceOfTupleType(
|
|
71225
|
-
t,
|
|
71226
|
-
t.target.fixedLength,
|
|
71227
|
-
/*endSkipCount*/
|
|
71228
|
-
0,
|
|
71229
|
-
/*writing*/
|
|
71230
|
-
false,
|
|
71231
|
-
/*noReductions*/
|
|
71232
|
-
true
|
|
71233
|
-
);
|
|
71234
|
-
if (restType) {
|
|
71235
|
-
return restType;
|
|
71236
|
-
}
|
|
71237
|
-
}
|
|
71238
|
-
return void 0;
|
|
71239
|
-
}
|
|
71240
|
-
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
71241
|
-
var _a;
|
|
71242
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
71243
|
-
}
|
|
71244
71209
|
}
|
|
71245
71210
|
function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
|
|
71246
71211
|
Debug.assert(isObjectLiteralMethod(node));
|
package/lib/typescript.js
CHANGED
|
@@ -2260,7 +2260,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2260
2260
|
|
|
2261
2261
|
// src/compiler/corePublic.ts
|
|
2262
2262
|
var versionMajorMinor = "5.6";
|
|
2263
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2263
|
+
var version = `${versionMajorMinor}.0-insiders.20240801`;
|
|
2264
2264
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2265
2265
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2266
2266
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -49932,7 +49932,7 @@ function createTypeChecker(host) {
|
|
|
49932
49932
|
var scanner2;
|
|
49933
49933
|
var Symbol47 = objectAllocator.getSymbolConstructor();
|
|
49934
49934
|
var Type29 = objectAllocator.getTypeConstructor();
|
|
49935
|
-
var
|
|
49935
|
+
var Signature13 = objectAllocator.getSignatureConstructor();
|
|
49936
49936
|
var typeCount = 0;
|
|
49937
49937
|
var symbolCount = 0;
|
|
49938
49938
|
var totalInstantiationCount = 0;
|
|
@@ -56269,6 +56269,8 @@ function createTypeChecker(host) {
|
|
|
56269
56269
|
}
|
|
56270
56270
|
introducesError = true;
|
|
56271
56271
|
return { introducesError, node, sym };
|
|
56272
|
+
} else {
|
|
56273
|
+
sym = symAtLocation;
|
|
56272
56274
|
}
|
|
56273
56275
|
}
|
|
56274
56276
|
if (sym) {
|
|
@@ -60743,7 +60745,7 @@ function createTypeChecker(host) {
|
|
|
60743
60745
|
resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments);
|
|
60744
60746
|
}
|
|
60745
60747
|
function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) {
|
|
60746
|
-
const sig = new
|
|
60748
|
+
const sig = new Signature13(checker, flags);
|
|
60747
60749
|
sig.declaration = declaration;
|
|
60748
60750
|
sig.typeParameters = typeParameters;
|
|
60749
60751
|
sig.parameters = parameters;
|
|
@@ -75788,78 +75790,41 @@ function createTypeChecker(host) {
|
|
|
75788
75790
|
return mapType(
|
|
75789
75791
|
type,
|
|
75790
75792
|
(t) => {
|
|
75791
|
-
|
|
75792
|
-
|
|
75793
|
-
|
|
75794
|
-
|
|
75795
|
-
const
|
|
75796
|
-
|
|
75797
|
-
|
|
75798
|
-
|
|
75799
|
-
|
|
75800
|
-
|
|
75801
|
-
|
|
75802
|
-
|
|
75803
|
-
}
|
|
75804
|
-
const typeOfConcreteProperty = getTypeOfConcretePropertyOfContextualType(t2);
|
|
75805
|
-
if (typeOfConcreteProperty) {
|
|
75806
|
-
concretePropertyTypes = append(concretePropertyTypes, typeOfConcreteProperty);
|
|
75807
|
-
continue;
|
|
75808
|
-
}
|
|
75809
|
-
applicableIndexInfoCandidates = append(applicableIndexInfoCandidates, t2);
|
|
75810
|
-
}
|
|
75811
|
-
if (concretePropertyTypes) {
|
|
75812
|
-
return getIntersectionType(concatenate(concretePropertyTypes, applicableIndexedMappedTypeSubstitions));
|
|
75793
|
+
var _a;
|
|
75794
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
75795
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
75796
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
75797
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
75798
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
75799
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
75800
|
+
}
|
|
75801
|
+
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
75802
|
+
const prop = getPropertyOfType(t, name);
|
|
75803
|
+
if (prop) {
|
|
75804
|
+
return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop.flags & 16777216 /* Optional */));
|
|
75813
75805
|
}
|
|
75814
|
-
|
|
75815
|
-
|
|
75816
|
-
|
|
75806
|
+
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
75807
|
+
const restType = getElementTypeOfSliceOfTupleType(
|
|
75808
|
+
t,
|
|
75809
|
+
t.target.fixedLength,
|
|
75810
|
+
/*endSkipCount*/
|
|
75811
|
+
0,
|
|
75812
|
+
/*writing*/
|
|
75813
|
+
false,
|
|
75814
|
+
/*noReductions*/
|
|
75815
|
+
true
|
|
75816
|
+
);
|
|
75817
|
+
if (restType) {
|
|
75818
|
+
return restType;
|
|
75819
|
+
}
|
|
75817
75820
|
}
|
|
75818
|
-
return void 0;
|
|
75821
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
75819
75822
|
}
|
|
75820
|
-
return
|
|
75823
|
+
return void 0;
|
|
75821
75824
|
},
|
|
75822
75825
|
/*noReductions*/
|
|
75823
75826
|
true
|
|
75824
75827
|
);
|
|
75825
|
-
function getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t) {
|
|
75826
|
-
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
75827
|
-
const constraint = getConstraintTypeFromMappedType(t);
|
|
75828
|
-
if (constraint.flags & 16777216 /* Conditional */ && getReducedType(getTrueTypeFromConditionalType(constraint)).flags & 131072 /* Never */ && isTypeAssignableTo(propertyNameType, constraint.extendsType)) {
|
|
75829
|
-
return void 0;
|
|
75830
|
-
}
|
|
75831
|
-
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
75832
|
-
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
75833
|
-
return substituteIndexedMappedType(t, propertyNameType);
|
|
75834
|
-
}
|
|
75835
|
-
return void 0;
|
|
75836
|
-
}
|
|
75837
|
-
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
75838
|
-
const prop = getPropertyOfType(t, name);
|
|
75839
|
-
if (prop) {
|
|
75840
|
-
return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop.flags & 16777216 /* Optional */));
|
|
75841
|
-
}
|
|
75842
|
-
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
75843
|
-
const restType = getElementTypeOfSliceOfTupleType(
|
|
75844
|
-
t,
|
|
75845
|
-
t.target.fixedLength,
|
|
75846
|
-
/*endSkipCount*/
|
|
75847
|
-
0,
|
|
75848
|
-
/*writing*/
|
|
75849
|
-
false,
|
|
75850
|
-
/*noReductions*/
|
|
75851
|
-
true
|
|
75852
|
-
);
|
|
75853
|
-
if (restType) {
|
|
75854
|
-
return restType;
|
|
75855
|
-
}
|
|
75856
|
-
}
|
|
75857
|
-
return void 0;
|
|
75858
|
-
}
|
|
75859
|
-
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
75860
|
-
var _a;
|
|
75861
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
|
|
75862
|
-
}
|
|
75863
75828
|
}
|
|
75864
75829
|
function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
|
|
75865
75830
|
Debug.assert(isObjectLiteralMethod(node));
|
|
@@ -171150,11 +171115,8 @@ function provideInlayHints(context) {
|
|
|
171150
171115
|
if (!args || !args.length) {
|
|
171151
171116
|
return;
|
|
171152
171117
|
}
|
|
171153
|
-
const
|
|
171154
|
-
|
|
171155
|
-
if (!signature || !candidates.length) {
|
|
171156
|
-
return;
|
|
171157
|
-
}
|
|
171118
|
+
const signature = checker.getResolvedSignature(expr);
|
|
171119
|
+
if (signature === void 0) return;
|
|
171158
171120
|
let signatureParamPos = 0;
|
|
171159
171121
|
for (const originalArg of args) {
|
|
171160
171122
|
const arg = skipParentheses(originalArg);
|
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.6.0-pr-
|
|
5
|
+
"version": "5.6.0-pr-59504-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|