@typescript-deploys/pr-build 5.6.0-pr-55887-60 → 5.6.0-pr-59316-5
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 +26 -41
- package/lib/typescript.d.ts +3 -2
- package/lib/typescript.js +31 -44
- 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.20240808`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -15313,7 +15313,7 @@ function skipTypeParentheses(node) {
|
|
|
15313
15313
|
return node;
|
|
15314
15314
|
}
|
|
15315
15315
|
function skipParentheses(node, excludeJSDocTypeAssertions) {
|
|
15316
|
-
const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ |
|
|
15316
|
+
const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | -2147483648 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */;
|
|
15317
15317
|
return skipOuterExpressions(node, flags);
|
|
15318
15318
|
}
|
|
15319
15319
|
function isDeleteTarget(node) {
|
|
@@ -17121,9 +17121,6 @@ function accessKind(node) {
|
|
|
17121
17121
|
return node === parent.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent.parent);
|
|
17122
17122
|
case 209 /* ArrayLiteralExpression */:
|
|
17123
17123
|
return accessKind(parent);
|
|
17124
|
-
case 249 /* ForInStatement */:
|
|
17125
|
-
case 250 /* ForOfStatement */:
|
|
17126
|
-
return node === parent.initializer ? 1 /* Write */ : 0 /* Read */;
|
|
17127
17124
|
default:
|
|
17128
17125
|
return 0 /* Read */;
|
|
17129
17126
|
}
|
|
@@ -23900,6 +23897,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
23900
23897
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
23901
23898
|
case 235 /* NonNullExpression */:
|
|
23902
23899
|
return updateNonNullExpression(outerExpression, expression);
|
|
23900
|
+
case 233 /* ExpressionWithTypeArguments */:
|
|
23901
|
+
return updateExpressionWithTypeArguments(outerExpression, expression, outerExpression.typeArguments);
|
|
23903
23902
|
case 354 /* PartiallyEmittedExpression */:
|
|
23904
23903
|
return updatePartiallyEmittedExpression(outerExpression, expression);
|
|
23905
23904
|
}
|
|
@@ -23907,7 +23906,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
23907
23906
|
function isIgnorableParen(node) {
|
|
23908
23907
|
return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node));
|
|
23909
23908
|
}
|
|
23910
|
-
function restoreOuterExpressions(outerExpression, innerExpression, kinds =
|
|
23909
|
+
function restoreOuterExpressions(outerExpression, innerExpression, kinds = 31 /* All */) {
|
|
23911
23910
|
if (outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) {
|
|
23912
23911
|
return updateOuterExpression(
|
|
23913
23912
|
outerExpression,
|
|
@@ -23953,7 +23952,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
23953
23952
|
}
|
|
23954
23953
|
}
|
|
23955
23954
|
function createCallBinding(expression, recordTempVariable, languageVersion, cacheIdentifiers = false) {
|
|
23956
|
-
const callee = skipOuterExpressions(expression,
|
|
23955
|
+
const callee = skipOuterExpressions(expression, 31 /* All */);
|
|
23957
23956
|
let thisArg;
|
|
23958
23957
|
let target;
|
|
23959
23958
|
if (isSuperProperty(callee)) {
|
|
@@ -26784,18 +26783,19 @@ function getJSDocTypeAssertionType(node) {
|
|
|
26784
26783
|
Debug.assertIsDefined(type);
|
|
26785
26784
|
return type;
|
|
26786
26785
|
}
|
|
26787
|
-
function isOuterExpression(node, kinds =
|
|
26786
|
+
function isOuterExpression(node, kinds = 31 /* All */) {
|
|
26788
26787
|
switch (node.kind) {
|
|
26789
26788
|
case 217 /* ParenthesizedExpression */:
|
|
26790
|
-
if (kinds &
|
|
26789
|
+
if (kinds & -2147483648 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) {
|
|
26791
26790
|
return false;
|
|
26792
26791
|
}
|
|
26793
26792
|
return (kinds & 1 /* Parentheses */) !== 0;
|
|
26794
26793
|
case 216 /* TypeAssertionExpression */:
|
|
26795
26794
|
case 234 /* AsExpression */:
|
|
26796
|
-
case 233 /* ExpressionWithTypeArguments */:
|
|
26797
26795
|
case 238 /* SatisfiesExpression */:
|
|
26798
26796
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
26797
|
+
case 233 /* ExpressionWithTypeArguments */:
|
|
26798
|
+
return (kinds & 16 /* ExpressionsWithTypeArguments */) !== 0;
|
|
26799
26799
|
case 235 /* NonNullExpression */:
|
|
26800
26800
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
26801
26801
|
case 354 /* PartiallyEmittedExpression */:
|
|
@@ -26803,13 +26803,13 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
26803
26803
|
}
|
|
26804
26804
|
return false;
|
|
26805
26805
|
}
|
|
26806
|
-
function skipOuterExpressions(node, kinds =
|
|
26806
|
+
function skipOuterExpressions(node, kinds = 31 /* All */) {
|
|
26807
26807
|
while (isOuterExpression(node, kinds)) {
|
|
26808
26808
|
node = node.expression;
|
|
26809
26809
|
}
|
|
26810
26810
|
return node;
|
|
26811
26811
|
}
|
|
26812
|
-
function walkUpOuterExpressions(node, kinds =
|
|
26812
|
+
function walkUpOuterExpressions(node, kinds = 31 /* All */) {
|
|
26813
26813
|
let parent = node.parent;
|
|
26814
26814
|
while (isOuterExpression(parent, kinds)) {
|
|
26815
26815
|
parent = parent.parent;
|
|
@@ -69615,12 +69615,6 @@ function createTypeChecker(host) {
|
|
|
69615
69615
|
function getControlFlowContainer(node) {
|
|
69616
69616
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 307 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
69617
69617
|
}
|
|
69618
|
-
function isSymbolAssignedDefinitely(symbol) {
|
|
69619
|
-
if (symbol.lastAssignmentPos !== void 0) {
|
|
69620
|
-
return symbol.lastAssignmentPos < 0;
|
|
69621
|
-
}
|
|
69622
|
-
return isSymbolAssigned(symbol) && symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0;
|
|
69623
|
-
}
|
|
69624
69618
|
function isSymbolAssigned(symbol) {
|
|
69625
69619
|
return !isPastLastAssignment(
|
|
69626
69620
|
symbol,
|
|
@@ -69640,7 +69634,7 @@ function createTypeChecker(host) {
|
|
|
69640
69634
|
markNodeAssignments(parent);
|
|
69641
69635
|
}
|
|
69642
69636
|
}
|
|
69643
|
-
return !symbol.lastAssignmentPos || location &&
|
|
69637
|
+
return !symbol.lastAssignmentPos || location && symbol.lastAssignmentPos < location.pos;
|
|
69644
69638
|
}
|
|
69645
69639
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
69646
69640
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -69661,19 +69655,12 @@ function createTypeChecker(host) {
|
|
|
69661
69655
|
function markNodeAssignments(node) {
|
|
69662
69656
|
switch (node.kind) {
|
|
69663
69657
|
case 80 /* Identifier */:
|
|
69664
|
-
|
|
69665
|
-
if (assigmentTarget !== 0 /* None */) {
|
|
69658
|
+
if (isAssignmentTarget(node)) {
|
|
69666
69659
|
const symbol = getResolvedSymbol(node);
|
|
69667
|
-
|
|
69668
|
-
|
|
69669
|
-
|
|
69670
|
-
|
|
69671
|
-
const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);
|
|
69672
|
-
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;
|
|
69673
|
-
}
|
|
69674
|
-
if (isDefiniteAssignment && symbol.lastAssignmentPos > 0) {
|
|
69675
|
-
symbol.lastAssignmentPos = -symbol.lastAssignmentPos;
|
|
69676
|
-
}
|
|
69660
|
+
if (isParameterOrMutableLocalVariable(symbol) && symbol.lastAssignmentPos !== Number.MAX_VALUE) {
|
|
69661
|
+
const referencingFunction = findAncestor(node, isFunctionOrSourceFile);
|
|
69662
|
+
const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);
|
|
69663
|
+
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;
|
|
69677
69664
|
}
|
|
69678
69665
|
}
|
|
69679
69666
|
return;
|
|
@@ -69690,8 +69677,7 @@ function createTypeChecker(host) {
|
|
|
69690
69677
|
true
|
|
69691
69678
|
);
|
|
69692
69679
|
if (symbol && isParameterOrMutableLocalVariable(symbol)) {
|
|
69693
|
-
|
|
69694
|
-
symbol.lastAssignmentPos = sign * Number.MAX_VALUE;
|
|
69680
|
+
symbol.lastAssignmentPos = Number.MAX_VALUE;
|
|
69695
69681
|
}
|
|
69696
69682
|
}
|
|
69697
69683
|
return;
|
|
@@ -69732,10 +69718,10 @@ function createTypeChecker(host) {
|
|
|
69732
69718
|
}
|
|
69733
69719
|
function isParameterOrMutableLocalVariable(symbol) {
|
|
69734
69720
|
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
69735
|
-
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(
|
|
69721
|
+
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(declaration)));
|
|
69736
69722
|
}
|
|
69737
|
-
function isMutableLocalVariableDeclaration(
|
|
69738
|
-
return !!(
|
|
69723
|
+
function isMutableLocalVariableDeclaration(declaration) {
|
|
69724
|
+
return !!(declaration.parent.flags & 1 /* Let */) && !(getCombinedModifierFlags(declaration) & 32 /* Export */ || declaration.parent.parent.kind === 243 /* VariableStatement */ && isGlobalSourceFile(declaration.parent.parent.parent));
|
|
69739
69725
|
}
|
|
69740
69726
|
function parameterInitializerContainsUndefined(declaration) {
|
|
69741
69727
|
const links = getNodeLinks(declaration);
|
|
@@ -70275,7 +70261,6 @@ function createTypeChecker(host) {
|
|
|
70275
70261
|
}
|
|
70276
70262
|
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
70277
70263
|
let declaration = localOrExportSymbol.valueDeclaration;
|
|
70278
|
-
const immediateDeclaration = declaration;
|
|
70279
70264
|
if (declaration && declaration.kind === 208 /* BindingElement */ && contains(contextualBindingPatterns, declaration.parent) && findAncestor(node, (parent) => parent === declaration.parent)) {
|
|
70280
70265
|
return nonInferrableAnyType;
|
|
70281
70266
|
}
|
|
@@ -70321,7 +70306,7 @@ function createTypeChecker(host) {
|
|
|
70321
70306
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {
|
|
70322
70307
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
70323
70308
|
}
|
|
70324
|
-
const assumeInitialized = isParameter2 || isAlias || isOuterVariable
|
|
70309
|
+
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */;
|
|
70325
70310
|
const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);
|
|
70326
70311
|
const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
70327
70312
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -71231,7 +71216,7 @@ function createTypeChecker(host) {
|
|
|
71231
71216
|
type,
|
|
71232
71217
|
(t) => {
|
|
71233
71218
|
var _a;
|
|
71234
|
-
if (isGenericMappedType(t) &&
|
|
71219
|
+
if (isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== 2 /* Remapping */) {
|
|
71235
71220
|
const constraint = getConstraintTypeFromMappedType(t);
|
|
71236
71221
|
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
71237
71222
|
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
@@ -77884,7 +77869,7 @@ function createTypeChecker(host) {
|
|
|
77884
77869
|
if (isBinaryExpression(right) && (right.operatorToken.kind === 57 /* BarBarToken */ || right.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) {
|
|
77885
77870
|
grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind));
|
|
77886
77871
|
}
|
|
77887
|
-
const leftTarget = skipOuterExpressions(left,
|
|
77872
|
+
const leftTarget = skipOuterExpressions(left, 31 /* All */);
|
|
77888
77873
|
const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget);
|
|
77889
77874
|
if (nullishSemantics !== 3 /* Sometimes */) {
|
|
77890
77875
|
if (node.parent.kind === 226 /* BinaryExpression */) {
|
|
@@ -92280,7 +92265,7 @@ function transformTypeScript(context) {
|
|
|
92280
92265
|
return updated;
|
|
92281
92266
|
}
|
|
92282
92267
|
function visitParenthesizedExpression(node) {
|
|
92283
|
-
const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
|
|
92268
|
+
const innerExpression = skipOuterExpressions(node.expression, ~(6 /* Assertions */ | 16 /* ExpressionsWithTypeArguments */));
|
|
92284
92269
|
if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) {
|
|
92285
92270
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
92286
92271
|
Debug.assert(expression);
|
package/lib/typescript.d.ts
CHANGED
|
@@ -7346,9 +7346,10 @@ declare namespace ts {
|
|
|
7346
7346
|
TypeAssertions = 2,
|
|
7347
7347
|
NonNullAssertions = 4,
|
|
7348
7348
|
PartiallyEmittedExpressions = 8,
|
|
7349
|
+
ExpressionsWithTypeArguments = 16,
|
|
7349
7350
|
Assertions = 6,
|
|
7350
|
-
All =
|
|
7351
|
-
ExcludeJSDocTypeAssertion =
|
|
7351
|
+
All = 31,
|
|
7352
|
+
ExcludeJSDocTypeAssertion = -2147483648,
|
|
7352
7353
|
}
|
|
7353
7354
|
type ImmediatelyInvokedFunctionExpression = CallExpression & {
|
|
7354
7355
|
readonly expression: FunctionExpression;
|
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.20240808`;
|
|
2264
2264
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2265
2265
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2266
2266
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -7113,9 +7113,10 @@ var OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => {
|
|
|
7113
7113
|
OuterExpressionKinds2[OuterExpressionKinds2["TypeAssertions"] = 2] = "TypeAssertions";
|
|
7114
7114
|
OuterExpressionKinds2[OuterExpressionKinds2["NonNullAssertions"] = 4] = "NonNullAssertions";
|
|
7115
7115
|
OuterExpressionKinds2[OuterExpressionKinds2["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions";
|
|
7116
|
+
OuterExpressionKinds2[OuterExpressionKinds2["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments";
|
|
7116
7117
|
OuterExpressionKinds2[OuterExpressionKinds2["Assertions"] = 6] = "Assertions";
|
|
7117
|
-
OuterExpressionKinds2[OuterExpressionKinds2["All"] =
|
|
7118
|
-
OuterExpressionKinds2[OuterExpressionKinds2["ExcludeJSDocTypeAssertion"] =
|
|
7118
|
+
OuterExpressionKinds2[OuterExpressionKinds2["All"] = 31] = "All";
|
|
7119
|
+
OuterExpressionKinds2[OuterExpressionKinds2["ExcludeJSDocTypeAssertion"] = -2147483648] = "ExcludeJSDocTypeAssertion";
|
|
7119
7120
|
return OuterExpressionKinds2;
|
|
7120
7121
|
})(OuterExpressionKinds || {});
|
|
7121
7122
|
var LexicalEnvironmentFlags = /* @__PURE__ */ ((LexicalEnvironmentFlags2) => {
|
|
@@ -19054,7 +19055,7 @@ function skipTypeParentheses(node) {
|
|
|
19054
19055
|
return node;
|
|
19055
19056
|
}
|
|
19056
19057
|
function skipParentheses(node, excludeJSDocTypeAssertions) {
|
|
19057
|
-
const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ |
|
|
19058
|
+
const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | -2147483648 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */;
|
|
19058
19059
|
return skipOuterExpressions(node, flags);
|
|
19059
19060
|
}
|
|
19060
19061
|
function isDeleteTarget(node) {
|
|
@@ -21012,9 +21013,6 @@ function accessKind(node) {
|
|
|
21012
21013
|
return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent);
|
|
21013
21014
|
case 209 /* ArrayLiteralExpression */:
|
|
21014
21015
|
return accessKind(parent2);
|
|
21015
|
-
case 249 /* ForInStatement */:
|
|
21016
|
-
case 250 /* ForOfStatement */:
|
|
21017
|
-
return node === parent2.initializer ? 1 /* Write */ : 0 /* Read */;
|
|
21018
21016
|
default:
|
|
21019
21017
|
return 0 /* Read */;
|
|
21020
21018
|
}
|
|
@@ -28014,6 +28012,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
28014
28012
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
28015
28013
|
case 235 /* NonNullExpression */:
|
|
28016
28014
|
return updateNonNullExpression(outerExpression, expression);
|
|
28015
|
+
case 233 /* ExpressionWithTypeArguments */:
|
|
28016
|
+
return updateExpressionWithTypeArguments(outerExpression, expression, outerExpression.typeArguments);
|
|
28017
28017
|
case 354 /* PartiallyEmittedExpression */:
|
|
28018
28018
|
return updatePartiallyEmittedExpression(outerExpression, expression);
|
|
28019
28019
|
}
|
|
@@ -28021,7 +28021,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
28021
28021
|
function isIgnorableParen(node) {
|
|
28022
28022
|
return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node));
|
|
28023
28023
|
}
|
|
28024
|
-
function restoreOuterExpressions(outerExpression, innerExpression, kinds =
|
|
28024
|
+
function restoreOuterExpressions(outerExpression, innerExpression, kinds = 31 /* All */) {
|
|
28025
28025
|
if (outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) {
|
|
28026
28026
|
return updateOuterExpression(
|
|
28027
28027
|
outerExpression,
|
|
@@ -28067,7 +28067,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
28067
28067
|
}
|
|
28068
28068
|
}
|
|
28069
28069
|
function createCallBinding(expression, recordTempVariable, languageVersion, cacheIdentifiers = false) {
|
|
28070
|
-
const callee = skipOuterExpressions(expression,
|
|
28070
|
+
const callee = skipOuterExpressions(expression, 31 /* All */);
|
|
28071
28071
|
let thisArg;
|
|
28072
28072
|
let target;
|
|
28073
28073
|
if (isSuperProperty(callee)) {
|
|
@@ -31035,18 +31035,19 @@ function getJSDocTypeAssertionType(node) {
|
|
|
31035
31035
|
Debug.assertIsDefined(type);
|
|
31036
31036
|
return type;
|
|
31037
31037
|
}
|
|
31038
|
-
function isOuterExpression(node, kinds =
|
|
31038
|
+
function isOuterExpression(node, kinds = 31 /* All */) {
|
|
31039
31039
|
switch (node.kind) {
|
|
31040
31040
|
case 217 /* ParenthesizedExpression */:
|
|
31041
|
-
if (kinds &
|
|
31041
|
+
if (kinds & -2147483648 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) {
|
|
31042
31042
|
return false;
|
|
31043
31043
|
}
|
|
31044
31044
|
return (kinds & 1 /* Parentheses */) !== 0;
|
|
31045
31045
|
case 216 /* TypeAssertionExpression */:
|
|
31046
31046
|
case 234 /* AsExpression */:
|
|
31047
|
-
case 233 /* ExpressionWithTypeArguments */:
|
|
31048
31047
|
case 238 /* SatisfiesExpression */:
|
|
31049
31048
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
31049
|
+
case 233 /* ExpressionWithTypeArguments */:
|
|
31050
|
+
return (kinds & 16 /* ExpressionsWithTypeArguments */) !== 0;
|
|
31050
31051
|
case 235 /* NonNullExpression */:
|
|
31051
31052
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
31052
31053
|
case 354 /* PartiallyEmittedExpression */:
|
|
@@ -31054,13 +31055,13 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
31054
31055
|
}
|
|
31055
31056
|
return false;
|
|
31056
31057
|
}
|
|
31057
|
-
function skipOuterExpressions(node, kinds =
|
|
31058
|
+
function skipOuterExpressions(node, kinds = 31 /* All */) {
|
|
31058
31059
|
while (isOuterExpression(node, kinds)) {
|
|
31059
31060
|
node = node.expression;
|
|
31060
31061
|
}
|
|
31061
31062
|
return node;
|
|
31062
31063
|
}
|
|
31063
|
-
function walkUpOuterExpressions(node, kinds =
|
|
31064
|
+
function walkUpOuterExpressions(node, kinds = 31 /* All */) {
|
|
31064
31065
|
let parent2 = node.parent;
|
|
31065
31066
|
while (isOuterExpression(parent2, kinds)) {
|
|
31066
31067
|
parent2 = parent2.parent;
|
|
@@ -74234,12 +74235,6 @@ function createTypeChecker(host) {
|
|
|
74234
74235
|
function getControlFlowContainer(node) {
|
|
74235
74236
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 307 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
74236
74237
|
}
|
|
74237
|
-
function isSymbolAssignedDefinitely(symbol) {
|
|
74238
|
-
if (symbol.lastAssignmentPos !== void 0) {
|
|
74239
|
-
return symbol.lastAssignmentPos < 0;
|
|
74240
|
-
}
|
|
74241
|
-
return isSymbolAssigned(symbol) && symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0;
|
|
74242
|
-
}
|
|
74243
74238
|
function isSymbolAssigned(symbol) {
|
|
74244
74239
|
return !isPastLastAssignment(
|
|
74245
74240
|
symbol,
|
|
@@ -74259,7 +74254,7 @@ function createTypeChecker(host) {
|
|
|
74259
74254
|
markNodeAssignments(parent2);
|
|
74260
74255
|
}
|
|
74261
74256
|
}
|
|
74262
|
-
return !symbol.lastAssignmentPos || location &&
|
|
74257
|
+
return !symbol.lastAssignmentPos || location && symbol.lastAssignmentPos < location.pos;
|
|
74263
74258
|
}
|
|
74264
74259
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
74265
74260
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -74280,19 +74275,12 @@ function createTypeChecker(host) {
|
|
|
74280
74275
|
function markNodeAssignments(node) {
|
|
74281
74276
|
switch (node.kind) {
|
|
74282
74277
|
case 80 /* Identifier */:
|
|
74283
|
-
|
|
74284
|
-
if (assigmentTarget !== 0 /* None */) {
|
|
74278
|
+
if (isAssignmentTarget(node)) {
|
|
74285
74279
|
const symbol = getResolvedSymbol(node);
|
|
74286
|
-
|
|
74287
|
-
|
|
74288
|
-
|
|
74289
|
-
|
|
74290
|
-
const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);
|
|
74291
|
-
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;
|
|
74292
|
-
}
|
|
74293
|
-
if (isDefiniteAssignment && symbol.lastAssignmentPos > 0) {
|
|
74294
|
-
symbol.lastAssignmentPos = -symbol.lastAssignmentPos;
|
|
74295
|
-
}
|
|
74280
|
+
if (isParameterOrMutableLocalVariable(symbol) && symbol.lastAssignmentPos !== Number.MAX_VALUE) {
|
|
74281
|
+
const referencingFunction = findAncestor(node, isFunctionOrSourceFile);
|
|
74282
|
+
const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);
|
|
74283
|
+
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;
|
|
74296
74284
|
}
|
|
74297
74285
|
}
|
|
74298
74286
|
return;
|
|
@@ -74309,8 +74297,7 @@ function createTypeChecker(host) {
|
|
|
74309
74297
|
true
|
|
74310
74298
|
);
|
|
74311
74299
|
if (symbol && isParameterOrMutableLocalVariable(symbol)) {
|
|
74312
|
-
|
|
74313
|
-
symbol.lastAssignmentPos = sign * Number.MAX_VALUE;
|
|
74300
|
+
symbol.lastAssignmentPos = Number.MAX_VALUE;
|
|
74314
74301
|
}
|
|
74315
74302
|
}
|
|
74316
74303
|
return;
|
|
@@ -74351,10 +74338,10 @@ function createTypeChecker(host) {
|
|
|
74351
74338
|
}
|
|
74352
74339
|
function isParameterOrMutableLocalVariable(symbol) {
|
|
74353
74340
|
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
74354
|
-
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(
|
|
74341
|
+
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(declaration)));
|
|
74355
74342
|
}
|
|
74356
|
-
function isMutableLocalVariableDeclaration(
|
|
74357
|
-
return !!(
|
|
74343
|
+
function isMutableLocalVariableDeclaration(declaration) {
|
|
74344
|
+
return !!(declaration.parent.flags & 1 /* Let */) && !(getCombinedModifierFlags(declaration) & 32 /* Export */ || declaration.parent.parent.kind === 243 /* VariableStatement */ && isGlobalSourceFile(declaration.parent.parent.parent));
|
|
74358
74345
|
}
|
|
74359
74346
|
function parameterInitializerContainsUndefined(declaration) {
|
|
74360
74347
|
const links = getNodeLinks(declaration);
|
|
@@ -74894,7 +74881,6 @@ function createTypeChecker(host) {
|
|
|
74894
74881
|
}
|
|
74895
74882
|
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
74896
74883
|
let declaration = localOrExportSymbol.valueDeclaration;
|
|
74897
|
-
const immediateDeclaration = declaration;
|
|
74898
74884
|
if (declaration && declaration.kind === 208 /* BindingElement */ && contains(contextualBindingPatterns, declaration.parent) && findAncestor(node, (parent2) => parent2 === declaration.parent)) {
|
|
74899
74885
|
return nonInferrableAnyType;
|
|
74900
74886
|
}
|
|
@@ -74940,7 +74926,7 @@ function createTypeChecker(host) {
|
|
|
74940
74926
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {
|
|
74941
74927
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
74942
74928
|
}
|
|
74943
|
-
const assumeInitialized = isParameter2 || isAlias || isOuterVariable
|
|
74929
|
+
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */;
|
|
74944
74930
|
const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);
|
|
74945
74931
|
const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
74946
74932
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -75850,7 +75836,7 @@ function createTypeChecker(host) {
|
|
|
75850
75836
|
type,
|
|
75851
75837
|
(t) => {
|
|
75852
75838
|
var _a;
|
|
75853
|
-
if (isGenericMappedType(t) &&
|
|
75839
|
+
if (isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== 2 /* Remapping */) {
|
|
75854
75840
|
const constraint = getConstraintTypeFromMappedType(t);
|
|
75855
75841
|
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
75856
75842
|
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
@@ -82503,7 +82489,7 @@ function createTypeChecker(host) {
|
|
|
82503
82489
|
if (isBinaryExpression(right) && (right.operatorToken.kind === 57 /* BarBarToken */ || right.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) {
|
|
82504
82490
|
grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind));
|
|
82505
82491
|
}
|
|
82506
|
-
const leftTarget = skipOuterExpressions(left,
|
|
82492
|
+
const leftTarget = skipOuterExpressions(left, 31 /* All */);
|
|
82507
82493
|
const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget);
|
|
82508
82494
|
if (nullishSemantics !== 3 /* Sometimes */) {
|
|
82509
82495
|
if (node.parent.kind === 226 /* BinaryExpression */) {
|
|
@@ -97081,7 +97067,7 @@ function transformTypeScript(context) {
|
|
|
97081
97067
|
return updated;
|
|
97082
97068
|
}
|
|
97083
97069
|
function visitParenthesizedExpression(node) {
|
|
97084
|
-
const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
|
|
97070
|
+
const innerExpression = skipOuterExpressions(node.expression, ~(6 /* Assertions */ | 16 /* ExpressionsWithTypeArguments */));
|
|
97085
97071
|
if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) {
|
|
97086
97072
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
97087
97073
|
Debug.assert(expression);
|
|
@@ -166802,7 +166788,8 @@ function getJsDocTagAtPosition(node, position) {
|
|
|
166802
166788
|
}
|
|
166803
166789
|
function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) {
|
|
166804
166790
|
const hasCompletionsType = completionsType && completionsType !== contextualType;
|
|
166805
|
-
const
|
|
166791
|
+
const promiseFilteredContextualType = checker.getUnionType(filter(contextualType.flags & 1048576 /* Union */ ? contextualType.types : [contextualType], (t) => !checker.getAwaitedType(t) || !checker.getPromisedTypeOfPromise(t)));
|
|
166792
|
+
const type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) ? checker.getUnionType([promiseFilteredContextualType, completionsType]) : promiseFilteredContextualType;
|
|
166806
166793
|
const properties = getApparentProperties(type, obj, checker);
|
|
166807
166794
|
return type.isClass() && containsNonPublicProperties(properties) ? [] : hasCompletionsType ? filter(properties, hasDeclarationOtherThanSelf) : properties;
|
|
166808
166795
|
function hasDeclarationOtherThanSelf(member) {
|
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-59316-5",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|