@typescript-deploys/pr-build 5.6.0-pr-58514-9 → 5.6.0-pr-58824-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 +11 -10
- package/lib/typescript.js +11 -10
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -19189,7 +19189,7 @@ function createNameResolver({
|
|
|
19189
19189
|
}
|
|
19190
19190
|
break;
|
|
19191
19191
|
}
|
|
19192
|
-
if (isSelfReferenceLocation(location
|
|
19192
|
+
if (isSelfReferenceLocation(location)) {
|
|
19193
19193
|
lastSelfReferenceLocation = location;
|
|
19194
19194
|
}
|
|
19195
19195
|
lastLocation = location;
|
|
@@ -19290,10 +19290,8 @@ function createNameResolver({
|
|
|
19290
19290
|
}
|
|
19291
19291
|
return !getImmediatelyInvokedFunctionExpression(location);
|
|
19292
19292
|
}
|
|
19293
|
-
function isSelfReferenceLocation(node
|
|
19293
|
+
function isSelfReferenceLocation(node) {
|
|
19294
19294
|
switch (node.kind) {
|
|
19295
|
-
case 169 /* Parameter */:
|
|
19296
|
-
return !!lastLocation && lastLocation === node.name;
|
|
19297
19295
|
case 262 /* FunctionDeclaration */:
|
|
19298
19296
|
case 263 /* ClassDeclaration */:
|
|
19299
19297
|
case 264 /* InterfaceDeclaration */:
|
|
@@ -53853,7 +53851,7 @@ function createTypeChecker(host) {
|
|
|
53853
53851
|
}
|
|
53854
53852
|
}
|
|
53855
53853
|
function pushTypeResolution(target, propertyName) {
|
|
53856
|
-
const resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName);
|
|
53854
|
+
const resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName, resolutionStart);
|
|
53857
53855
|
if (resolutionCycleStartIndex >= 0) {
|
|
53858
53856
|
const { length: length2 } = resolutionTargets;
|
|
53859
53857
|
for (let i = resolutionCycleStartIndex; i < length2; i++) {
|
|
@@ -53869,8 +53867,11 @@ function createTypeChecker(host) {
|
|
|
53869
53867
|
resolutionPropertyNames.push(propertyName);
|
|
53870
53868
|
return true;
|
|
53871
53869
|
}
|
|
53872
|
-
function
|
|
53873
|
-
|
|
53870
|
+
function isInResolutionStack(target, propertyName) {
|
|
53871
|
+
return findResolutionCycleStartIndex(target, propertyName, 0) >= 0;
|
|
53872
|
+
}
|
|
53873
|
+
function findResolutionCycleStartIndex(target, propertyName, start) {
|
|
53874
|
+
for (let i = resolutionTargets.length - 1; i >= start; i--) {
|
|
53874
53875
|
if (resolutionTargetHasProperty(resolutionTargets[i], resolutionPropertyNames[i])) {
|
|
53875
53876
|
return -1;
|
|
53876
53877
|
}
|
|
@@ -57926,7 +57927,7 @@ function createTypeChecker(host) {
|
|
|
57926
57927
|
return getReturnTypeOfTypeTag(declaration);
|
|
57927
57928
|
}
|
|
57928
57929
|
function isResolvingReturnTypeOfSignature(signature) {
|
|
57929
|
-
return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType &&
|
|
57930
|
+
return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && isInResolutionStack(signature, 3 /* ResolvedReturnType */);
|
|
57930
57931
|
}
|
|
57931
57932
|
function getRestTypeOfSignature(signature) {
|
|
57932
57933
|
return tryGetRestTypeOfSignature(signature) || anyType;
|
|
@@ -61551,7 +61552,7 @@ function createTypeChecker(host) {
|
|
|
61551
61552
|
if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) {
|
|
61552
61553
|
if (!type.declaration.nameType) {
|
|
61553
61554
|
let constraint;
|
|
61554
|
-
if (isArrayType(t) || t.flags & 1 /* Any */ &&
|
|
61555
|
+
if (isArrayType(t) || t.flags & 1 /* Any */ && !isInResolutionStack(typeVariable, 4 /* ImmediateBaseConstraint */) && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) {
|
|
61555
61556
|
return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper));
|
|
61556
61557
|
}
|
|
61557
61558
|
if (isTupleType(t)) {
|
|
@@ -70914,7 +70915,7 @@ function createTypeChecker(host) {
|
|
|
70914
70915
|
return nameStr !== void 0 && getTypeOfPropertyOfContextualType(thisType, nameStr) || void 0;
|
|
70915
70916
|
}
|
|
70916
70917
|
function isCircularMappedProperty(symbol) {
|
|
70917
|
-
return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type &&
|
|
70918
|
+
return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type && isInResolutionStack(symbol, 0 /* Type */));
|
|
70918
70919
|
}
|
|
70919
70920
|
function getTypeOfPropertyOfContextualType(type, name, nameType) {
|
|
70920
70921
|
return mapType(
|
package/lib/typescript.js
CHANGED
|
@@ -23436,7 +23436,7 @@ function createNameResolver({
|
|
|
23436
23436
|
}
|
|
23437
23437
|
break;
|
|
23438
23438
|
}
|
|
23439
|
-
if (isSelfReferenceLocation(location
|
|
23439
|
+
if (isSelfReferenceLocation(location)) {
|
|
23440
23440
|
lastSelfReferenceLocation = location;
|
|
23441
23441
|
}
|
|
23442
23442
|
lastLocation = location;
|
|
@@ -23537,10 +23537,8 @@ function createNameResolver({
|
|
|
23537
23537
|
}
|
|
23538
23538
|
return !getImmediatelyInvokedFunctionExpression(location);
|
|
23539
23539
|
}
|
|
23540
|
-
function isSelfReferenceLocation(node
|
|
23540
|
+
function isSelfReferenceLocation(node) {
|
|
23541
23541
|
switch (node.kind) {
|
|
23542
|
-
case 169 /* Parameter */:
|
|
23543
|
-
return !!lastLocation && lastLocation === node.name;
|
|
23544
23542
|
case 262 /* FunctionDeclaration */:
|
|
23545
23543
|
case 263 /* ClassDeclaration */:
|
|
23546
23544
|
case 264 /* InterfaceDeclaration */:
|
|
@@ -58626,7 +58624,7 @@ function createTypeChecker(host) {
|
|
|
58626
58624
|
}
|
|
58627
58625
|
}
|
|
58628
58626
|
function pushTypeResolution(target, propertyName) {
|
|
58629
|
-
const resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName);
|
|
58627
|
+
const resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName, resolutionStart);
|
|
58630
58628
|
if (resolutionCycleStartIndex >= 0) {
|
|
58631
58629
|
const { length: length2 } = resolutionTargets;
|
|
58632
58630
|
for (let i = resolutionCycleStartIndex; i < length2; i++) {
|
|
@@ -58642,8 +58640,11 @@ function createTypeChecker(host) {
|
|
|
58642
58640
|
resolutionPropertyNames.push(propertyName);
|
|
58643
58641
|
return true;
|
|
58644
58642
|
}
|
|
58645
|
-
function
|
|
58646
|
-
|
|
58643
|
+
function isInResolutionStack(target, propertyName) {
|
|
58644
|
+
return findResolutionCycleStartIndex(target, propertyName, 0) >= 0;
|
|
58645
|
+
}
|
|
58646
|
+
function findResolutionCycleStartIndex(target, propertyName, start) {
|
|
58647
|
+
for (let i = resolutionTargets.length - 1; i >= start; i--) {
|
|
58647
58648
|
if (resolutionTargetHasProperty(resolutionTargets[i], resolutionPropertyNames[i])) {
|
|
58648
58649
|
return -1;
|
|
58649
58650
|
}
|
|
@@ -62699,7 +62700,7 @@ function createTypeChecker(host) {
|
|
|
62699
62700
|
return getReturnTypeOfTypeTag(declaration);
|
|
62700
62701
|
}
|
|
62701
62702
|
function isResolvingReturnTypeOfSignature(signature) {
|
|
62702
|
-
return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType &&
|
|
62703
|
+
return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && isInResolutionStack(signature, 3 /* ResolvedReturnType */);
|
|
62703
62704
|
}
|
|
62704
62705
|
function getRestTypeOfSignature(signature) {
|
|
62705
62706
|
return tryGetRestTypeOfSignature(signature) || anyType;
|
|
@@ -66324,7 +66325,7 @@ function createTypeChecker(host) {
|
|
|
66324
66325
|
if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) {
|
|
66325
66326
|
if (!type.declaration.nameType) {
|
|
66326
66327
|
let constraint;
|
|
66327
|
-
if (isArrayType(t) || t.flags & 1 /* Any */ &&
|
|
66328
|
+
if (isArrayType(t) || t.flags & 1 /* Any */ && !isInResolutionStack(typeVariable, 4 /* ImmediateBaseConstraint */) && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) {
|
|
66328
66329
|
return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper));
|
|
66329
66330
|
}
|
|
66330
66331
|
if (isTupleType(t)) {
|
|
@@ -75687,7 +75688,7 @@ function createTypeChecker(host) {
|
|
|
75687
75688
|
return nameStr !== void 0 && getTypeOfPropertyOfContextualType(thisType, nameStr) || void 0;
|
|
75688
75689
|
}
|
|
75689
75690
|
function isCircularMappedProperty(symbol) {
|
|
75690
|
-
return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type &&
|
|
75691
|
+
return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type && isInResolutionStack(symbol, 0 /* Type */));
|
|
75691
75692
|
}
|
|
75692
75693
|
function getTypeOfPropertyOfContextualType(type, name, nameType) {
|
|
75693
75694
|
return mapType(
|
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-58824-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|