@typescript-deploys/pr-build 5.6.0-pr-55887-67 → 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 +13 -31
- package/lib/typescript.js +15 -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.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
|
}
|
|
@@ -69618,12 +69615,6 @@ function createTypeChecker(host) {
|
|
|
69618
69615
|
function getControlFlowContainer(node) {
|
|
69619
69616
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 307 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
69620
69617
|
}
|
|
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
69618
|
function isSymbolAssigned(symbol) {
|
|
69628
69619
|
return !isPastLastAssignment(
|
|
69629
69620
|
symbol,
|
|
@@ -69643,7 +69634,7 @@ function createTypeChecker(host) {
|
|
|
69643
69634
|
markNodeAssignments(parent);
|
|
69644
69635
|
}
|
|
69645
69636
|
}
|
|
69646
|
-
return !symbol.lastAssignmentPos || location &&
|
|
69637
|
+
return !symbol.lastAssignmentPos || location && symbol.lastAssignmentPos < location.pos;
|
|
69647
69638
|
}
|
|
69648
69639
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
69649
69640
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -69664,19 +69655,12 @@ function createTypeChecker(host) {
|
|
|
69664
69655
|
function markNodeAssignments(node) {
|
|
69665
69656
|
switch (node.kind) {
|
|
69666
69657
|
case 80 /* Identifier */:
|
|
69667
|
-
|
|
69668
|
-
if (assigmentTarget !== 0 /* None */) {
|
|
69658
|
+
if (isAssignmentTarget(node)) {
|
|
69669
69659
|
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
|
-
}
|
|
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;
|
|
69680
69664
|
}
|
|
69681
69665
|
}
|
|
69682
69666
|
return;
|
|
@@ -69693,8 +69677,7 @@ function createTypeChecker(host) {
|
|
|
69693
69677
|
true
|
|
69694
69678
|
);
|
|
69695
69679
|
if (symbol && isParameterOrMutableLocalVariable(symbol)) {
|
|
69696
|
-
|
|
69697
|
-
symbol.lastAssignmentPos = sign * Number.MAX_VALUE;
|
|
69680
|
+
symbol.lastAssignmentPos = Number.MAX_VALUE;
|
|
69698
69681
|
}
|
|
69699
69682
|
}
|
|
69700
69683
|
return;
|
|
@@ -69735,10 +69718,10 @@ function createTypeChecker(host) {
|
|
|
69735
69718
|
}
|
|
69736
69719
|
function isParameterOrMutableLocalVariable(symbol) {
|
|
69737
69720
|
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
69738
|
-
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(
|
|
69721
|
+
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(declaration)));
|
|
69739
69722
|
}
|
|
69740
|
-
function isMutableLocalVariableDeclaration(
|
|
69741
|
-
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));
|
|
69742
69725
|
}
|
|
69743
69726
|
function parameterInitializerContainsUndefined(declaration) {
|
|
69744
69727
|
const links = getNodeLinks(declaration);
|
|
@@ -70278,7 +70261,6 @@ function createTypeChecker(host) {
|
|
|
70278
70261
|
}
|
|
70279
70262
|
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
70280
70263
|
let declaration = localOrExportSymbol.valueDeclaration;
|
|
70281
|
-
const immediateDeclaration = declaration;
|
|
70282
70264
|
if (declaration && declaration.kind === 208 /* BindingElement */ && contains(contextualBindingPatterns, declaration.parent) && findAncestor(node, (parent) => parent === declaration.parent)) {
|
|
70283
70265
|
return nonInferrableAnyType;
|
|
70284
70266
|
}
|
|
@@ -70324,7 +70306,7 @@ function createTypeChecker(host) {
|
|
|
70324
70306
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {
|
|
70325
70307
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
70326
70308
|
}
|
|
70327
|
-
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 */;
|
|
70328
70310
|
const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);
|
|
70329
70311
|
const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
70330
70312
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -71234,7 +71216,7 @@ function createTypeChecker(host) {
|
|
|
71234
71216
|
type,
|
|
71235
71217
|
(t) => {
|
|
71236
71218
|
var _a;
|
|
71237
|
-
if (isGenericMappedType(t) &&
|
|
71219
|
+
if (isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== 2 /* Remapping */) {
|
|
71238
71220
|
const constraint = getConstraintTypeFromMappedType(t);
|
|
71239
71221
|
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
71240
71222
|
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
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
|
}
|
|
@@ -74238,12 +74235,6 @@ function createTypeChecker(host) {
|
|
|
74238
74235
|
function getControlFlowContainer(node) {
|
|
74239
74236
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 307 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
74240
74237
|
}
|
|
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
74238
|
function isSymbolAssigned(symbol) {
|
|
74248
74239
|
return !isPastLastAssignment(
|
|
74249
74240
|
symbol,
|
|
@@ -74263,7 +74254,7 @@ function createTypeChecker(host) {
|
|
|
74263
74254
|
markNodeAssignments(parent2);
|
|
74264
74255
|
}
|
|
74265
74256
|
}
|
|
74266
|
-
return !symbol.lastAssignmentPos || location &&
|
|
74257
|
+
return !symbol.lastAssignmentPos || location && symbol.lastAssignmentPos < location.pos;
|
|
74267
74258
|
}
|
|
74268
74259
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
74269
74260
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -74284,19 +74275,12 @@ function createTypeChecker(host) {
|
|
|
74284
74275
|
function markNodeAssignments(node) {
|
|
74285
74276
|
switch (node.kind) {
|
|
74286
74277
|
case 80 /* Identifier */:
|
|
74287
|
-
|
|
74288
|
-
if (assigmentTarget !== 0 /* None */) {
|
|
74278
|
+
if (isAssignmentTarget(node)) {
|
|
74289
74279
|
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
|
-
}
|
|
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;
|
|
74300
74284
|
}
|
|
74301
74285
|
}
|
|
74302
74286
|
return;
|
|
@@ -74313,8 +74297,7 @@ function createTypeChecker(host) {
|
|
|
74313
74297
|
true
|
|
74314
74298
|
);
|
|
74315
74299
|
if (symbol && isParameterOrMutableLocalVariable(symbol)) {
|
|
74316
|
-
|
|
74317
|
-
symbol.lastAssignmentPos = sign * Number.MAX_VALUE;
|
|
74300
|
+
symbol.lastAssignmentPos = Number.MAX_VALUE;
|
|
74318
74301
|
}
|
|
74319
74302
|
}
|
|
74320
74303
|
return;
|
|
@@ -74355,10 +74338,10 @@ function createTypeChecker(host) {
|
|
|
74355
74338
|
}
|
|
74356
74339
|
function isParameterOrMutableLocalVariable(symbol) {
|
|
74357
74340
|
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
74358
|
-
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(
|
|
74341
|
+
return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(declaration)));
|
|
74359
74342
|
}
|
|
74360
|
-
function isMutableLocalVariableDeclaration(
|
|
74361
|
-
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));
|
|
74362
74345
|
}
|
|
74363
74346
|
function parameterInitializerContainsUndefined(declaration) {
|
|
74364
74347
|
const links = getNodeLinks(declaration);
|
|
@@ -74898,7 +74881,6 @@ function createTypeChecker(host) {
|
|
|
74898
74881
|
}
|
|
74899
74882
|
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
74900
74883
|
let declaration = localOrExportSymbol.valueDeclaration;
|
|
74901
|
-
const immediateDeclaration = declaration;
|
|
74902
74884
|
if (declaration && declaration.kind === 208 /* BindingElement */ && contains(contextualBindingPatterns, declaration.parent) && findAncestor(node, (parent2) => parent2 === declaration.parent)) {
|
|
74903
74885
|
return nonInferrableAnyType;
|
|
74904
74886
|
}
|
|
@@ -74944,7 +74926,7 @@ function createTypeChecker(host) {
|
|
|
74944
74926
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {
|
|
74945
74927
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
74946
74928
|
}
|
|
74947
|
-
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 */;
|
|
74948
74930
|
const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);
|
|
74949
74931
|
const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
74950
74932
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -75854,7 +75836,7 @@ function createTypeChecker(host) {
|
|
|
75854
75836
|
type,
|
|
75855
75837
|
(t) => {
|
|
75856
75838
|
var _a;
|
|
75857
|
-
if (isGenericMappedType(t) &&
|
|
75839
|
+
if (isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== 2 /* Remapping */) {
|
|
75858
75840
|
const constraint = getConstraintTypeFromMappedType(t);
|
|
75859
75841
|
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
75860
75842
|
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
@@ -166806,7 +166788,8 @@ function getJsDocTagAtPosition(node, position) {
|
|
|
166806
166788
|
}
|
|
166807
166789
|
function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) {
|
|
166808
166790
|
const hasCompletionsType = completionsType && completionsType !== contextualType;
|
|
166809
|
-
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;
|
|
166810
166793
|
const properties = getApparentProperties(type, obj, checker);
|
|
166811
166794
|
return type.isClass() && containsNonPublicProperties(properties) ? [] : hasCompletionsType ? filter(properties, hasDeclarationOtherThanSelf) : properties;
|
|
166812
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": [
|