@typescript-deploys/pr-build 5.6.0-pr-55887-67 → 5.6.0-pr-59467-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 +22 -39
- package/lib/typescript.js +24 -41
- 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 = [];
|
|
@@ -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
|
}
|
|
@@ -21274,7 +21271,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
21274
21271
|
node.modifiers = asNodeArray(modifiers);
|
|
21275
21272
|
node.parameters = createNodeArray(parameters);
|
|
21276
21273
|
node.body = body;
|
|
21277
|
-
|
|
21274
|
+
if (!node.body) {
|
|
21275
|
+
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
21276
|
+
} else {
|
|
21277
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */;
|
|
21278
|
+
}
|
|
21278
21279
|
node.typeParameters = void 0;
|
|
21279
21280
|
node.type = void 0;
|
|
21280
21281
|
node.typeArguments = void 0;
|
|
@@ -25408,7 +25409,7 @@ var asyncGeneratorHelper = {
|
|
|
25408
25409
|
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
25409
25410
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
25410
25411
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
25411
|
-
return i =
|
|
25412
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
25412
25413
|
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
25413
25414
|
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
25414
25415
|
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
@@ -25590,8 +25591,8 @@ var generatorHelper = {
|
|
|
25590
25591
|
priority: 6,
|
|
25591
25592
|
text: `
|
|
25592
25593
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25593
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25594
|
-
return g =
|
|
25594
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
25595
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25595
25596
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25596
25597
|
function step(op) {
|
|
25597
25598
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -69618,12 +69619,6 @@ function createTypeChecker(host) {
|
|
|
69618
69619
|
function getControlFlowContainer(node) {
|
|
69619
69620
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 307 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
69620
69621
|
}
|
|
69621
|
-
function isSymbolAssignedDefinitely(symbol) {
|
|
69622
|
-
if (symbol.lastAssignmentPos !== void 0) {
|
|
69623
|
-
return symbol.lastAssignmentPos < 0;
|
|
69624
|
-
}
|
|
69625
|
-
return isSymbolAssigned(symbol) && symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0;
|
|
69626
|
-
}
|
|
69627
69622
|
function isSymbolAssigned(symbol) {
|
|
69628
69623
|
return !isPastLastAssignment(
|
|
69629
69624
|
symbol,
|
|
@@ -69643,7 +69638,7 @@ function createTypeChecker(host) {
|
|
|
69643
69638
|
markNodeAssignments(parent);
|
|
69644
69639
|
}
|
|
69645
69640
|
}
|
|
69646
|
-
return !symbol.lastAssignmentPos || location &&
|
|
69641
|
+
return !symbol.lastAssignmentPos || location && symbol.lastAssignmentPos < location.pos;
|
|
69647
69642
|
}
|
|
69648
69643
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
69649
69644
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -69664,19 +69659,12 @@ function createTypeChecker(host) {
|
|
|
69664
69659
|
function markNodeAssignments(node) {
|
|
69665
69660
|
switch (node.kind) {
|
|
69666
69661
|
case 80 /* Identifier */:
|
|
69667
|
-
|
|
69668
|
-
if (assigmentTarget !== 0 /* None */) {
|
|
69662
|
+
if (isAssignmentTarget(node)) {
|
|
69669
69663
|
const symbol = getResolvedSymbol(node);
|
|
69670
|
-
|
|
69671
|
-
|
|
69672
|
-
|
|
69673
|
-
|
|
69674
|
-
const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);
|
|
69675
|
-
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;
|
|
69676
|
-
}
|
|
69677
|
-
if (isDefiniteAssignment && symbol.lastAssignmentPos > 0) {
|
|
69678
|
-
symbol.lastAssignmentPos = -symbol.lastAssignmentPos;
|
|
69679
|
-
}
|
|
69664
|
+
if (isParameterOrMutableLocalVariable(symbol) && symbol.lastAssignmentPos !== Number.MAX_VALUE) {
|
|
69665
|
+
const referencingFunction = findAncestor(node, isFunctionOrSourceFile);
|
|
69666
|
+
const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);
|
|
69667
|
+
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;
|
|
69680
69668
|
}
|
|
69681
69669
|
}
|
|
69682
69670
|
return;
|
|
@@ -69693,8 +69681,7 @@ function createTypeChecker(host) {
|
|
|
69693
69681
|
true
|
|
69694
69682
|
);
|
|
69695
69683
|
if (symbol && isParameterOrMutableLocalVariable(symbol)) {
|
|
69696
|
-
|
|
69697
|
-
symbol.lastAssignmentPos = sign * Number.MAX_VALUE;
|
|
69684
|
+
symbol.lastAssignmentPos = Number.MAX_VALUE;
|
|
69698
69685
|
}
|
|
69699
69686
|
}
|
|
69700
69687
|
return;
|
|
@@ -69735,10 +69722,10 @@ function createTypeChecker(host) {
|
|
|
69735
69722
|
}
|
|
69736
69723
|
function isParameterOrMutableLocalVariable(symbol) {
|
|
69737
69724
|
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
69738
|
-
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(
|
|
69725
|
+
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(declaration)));
|
|
69739
69726
|
}
|
|
69740
|
-
function isMutableLocalVariableDeclaration(
|
|
69741
|
-
return !!(
|
|
69727
|
+
function isMutableLocalVariableDeclaration(declaration) {
|
|
69728
|
+
return !!(declaration.parent.flags & 1 /* Let */) && !(getCombinedModifierFlags(declaration) & 32 /* Export */ || declaration.parent.parent.kind === 243 /* VariableStatement */ && isGlobalSourceFile(declaration.parent.parent.parent));
|
|
69742
69729
|
}
|
|
69743
69730
|
function parameterInitializerContainsUndefined(declaration) {
|
|
69744
69731
|
const links = getNodeLinks(declaration);
|
|
@@ -70278,7 +70265,6 @@ function createTypeChecker(host) {
|
|
|
70278
70265
|
}
|
|
70279
70266
|
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
70280
70267
|
let declaration = localOrExportSymbol.valueDeclaration;
|
|
70281
|
-
const immediateDeclaration = declaration;
|
|
70282
70268
|
if (declaration && declaration.kind === 208 /* BindingElement */ && contains(contextualBindingPatterns, declaration.parent) && findAncestor(node, (parent) => parent === declaration.parent)) {
|
|
70283
70269
|
return nonInferrableAnyType;
|
|
70284
70270
|
}
|
|
@@ -70324,7 +70310,7 @@ function createTypeChecker(host) {
|
|
|
70324
70310
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {
|
|
70325
70311
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
70326
70312
|
}
|
|
70327
|
-
const assumeInitialized = isParameter2 || isAlias || isOuterVariable
|
|
70313
|
+
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 */;
|
|
70328
70314
|
const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);
|
|
70329
70315
|
const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
70330
70316
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -71234,7 +71220,7 @@ function createTypeChecker(host) {
|
|
|
71234
71220
|
type,
|
|
71235
71221
|
(t) => {
|
|
71236
71222
|
var _a;
|
|
71237
|
-
if (isGenericMappedType(t) &&
|
|
71223
|
+
if (isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== 2 /* Remapping */) {
|
|
71238
71224
|
const constraint = getConstraintTypeFromMappedType(t);
|
|
71239
71225
|
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
71240
71226
|
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
@@ -91240,7 +91226,6 @@ function transformTypeScript(context) {
|
|
|
91240
91226
|
let currentNamespaceContainerName;
|
|
91241
91227
|
let currentLexicalScope;
|
|
91242
91228
|
let currentScopeFirstDeclarationsOfName;
|
|
91243
|
-
let currentClassHasParameterProperties;
|
|
91244
91229
|
let enabledSubstitutions;
|
|
91245
91230
|
let applicableSubstitutions;
|
|
91246
91231
|
return transformSourceFileOrBundle;
|
|
@@ -91268,14 +91253,12 @@ function transformTypeScript(context) {
|
|
|
91268
91253
|
function saveStateAndInvoke(node, f) {
|
|
91269
91254
|
const savedCurrentScope = currentLexicalScope;
|
|
91270
91255
|
const savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName;
|
|
91271
|
-
const savedCurrentClassHasParameterProperties = currentClassHasParameterProperties;
|
|
91272
91256
|
onBeforeVisitNode(node);
|
|
91273
91257
|
const visited = f(node);
|
|
91274
91258
|
if (currentLexicalScope !== savedCurrentScope) {
|
|
91275
91259
|
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
|
|
91276
91260
|
}
|
|
91277
91261
|
currentLexicalScope = savedCurrentScope;
|
|
91278
|
-
currentClassHasParameterProperties = savedCurrentClassHasParameterProperties;
|
|
91279
91262
|
return visited;
|
|
91280
91263
|
}
|
|
91281
91264
|
function onBeforeVisitNode(node) {
|
|
@@ -91908,7 +91891,7 @@ function transformTypeScript(context) {
|
|
|
91908
91891
|
}
|
|
91909
91892
|
function visitPropertyNameOfClassElement(member) {
|
|
91910
91893
|
const name = member.name;
|
|
91911
|
-
if (
|
|
91894
|
+
if (legacyDecorators && isComputedPropertyName(name) && hasDecorators(member)) {
|
|
91912
91895
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
91913
91896
|
Debug.assert(expression);
|
|
91914
91897
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
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";
|
|
@@ -21013,9 +21013,6 @@ function accessKind(node) {
|
|
|
21013
21013
|
return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent);
|
|
21014
21014
|
case 209 /* ArrayLiteralExpression */:
|
|
21015
21015
|
return accessKind(parent2);
|
|
21016
|
-
case 249 /* ForInStatement */:
|
|
21017
|
-
case 250 /* ForOfStatement */:
|
|
21018
|
-
return node === parent2.initializer ? 1 /* Write */ : 0 /* Read */;
|
|
21019
21016
|
default:
|
|
21020
21017
|
return 0 /* Read */;
|
|
21021
21018
|
}
|
|
@@ -25389,7 +25386,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
25389
25386
|
node.modifiers = asNodeArray(modifiers);
|
|
25390
25387
|
node.parameters = createNodeArray(parameters);
|
|
25391
25388
|
node.body = body;
|
|
25392
|
-
|
|
25389
|
+
if (!node.body) {
|
|
25390
|
+
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
25391
|
+
} else {
|
|
25392
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */;
|
|
25393
|
+
}
|
|
25393
25394
|
node.typeParameters = void 0;
|
|
25394
25395
|
node.type = void 0;
|
|
25395
25396
|
node.typeArguments = void 0;
|
|
@@ -29558,7 +29559,7 @@ var asyncGeneratorHelper = {
|
|
|
29558
29559
|
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
29559
29560
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
29560
29561
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
29561
|
-
return i =
|
|
29562
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
29562
29563
|
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
29563
29564
|
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
29564
29565
|
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
@@ -29740,8 +29741,8 @@ var generatorHelper = {
|
|
|
29740
29741
|
priority: 6,
|
|
29741
29742
|
text: `
|
|
29742
29743
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
29743
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
29744
|
-
return g =
|
|
29744
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
29745
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29745
29746
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29746
29747
|
function step(op) {
|
|
29747
29748
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -74238,12 +74239,6 @@ function createTypeChecker(host) {
|
|
|
74238
74239
|
function getControlFlowContainer(node) {
|
|
74239
74240
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 307 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
74240
74241
|
}
|
|
74241
|
-
function isSymbolAssignedDefinitely(symbol) {
|
|
74242
|
-
if (symbol.lastAssignmentPos !== void 0) {
|
|
74243
|
-
return symbol.lastAssignmentPos < 0;
|
|
74244
|
-
}
|
|
74245
|
-
return isSymbolAssigned(symbol) && symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0;
|
|
74246
|
-
}
|
|
74247
74242
|
function isSymbolAssigned(symbol) {
|
|
74248
74243
|
return !isPastLastAssignment(
|
|
74249
74244
|
symbol,
|
|
@@ -74263,7 +74258,7 @@ function createTypeChecker(host) {
|
|
|
74263
74258
|
markNodeAssignments(parent2);
|
|
74264
74259
|
}
|
|
74265
74260
|
}
|
|
74266
|
-
return !symbol.lastAssignmentPos || location &&
|
|
74261
|
+
return !symbol.lastAssignmentPos || location && symbol.lastAssignmentPos < location.pos;
|
|
74267
74262
|
}
|
|
74268
74263
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
74269
74264
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -74284,19 +74279,12 @@ function createTypeChecker(host) {
|
|
|
74284
74279
|
function markNodeAssignments(node) {
|
|
74285
74280
|
switch (node.kind) {
|
|
74286
74281
|
case 80 /* Identifier */:
|
|
74287
|
-
|
|
74288
|
-
if (assigmentTarget !== 0 /* None */) {
|
|
74282
|
+
if (isAssignmentTarget(node)) {
|
|
74289
74283
|
const symbol = getResolvedSymbol(node);
|
|
74290
|
-
|
|
74291
|
-
|
|
74292
|
-
|
|
74293
|
-
|
|
74294
|
-
const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);
|
|
74295
|
-
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;
|
|
74296
|
-
}
|
|
74297
|
-
if (isDefiniteAssignment && symbol.lastAssignmentPos > 0) {
|
|
74298
|
-
symbol.lastAssignmentPos = -symbol.lastAssignmentPos;
|
|
74299
|
-
}
|
|
74284
|
+
if (isParameterOrMutableLocalVariable(symbol) && symbol.lastAssignmentPos !== Number.MAX_VALUE) {
|
|
74285
|
+
const referencingFunction = findAncestor(node, isFunctionOrSourceFile);
|
|
74286
|
+
const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);
|
|
74287
|
+
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;
|
|
74300
74288
|
}
|
|
74301
74289
|
}
|
|
74302
74290
|
return;
|
|
@@ -74313,8 +74301,7 @@ function createTypeChecker(host) {
|
|
|
74313
74301
|
true
|
|
74314
74302
|
);
|
|
74315
74303
|
if (symbol && isParameterOrMutableLocalVariable(symbol)) {
|
|
74316
|
-
|
|
74317
|
-
symbol.lastAssignmentPos = sign * Number.MAX_VALUE;
|
|
74304
|
+
symbol.lastAssignmentPos = Number.MAX_VALUE;
|
|
74318
74305
|
}
|
|
74319
74306
|
}
|
|
74320
74307
|
return;
|
|
@@ -74355,10 +74342,10 @@ function createTypeChecker(host) {
|
|
|
74355
74342
|
}
|
|
74356
74343
|
function isParameterOrMutableLocalVariable(symbol) {
|
|
74357
74344
|
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
74358
|
-
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(
|
|
74345
|
+
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(declaration)));
|
|
74359
74346
|
}
|
|
74360
|
-
function isMutableLocalVariableDeclaration(
|
|
74361
|
-
return !!(
|
|
74347
|
+
function isMutableLocalVariableDeclaration(declaration) {
|
|
74348
|
+
return !!(declaration.parent.flags & 1 /* Let */) && !(getCombinedModifierFlags(declaration) & 32 /* Export */ || declaration.parent.parent.kind === 243 /* VariableStatement */ && isGlobalSourceFile(declaration.parent.parent.parent));
|
|
74362
74349
|
}
|
|
74363
74350
|
function parameterInitializerContainsUndefined(declaration) {
|
|
74364
74351
|
const links = getNodeLinks(declaration);
|
|
@@ -74898,7 +74885,6 @@ function createTypeChecker(host) {
|
|
|
74898
74885
|
}
|
|
74899
74886
|
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
74900
74887
|
let declaration = localOrExportSymbol.valueDeclaration;
|
|
74901
|
-
const immediateDeclaration = declaration;
|
|
74902
74888
|
if (declaration && declaration.kind === 208 /* BindingElement */ && contains(contextualBindingPatterns, declaration.parent) && findAncestor(node, (parent2) => parent2 === declaration.parent)) {
|
|
74903
74889
|
return nonInferrableAnyType;
|
|
74904
74890
|
}
|
|
@@ -74944,7 +74930,7 @@ function createTypeChecker(host) {
|
|
|
74944
74930
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {
|
|
74945
74931
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
74946
74932
|
}
|
|
74947
|
-
const assumeInitialized = isParameter2 || isAlias || isOuterVariable
|
|
74933
|
+
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 */;
|
|
74948
74934
|
const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);
|
|
74949
74935
|
const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
74950
74936
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -75854,7 +75840,7 @@ function createTypeChecker(host) {
|
|
|
75854
75840
|
type,
|
|
75855
75841
|
(t) => {
|
|
75856
75842
|
var _a;
|
|
75857
|
-
if (isGenericMappedType(t) &&
|
|
75843
|
+
if (isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== 2 /* Remapping */) {
|
|
75858
75844
|
const constraint = getConstraintTypeFromMappedType(t);
|
|
75859
75845
|
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
75860
75846
|
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
@@ -96042,7 +96028,6 @@ function transformTypeScript(context) {
|
|
|
96042
96028
|
let currentNamespaceContainerName;
|
|
96043
96029
|
let currentLexicalScope;
|
|
96044
96030
|
let currentScopeFirstDeclarationsOfName;
|
|
96045
|
-
let currentClassHasParameterProperties;
|
|
96046
96031
|
let enabledSubstitutions;
|
|
96047
96032
|
let applicableSubstitutions;
|
|
96048
96033
|
return transformSourceFileOrBundle;
|
|
@@ -96070,14 +96055,12 @@ function transformTypeScript(context) {
|
|
|
96070
96055
|
function saveStateAndInvoke(node, f) {
|
|
96071
96056
|
const savedCurrentScope = currentLexicalScope;
|
|
96072
96057
|
const savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName;
|
|
96073
|
-
const savedCurrentClassHasParameterProperties = currentClassHasParameterProperties;
|
|
96074
96058
|
onBeforeVisitNode(node);
|
|
96075
96059
|
const visited = f(node);
|
|
96076
96060
|
if (currentLexicalScope !== savedCurrentScope) {
|
|
96077
96061
|
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
|
|
96078
96062
|
}
|
|
96079
96063
|
currentLexicalScope = savedCurrentScope;
|
|
96080
|
-
currentClassHasParameterProperties = savedCurrentClassHasParameterProperties;
|
|
96081
96064
|
return visited;
|
|
96082
96065
|
}
|
|
96083
96066
|
function onBeforeVisitNode(node) {
|
|
@@ -96710,7 +96693,7 @@ function transformTypeScript(context) {
|
|
|
96710
96693
|
}
|
|
96711
96694
|
function visitPropertyNameOfClassElement(member) {
|
|
96712
96695
|
const name = member.name;
|
|
96713
|
-
if (
|
|
96696
|
+
if (legacyDecorators && isComputedPropertyName(name) && hasDecorators(member)) {
|
|
96714
96697
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
96715
96698
|
Debug.assert(expression);
|
|
96716
96699
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
@@ -144184,7 +144167,7 @@ function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols
|
|
|
144184
144167
|
deleteUnusedImports(sourceFile, importNode, changes, shouldMove);
|
|
144185
144168
|
const pathToTargetFileWithExtension = resolvePath(getDirectoryPath(getNormalizedAbsolutePath(oldFile.fileName, program.getCurrentDirectory())), targetFileName);
|
|
144186
144169
|
if (getStringComparer(!program.useCaseSensitiveFileNames())(pathToTargetFileWithExtension, sourceFile.fileName) === 0 /* EqualTo */) return;
|
|
144187
|
-
const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.fileName, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host));
|
|
144170
|
+
const newModuleSpecifier = ts_moduleSpecifiers_exports.getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.fileName, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host));
|
|
144188
144171
|
const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove);
|
|
144189
144172
|
if (newImportDeclaration) changes.insertNodeAfter(sourceFile, statement, newImportDeclaration);
|
|
144190
144173
|
const ns = getNamespaceLikeImport(importNode);
|
|
@@ -167677,7 +167660,7 @@ function getFilenameWithExtensionOption(name, program, extensionOptions, isExpor
|
|
|
167677
167660
|
if (extensionOptions.referenceKind === 0 /* Filename */) {
|
|
167678
167661
|
return { name, extension: tryGetExtensionFromPath2(name) };
|
|
167679
167662
|
}
|
|
167680
|
-
let allowedEndings = getModuleSpecifierPreferences(
|
|
167663
|
+
let allowedEndings = ts_moduleSpecifiers_exports.getModuleSpecifierPreferences(
|
|
167681
167664
|
{ importModuleSpecifierEnding: extensionOptions.endingPreference },
|
|
167682
167665
|
program,
|
|
167683
167666
|
program.getCompilerOptions(),
|
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-59467-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|