@typescript-deploys/pr-build 5.9.0-pr-54183-44 → 5.9.0-pr-61739-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 +28 -31
- package/lib/typescript.js +29 -32
- 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.9";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20250520`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -46497,7 +46497,7 @@ function createTypeChecker(host) {
|
|
|
46497
46497
|
void 0
|
|
46498
46498
|
);
|
|
46499
46499
|
},
|
|
46500
|
-
|
|
46500
|
+
isContextSensitive,
|
|
46501
46501
|
getTypeOfPropertyOfContextualType,
|
|
46502
46502
|
getFullyQualifiedName,
|
|
46503
46503
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
@@ -50464,7 +50464,7 @@ function createTypeChecker(host) {
|
|
|
50464
50464
|
);
|
|
50465
50465
|
}
|
|
50466
50466
|
function symbolValueDeclarationIsContextSensitive(symbol) {
|
|
50467
|
-
return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !
|
|
50467
|
+
return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);
|
|
50468
50468
|
}
|
|
50469
50469
|
function toNodeBuilderFlags(flags = 0 /* None */) {
|
|
50470
50470
|
return flags & 848330095 /* NodeBuilderFlagsMask */;
|
|
@@ -56691,7 +56691,7 @@ function createTypeChecker(host) {
|
|
|
56691
56691
|
case 200 /* MappedType */:
|
|
56692
56692
|
case 194 /* ConditionalType */: {
|
|
56693
56693
|
const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
56694
|
-
if ((kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || isObjectLiteralMethod(node)) &&
|
|
56694
|
+
if ((kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || isObjectLiteralMethod(node)) && isContextSensitive(node)) {
|
|
56695
56695
|
const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfDeclaration(node)), 0 /* Call */));
|
|
56696
56696
|
if (signature && signature.typeParameters) {
|
|
56697
56697
|
return [...outerTypeParameters || emptyArray, ...signature.typeParameters];
|
|
@@ -63458,47 +63458,39 @@ function createTypeChecker(host) {
|
|
|
63458
63458
|
function instantiateIndexInfo(info, mapper) {
|
|
63459
63459
|
return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration, info.components);
|
|
63460
63460
|
}
|
|
63461
|
-
function
|
|
63461
|
+
function isContextSensitive(node) {
|
|
63462
63462
|
Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node));
|
|
63463
63463
|
switch (node.kind) {
|
|
63464
63464
|
case 218 /* FunctionExpression */:
|
|
63465
63465
|
case 219 /* ArrowFunction */:
|
|
63466
63466
|
case 174 /* MethodDeclaration */:
|
|
63467
63467
|
case 262 /* FunctionDeclaration */:
|
|
63468
|
-
|
|
63469
|
-
case 214 /* NewExpression */:
|
|
63470
|
-
return predicate(node);
|
|
63468
|
+
return isContextSensitiveFunctionLikeDeclaration(node);
|
|
63471
63469
|
case 210 /* ObjectLiteralExpression */:
|
|
63472
|
-
return some(node.properties,
|
|
63470
|
+
return some(node.properties, isContextSensitive);
|
|
63473
63471
|
case 209 /* ArrayLiteralExpression */:
|
|
63474
|
-
return some(node.elements,
|
|
63472
|
+
return some(node.elements, isContextSensitive);
|
|
63475
63473
|
case 227 /* ConditionalExpression */:
|
|
63476
|
-
return
|
|
63474
|
+
return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse);
|
|
63477
63475
|
case 226 /* BinaryExpression */:
|
|
63478
|
-
return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (
|
|
63476
|
+
return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right));
|
|
63479
63477
|
case 303 /* PropertyAssignment */:
|
|
63480
|
-
return
|
|
63478
|
+
return isContextSensitive(node.initializer);
|
|
63481
63479
|
case 217 /* ParenthesizedExpression */:
|
|
63482
|
-
return
|
|
63480
|
+
return isContextSensitive(node.expression);
|
|
63483
63481
|
case 292 /* JsxAttributes */:
|
|
63484
|
-
return some(node.properties,
|
|
63482
|
+
return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive);
|
|
63485
63483
|
case 291 /* JsxAttribute */: {
|
|
63486
63484
|
const { initializer } = node;
|
|
63487
|
-
return !!initializer &&
|
|
63485
|
+
return !!initializer && isContextSensitive(initializer);
|
|
63488
63486
|
}
|
|
63489
63487
|
case 294 /* JsxExpression */: {
|
|
63490
63488
|
const { expression } = node;
|
|
63491
|
-
return !!expression &&
|
|
63489
|
+
return !!expression && isContextSensitive(expression);
|
|
63492
63490
|
}
|
|
63493
63491
|
}
|
|
63494
63492
|
return false;
|
|
63495
63493
|
}
|
|
63496
|
-
function containsContextSensitive(node) {
|
|
63497
|
-
return containsContextRelatedNode(node, isContextSensitiveFunctionOrObjectLiteralMethod);
|
|
63498
|
-
}
|
|
63499
|
-
function containsContextSensitiveOrCallOrNewExpression(node) {
|
|
63500
|
-
return containsContextRelatedNode(node, (n) => isContextSensitiveFunctionOrObjectLiteralMethod(n) || isCallOrNewExpression(n));
|
|
63501
|
-
}
|
|
63502
63494
|
function isContextSensitiveFunctionLikeDeclaration(node) {
|
|
63503
63495
|
return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node);
|
|
63504
63496
|
}
|
|
@@ -63507,9 +63499,9 @@ function createTypeChecker(host) {
|
|
|
63507
63499
|
return false;
|
|
63508
63500
|
}
|
|
63509
63501
|
if (node.body.kind !== 241 /* Block */) {
|
|
63510
|
-
return
|
|
63502
|
+
return isContextSensitive(node.body);
|
|
63511
63503
|
}
|
|
63512
|
-
return !!forEachReturnStatement(node.body, (statement) => !!statement.expression &&
|
|
63504
|
+
return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression));
|
|
63513
63505
|
}
|
|
63514
63506
|
function isContextSensitiveFunctionOrObjectLiteralMethod(func) {
|
|
63515
63507
|
return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func);
|
|
@@ -73570,7 +73562,7 @@ function createTypeChecker(host) {
|
|
|
73570
73562
|
hasOmittedExpression
|
|
73571
73563
|
));
|
|
73572
73564
|
elementFlags.push(hasOmittedExpression ? 2 /* Optional */ : 1 /* Required */);
|
|
73573
|
-
if (inTupleContext && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) &&
|
|
73565
|
+
if (inTupleContext && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(e)) {
|
|
73574
73566
|
const inferenceContext = getInferenceContext(node);
|
|
73575
73567
|
Debug.assert(inferenceContext);
|
|
73576
73568
|
addIntraExpressionInferenceSite(inferenceContext, e, type);
|
|
@@ -73769,7 +73761,7 @@ function createTypeChecker(host) {
|
|
|
73769
73761
|
prop.links.target = member;
|
|
73770
73762
|
member = prop;
|
|
73771
73763
|
allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
|
|
73772
|
-
if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) &&
|
|
73764
|
+
if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) {
|
|
73773
73765
|
const inferenceContext = getInferenceContext(node);
|
|
73774
73766
|
Debug.assert(inferenceContext);
|
|
73775
73767
|
const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl;
|
|
@@ -73947,7 +73939,7 @@ function createTypeChecker(host) {
|
|
|
73947
73939
|
addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText);
|
|
73948
73940
|
}
|
|
73949
73941
|
}
|
|
73950
|
-
if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) &&
|
|
73942
|
+
if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(attributeDecl)) {
|
|
73951
73943
|
const inferenceContext = getInferenceContext(attributes);
|
|
73952
73944
|
Debug.assert(inferenceContext);
|
|
73953
73945
|
const inferenceNode = attributeDecl.initializer.expression;
|
|
@@ -76181,7 +76173,7 @@ function createTypeChecker(host) {
|
|
|
76181
76173
|
}
|
|
76182
76174
|
const args = getEffectiveCallArguments(node);
|
|
76183
76175
|
const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
|
|
76184
|
-
if (!isDecorator2 && !isSingleNonGenericCandidate && some(args,
|
|
76176
|
+
if (!isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive)) {
|
|
76185
76177
|
argCheckMode = 4 /* SkipContextSensitive */;
|
|
76186
76178
|
}
|
|
76187
76179
|
const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma;
|
|
@@ -78681,7 +78673,7 @@ function createTypeChecker(host) {
|
|
|
78681
78673
|
if (isFunctionExpression(node)) {
|
|
78682
78674
|
checkCollisionsForDeclarationName(node, node.name);
|
|
78683
78675
|
}
|
|
78684
|
-
if (checkMode && checkMode & 4 /* SkipContextSensitive */ &&
|
|
78676
|
+
if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) {
|
|
78685
78677
|
if (!getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) {
|
|
78686
78678
|
const contextualSignature = getContextualSignature(node);
|
|
78687
78679
|
if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) {
|
|
@@ -78728,7 +78720,7 @@ function createTypeChecker(host) {
|
|
|
78728
78720
|
if (!signature) {
|
|
78729
78721
|
return;
|
|
78730
78722
|
}
|
|
78731
|
-
if (
|
|
78723
|
+
if (isContextSensitive(node)) {
|
|
78732
78724
|
if (contextualSignature) {
|
|
78733
78725
|
const inferenceContext = getInferenceContext(node);
|
|
78734
78726
|
let instantiatedContextualSignature;
|
|
@@ -121870,6 +121862,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
121870
121862
|
let projectReferenceRedirects;
|
|
121871
121863
|
let mapFromFileToProjectReferenceRedirects;
|
|
121872
121864
|
let mapFromToProjectReferenceRedirectSource;
|
|
121865
|
+
let hasResolvedReferencencesInNodeModules = false;
|
|
121873
121866
|
const useSourceOfProjectReferenceRedirect = !!((_d = host.useSourceOfProjectReferenceRedirect) == null ? void 0 : _d.call(host)) && !options.disableSourceOfProjectReferenceRedirect;
|
|
121874
121867
|
const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({
|
|
121875
121868
|
compilerHost: host,
|
|
@@ -123612,6 +123605,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123612
123605
|
}
|
|
123613
123606
|
function getSourceOfProjectReferenceRedirect(path) {
|
|
123614
123607
|
if (!isDeclarationFileName(path)) return void 0;
|
|
123608
|
+
if (!hasResolvedReferencencesInNodeModules && pathContainsNodeModules(path)) return void 0;
|
|
123615
123609
|
if (mapFromToProjectReferenceRedirectSource === void 0) {
|
|
123616
123610
|
mapFromToProjectReferenceRedirectSource = /* @__PURE__ */ new Map();
|
|
123617
123611
|
forEachResolvedProjectReference2((resolvedRef) => {
|
|
@@ -123909,6 +123903,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123909
123903
|
sourceFile.path = sourceFilePath;
|
|
123910
123904
|
sourceFile.resolvedPath = sourceFilePath;
|
|
123911
123905
|
sourceFile.originalFileName = refPath;
|
|
123906
|
+
if (!hasResolvedReferencencesInNodeModules && (pathContainsNodeModules(sourceFile.resolvedPath) || pathContainsNodeModules(sourceFile.path))) {
|
|
123907
|
+
hasResolvedReferencencesInNodeModules = true;
|
|
123908
|
+
}
|
|
123912
123909
|
const resolvedRef = { commandLine, sourceFile };
|
|
123913
123910
|
projectReferenceRedirects.set(sourceFilePath, resolvedRef);
|
|
123914
123911
|
if (commandLine.projectReferences) {
|
package/lib/typescript.js
CHANGED
|
@@ -2286,7 +2286,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2286
2286
|
|
|
2287
2287
|
// src/compiler/corePublic.ts
|
|
2288
2288
|
var versionMajorMinor = "5.9";
|
|
2289
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2289
|
+
var version = `${versionMajorMinor}.0-insiders.20250520`;
|
|
2290
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2291
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2292
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -51109,7 +51109,7 @@ function createTypeChecker(host) {
|
|
|
51109
51109
|
void 0
|
|
51110
51110
|
);
|
|
51111
51111
|
},
|
|
51112
|
-
|
|
51112
|
+
isContextSensitive,
|
|
51113
51113
|
getTypeOfPropertyOfContextualType,
|
|
51114
51114
|
getFullyQualifiedName,
|
|
51115
51115
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
@@ -55076,7 +55076,7 @@ function createTypeChecker(host) {
|
|
|
55076
55076
|
);
|
|
55077
55077
|
}
|
|
55078
55078
|
function symbolValueDeclarationIsContextSensitive(symbol) {
|
|
55079
|
-
return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !
|
|
55079
|
+
return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);
|
|
55080
55080
|
}
|
|
55081
55081
|
function toNodeBuilderFlags(flags = 0 /* None */) {
|
|
55082
55082
|
return flags & 848330095 /* NodeBuilderFlagsMask */;
|
|
@@ -61303,7 +61303,7 @@ function createTypeChecker(host) {
|
|
|
61303
61303
|
case 200 /* MappedType */:
|
|
61304
61304
|
case 194 /* ConditionalType */: {
|
|
61305
61305
|
const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
61306
|
-
if ((kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || isObjectLiteralMethod(node)) &&
|
|
61306
|
+
if ((kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || isObjectLiteralMethod(node)) && isContextSensitive(node)) {
|
|
61307
61307
|
const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfDeclaration(node)), 0 /* Call */));
|
|
61308
61308
|
if (signature && signature.typeParameters) {
|
|
61309
61309
|
return [...outerTypeParameters || emptyArray, ...signature.typeParameters];
|
|
@@ -68070,47 +68070,39 @@ function createTypeChecker(host) {
|
|
|
68070
68070
|
function instantiateIndexInfo(info, mapper) {
|
|
68071
68071
|
return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration, info.components);
|
|
68072
68072
|
}
|
|
68073
|
-
function
|
|
68073
|
+
function isContextSensitive(node) {
|
|
68074
68074
|
Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node));
|
|
68075
68075
|
switch (node.kind) {
|
|
68076
68076
|
case 218 /* FunctionExpression */:
|
|
68077
68077
|
case 219 /* ArrowFunction */:
|
|
68078
68078
|
case 174 /* MethodDeclaration */:
|
|
68079
68079
|
case 262 /* FunctionDeclaration */:
|
|
68080
|
-
|
|
68081
|
-
case 214 /* NewExpression */:
|
|
68082
|
-
return predicate(node);
|
|
68080
|
+
return isContextSensitiveFunctionLikeDeclaration(node);
|
|
68083
68081
|
case 210 /* ObjectLiteralExpression */:
|
|
68084
|
-
return some(node.properties,
|
|
68082
|
+
return some(node.properties, isContextSensitive);
|
|
68085
68083
|
case 209 /* ArrayLiteralExpression */:
|
|
68086
|
-
return some(node.elements,
|
|
68084
|
+
return some(node.elements, isContextSensitive);
|
|
68087
68085
|
case 227 /* ConditionalExpression */:
|
|
68088
|
-
return
|
|
68086
|
+
return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse);
|
|
68089
68087
|
case 226 /* BinaryExpression */:
|
|
68090
|
-
return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (
|
|
68088
|
+
return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right));
|
|
68091
68089
|
case 303 /* PropertyAssignment */:
|
|
68092
|
-
return
|
|
68090
|
+
return isContextSensitive(node.initializer);
|
|
68093
68091
|
case 217 /* ParenthesizedExpression */:
|
|
68094
|
-
return
|
|
68092
|
+
return isContextSensitive(node.expression);
|
|
68095
68093
|
case 292 /* JsxAttributes */:
|
|
68096
|
-
return some(node.properties,
|
|
68094
|
+
return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive);
|
|
68097
68095
|
case 291 /* JsxAttribute */: {
|
|
68098
68096
|
const { initializer } = node;
|
|
68099
|
-
return !!initializer &&
|
|
68097
|
+
return !!initializer && isContextSensitive(initializer);
|
|
68100
68098
|
}
|
|
68101
68099
|
case 294 /* JsxExpression */: {
|
|
68102
68100
|
const { expression } = node;
|
|
68103
|
-
return !!expression &&
|
|
68101
|
+
return !!expression && isContextSensitive(expression);
|
|
68104
68102
|
}
|
|
68105
68103
|
}
|
|
68106
68104
|
return false;
|
|
68107
68105
|
}
|
|
68108
|
-
function containsContextSensitive(node) {
|
|
68109
|
-
return containsContextRelatedNode(node, isContextSensitiveFunctionOrObjectLiteralMethod);
|
|
68110
|
-
}
|
|
68111
|
-
function containsContextSensitiveOrCallOrNewExpression(node) {
|
|
68112
|
-
return containsContextRelatedNode(node, (n) => isContextSensitiveFunctionOrObjectLiteralMethod(n) || isCallOrNewExpression(n));
|
|
68113
|
-
}
|
|
68114
68106
|
function isContextSensitiveFunctionLikeDeclaration(node) {
|
|
68115
68107
|
return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node);
|
|
68116
68108
|
}
|
|
@@ -68119,9 +68111,9 @@ function createTypeChecker(host) {
|
|
|
68119
68111
|
return false;
|
|
68120
68112
|
}
|
|
68121
68113
|
if (node.body.kind !== 241 /* Block */) {
|
|
68122
|
-
return
|
|
68114
|
+
return isContextSensitive(node.body);
|
|
68123
68115
|
}
|
|
68124
|
-
return !!forEachReturnStatement(node.body, (statement) => !!statement.expression &&
|
|
68116
|
+
return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression));
|
|
68125
68117
|
}
|
|
68126
68118
|
function isContextSensitiveFunctionOrObjectLiteralMethod(func) {
|
|
68127
68119
|
return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func);
|
|
@@ -78182,7 +78174,7 @@ function createTypeChecker(host) {
|
|
|
78182
78174
|
hasOmittedExpression
|
|
78183
78175
|
));
|
|
78184
78176
|
elementFlags.push(hasOmittedExpression ? 2 /* Optional */ : 1 /* Required */);
|
|
78185
|
-
if (inTupleContext && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) &&
|
|
78177
|
+
if (inTupleContext && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(e)) {
|
|
78186
78178
|
const inferenceContext = getInferenceContext(node);
|
|
78187
78179
|
Debug.assert(inferenceContext);
|
|
78188
78180
|
addIntraExpressionInferenceSite(inferenceContext, e, type);
|
|
@@ -78381,7 +78373,7 @@ function createTypeChecker(host) {
|
|
|
78381
78373
|
prop.links.target = member;
|
|
78382
78374
|
member = prop;
|
|
78383
78375
|
allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
|
|
78384
|
-
if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) &&
|
|
78376
|
+
if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) {
|
|
78385
78377
|
const inferenceContext = getInferenceContext(node);
|
|
78386
78378
|
Debug.assert(inferenceContext);
|
|
78387
78379
|
const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl;
|
|
@@ -78559,7 +78551,7 @@ function createTypeChecker(host) {
|
|
|
78559
78551
|
addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText);
|
|
78560
78552
|
}
|
|
78561
78553
|
}
|
|
78562
|
-
if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) &&
|
|
78554
|
+
if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(attributeDecl)) {
|
|
78563
78555
|
const inferenceContext = getInferenceContext(attributes);
|
|
78564
78556
|
Debug.assert(inferenceContext);
|
|
78565
78557
|
const inferenceNode = attributeDecl.initializer.expression;
|
|
@@ -80793,7 +80785,7 @@ function createTypeChecker(host) {
|
|
|
80793
80785
|
}
|
|
80794
80786
|
const args = getEffectiveCallArguments(node);
|
|
80795
80787
|
const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
|
|
80796
|
-
if (!isDecorator2 && !isSingleNonGenericCandidate && some(args,
|
|
80788
|
+
if (!isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive)) {
|
|
80797
80789
|
argCheckMode = 4 /* SkipContextSensitive */;
|
|
80798
80790
|
}
|
|
80799
80791
|
const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma;
|
|
@@ -83293,7 +83285,7 @@ function createTypeChecker(host) {
|
|
|
83293
83285
|
if (isFunctionExpression(node)) {
|
|
83294
83286
|
checkCollisionsForDeclarationName(node, node.name);
|
|
83295
83287
|
}
|
|
83296
|
-
if (checkMode && checkMode & 4 /* SkipContextSensitive */ &&
|
|
83288
|
+
if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) {
|
|
83297
83289
|
if (!getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) {
|
|
83298
83290
|
const contextualSignature = getContextualSignature(node);
|
|
83299
83291
|
if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) {
|
|
@@ -83340,7 +83332,7 @@ function createTypeChecker(host) {
|
|
|
83340
83332
|
if (!signature) {
|
|
83341
83333
|
return;
|
|
83342
83334
|
}
|
|
83343
|
-
if (
|
|
83335
|
+
if (isContextSensitive(node)) {
|
|
83344
83336
|
if (contextualSignature) {
|
|
83345
83337
|
const inferenceContext = getInferenceContext(node);
|
|
83346
83338
|
let instantiatedContextualSignature;
|
|
@@ -126721,6 +126713,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
126721
126713
|
let projectReferenceRedirects;
|
|
126722
126714
|
let mapFromFileToProjectReferenceRedirects;
|
|
126723
126715
|
let mapFromToProjectReferenceRedirectSource;
|
|
126716
|
+
let hasResolvedReferencencesInNodeModules = false;
|
|
126724
126717
|
const useSourceOfProjectReferenceRedirect = !!((_d = host.useSourceOfProjectReferenceRedirect) == null ? void 0 : _d.call(host)) && !options.disableSourceOfProjectReferenceRedirect;
|
|
126725
126718
|
const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({
|
|
126726
126719
|
compilerHost: host,
|
|
@@ -128463,6 +128456,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128463
128456
|
}
|
|
128464
128457
|
function getSourceOfProjectReferenceRedirect(path) {
|
|
128465
128458
|
if (!isDeclarationFileName(path)) return void 0;
|
|
128459
|
+
if (!hasResolvedReferencencesInNodeModules && pathContainsNodeModules(path)) return void 0;
|
|
128466
128460
|
if (mapFromToProjectReferenceRedirectSource === void 0) {
|
|
128467
128461
|
mapFromToProjectReferenceRedirectSource = /* @__PURE__ */ new Map();
|
|
128468
128462
|
forEachResolvedProjectReference2((resolvedRef) => {
|
|
@@ -128760,6 +128754,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128760
128754
|
sourceFile.path = sourceFilePath;
|
|
128761
128755
|
sourceFile.resolvedPath = sourceFilePath;
|
|
128762
128756
|
sourceFile.originalFileName = refPath;
|
|
128757
|
+
if (!hasResolvedReferencencesInNodeModules && (pathContainsNodeModules(sourceFile.resolvedPath) || pathContainsNodeModules(sourceFile.path))) {
|
|
128758
|
+
hasResolvedReferencencesInNodeModules = true;
|
|
128759
|
+
}
|
|
128763
128760
|
const resolvedRef = { commandLine, sourceFile };
|
|
128764
128761
|
projectReferenceRedirects.set(sourceFilePath, resolvedRef);
|
|
128765
128762
|
if (commandLine.projectReferences) {
|
|
@@ -150450,7 +150447,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont
|
|
|
150450
150447
|
const file = scope.getSourceFile();
|
|
150451
150448
|
const localNameText = getIdentifierForNode(node, scope, checker, file);
|
|
150452
150449
|
const isJS = isInJSFile(scope);
|
|
150453
|
-
let variableType = isJS || !checker.
|
|
150450
|
+
let variableType = isJS || !checker.isContextSensitive(node) ? void 0 : checker.typeToTypeNode(checker.getContextualType(node), scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */);
|
|
150454
150451
|
let initializer = transformConstantInitializer(skipParentheses(node), substitutions);
|
|
150455
150452
|
({ variableType, initializer } = transformFunctionInitializerAndType(variableType, initializer));
|
|
150456
150453
|
suppressLeadingAndTrailingTrivia(initializer);
|
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.9.0-pr-
|
|
5
|
+
"version": "5.9.0-pr-61739-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|