@typescript-deploys/pr-build 6.0.0-pr-62350-6 → 6.0.0-pr-55267-269
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 +23 -21
- package/lib/typescript.js +23 -21
- 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 = "6.0";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20250904`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -55722,21 +55722,21 @@ function createTypeChecker(host) {
|
|
|
55722
55722
|
function isErrorType(type) {
|
|
55723
55723
|
return type === errorType || !!(type.flags & 1 /* Any */ && type.aliasSymbol);
|
|
55724
55724
|
}
|
|
55725
|
-
function getTypeForBindingElementParent(node) {
|
|
55726
|
-
|
|
55727
|
-
|
|
55728
|
-
|
|
55729
|
-
|
|
55730
|
-
|
|
55731
|
-
|
|
55732
|
-
|
|
55733
|
-
}
|
|
55725
|
+
function getTypeForBindingElementParent(node, checkMode) {
|
|
55726
|
+
if (checkMode !== 0 /* Normal */) {
|
|
55727
|
+
return getTypeForVariableLikeDeclaration(
|
|
55728
|
+
node,
|
|
55729
|
+
/*includeOptionality*/
|
|
55730
|
+
false,
|
|
55731
|
+
checkMode
|
|
55732
|
+
);
|
|
55734
55733
|
}
|
|
55735
|
-
|
|
55736
|
-
|
|
55734
|
+
const symbol = getSymbolOfDeclaration(node);
|
|
55735
|
+
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(
|
|
55736
|
+
node,
|
|
55737
55737
|
/*includeOptionality*/
|
|
55738
55738
|
false,
|
|
55739
|
-
|
|
55739
|
+
checkMode
|
|
55740
55740
|
);
|
|
55741
55741
|
}
|
|
55742
55742
|
function getRestType(source, properties, symbol) {
|
|
@@ -55841,7 +55841,8 @@ function createTypeChecker(host) {
|
|
|
55841
55841
|
return type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */) ? "" + type.value : void 0;
|
|
55842
55842
|
}
|
|
55843
55843
|
function getTypeForBindingElement(declaration) {
|
|
55844
|
-
const
|
|
55844
|
+
const checkMode = declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
|
|
55845
|
+
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
55845
55846
|
return parentType && getBindingElementTypeFromParentType(
|
|
55846
55847
|
declaration,
|
|
55847
55848
|
parentType,
|
|
@@ -71862,22 +71863,22 @@ function createTypeChecker(host) {
|
|
|
71862
71863
|
const type = getTypeOfSymbol(symbol);
|
|
71863
71864
|
const declaration = symbol.valueDeclaration;
|
|
71864
71865
|
if (declaration) {
|
|
71865
|
-
if (isBindingElement(declaration) && !declaration.initializer && declaration.parent.elements.length >= 2) {
|
|
71866
|
+
if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
71866
71867
|
const parent = declaration.parent.parent;
|
|
71867
71868
|
const rootDeclaration = getRootDeclaration(parent);
|
|
71868
71869
|
if (rootDeclaration.kind === 261 /* VariableDeclaration */ && getCombinedNodeFlagsCached(rootDeclaration) & 6 /* Constant */ || rootDeclaration.kind === 170 /* Parameter */) {
|
|
71869
71870
|
const links = getNodeLinks(parent);
|
|
71870
71871
|
if (!(links.flags & 4194304 /* InCheckIdentifier */)) {
|
|
71871
71872
|
links.flags |= 4194304 /* InCheckIdentifier */;
|
|
71872
|
-
const parentType = getTypeForBindingElementParent(
|
|
71873
|
-
const
|
|
71873
|
+
const parentType = getTypeForBindingElementParent(parent, 0 /* Normal */);
|
|
71874
|
+
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
71874
71875
|
links.flags &= ~4194304 /* InCheckIdentifier */;
|
|
71875
|
-
if (
|
|
71876
|
+
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(rootDeclaration.kind === 170 /* Parameter */ && isSomeSymbolAssigned(rootDeclaration))) {
|
|
71876
71877
|
const pattern = declaration.parent;
|
|
71877
71878
|
const narrowedType = getFlowTypeOfReference(
|
|
71878
71879
|
pattern,
|
|
71879
|
-
|
|
71880
|
-
|
|
71880
|
+
parentTypeConstraint,
|
|
71881
|
+
parentTypeConstraint,
|
|
71881
71882
|
/*flowContainer*/
|
|
71882
71883
|
void 0,
|
|
71883
71884
|
location.flowNode
|
|
@@ -83216,7 +83217,8 @@ function createTypeChecker(host) {
|
|
|
83216
83217
|
checkComputedPropertyName(node.propertyName);
|
|
83217
83218
|
}
|
|
83218
83219
|
const parent = node.parent.parent;
|
|
83219
|
-
const
|
|
83220
|
+
const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
|
|
83221
|
+
const parentType = getTypeForBindingElementParent(parent, parentCheckMode);
|
|
83220
83222
|
const name = node.propertyName || node.name;
|
|
83221
83223
|
if (parentType && !isBindingPattern(name)) {
|
|
83222
83224
|
const exprType = getLiteralTypeFromPropertyName(name);
|
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 = "6.0";
|
|
2289
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2289
|
+
var version = `${versionMajorMinor}.0-insiders.20250904`;
|
|
2290
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2291
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2292
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -60331,21 +60331,21 @@ function createTypeChecker(host) {
|
|
|
60331
60331
|
function isErrorType(type) {
|
|
60332
60332
|
return type === errorType || !!(type.flags & 1 /* Any */ && type.aliasSymbol);
|
|
60333
60333
|
}
|
|
60334
|
-
function getTypeForBindingElementParent(node) {
|
|
60335
|
-
|
|
60336
|
-
|
|
60337
|
-
|
|
60338
|
-
|
|
60339
|
-
|
|
60340
|
-
|
|
60341
|
-
|
|
60342
|
-
}
|
|
60334
|
+
function getTypeForBindingElementParent(node, checkMode) {
|
|
60335
|
+
if (checkMode !== 0 /* Normal */) {
|
|
60336
|
+
return getTypeForVariableLikeDeclaration(
|
|
60337
|
+
node,
|
|
60338
|
+
/*includeOptionality*/
|
|
60339
|
+
false,
|
|
60340
|
+
checkMode
|
|
60341
|
+
);
|
|
60343
60342
|
}
|
|
60344
|
-
|
|
60345
|
-
|
|
60343
|
+
const symbol = getSymbolOfDeclaration(node);
|
|
60344
|
+
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(
|
|
60345
|
+
node,
|
|
60346
60346
|
/*includeOptionality*/
|
|
60347
60347
|
false,
|
|
60348
|
-
|
|
60348
|
+
checkMode
|
|
60349
60349
|
);
|
|
60350
60350
|
}
|
|
60351
60351
|
function getRestType(source, properties, symbol) {
|
|
@@ -60450,7 +60450,8 @@ function createTypeChecker(host) {
|
|
|
60450
60450
|
return type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */) ? "" + type.value : void 0;
|
|
60451
60451
|
}
|
|
60452
60452
|
function getTypeForBindingElement(declaration) {
|
|
60453
|
-
const
|
|
60453
|
+
const checkMode = declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
|
|
60454
|
+
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
60454
60455
|
return parentType && getBindingElementTypeFromParentType(
|
|
60455
60456
|
declaration,
|
|
60456
60457
|
parentType,
|
|
@@ -76471,22 +76472,22 @@ function createTypeChecker(host) {
|
|
|
76471
76472
|
const type = getTypeOfSymbol(symbol);
|
|
76472
76473
|
const declaration = symbol.valueDeclaration;
|
|
76473
76474
|
if (declaration) {
|
|
76474
|
-
if (isBindingElement(declaration) && !declaration.initializer && declaration.parent.elements.length >= 2) {
|
|
76475
|
+
if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
76475
76476
|
const parent2 = declaration.parent.parent;
|
|
76476
76477
|
const rootDeclaration = getRootDeclaration(parent2);
|
|
76477
76478
|
if (rootDeclaration.kind === 261 /* VariableDeclaration */ && getCombinedNodeFlagsCached(rootDeclaration) & 6 /* Constant */ || rootDeclaration.kind === 170 /* Parameter */) {
|
|
76478
76479
|
const links = getNodeLinks(parent2);
|
|
76479
76480
|
if (!(links.flags & 4194304 /* InCheckIdentifier */)) {
|
|
76480
76481
|
links.flags |= 4194304 /* InCheckIdentifier */;
|
|
76481
|
-
const parentType = getTypeForBindingElementParent(
|
|
76482
|
-
const
|
|
76482
|
+
const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);
|
|
76483
|
+
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
76483
76484
|
links.flags &= ~4194304 /* InCheckIdentifier */;
|
|
76484
|
-
if (
|
|
76485
|
+
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(rootDeclaration.kind === 170 /* Parameter */ && isSomeSymbolAssigned(rootDeclaration))) {
|
|
76485
76486
|
const pattern = declaration.parent;
|
|
76486
76487
|
const narrowedType = getFlowTypeOfReference(
|
|
76487
76488
|
pattern,
|
|
76488
|
-
|
|
76489
|
-
|
|
76489
|
+
parentTypeConstraint,
|
|
76490
|
+
parentTypeConstraint,
|
|
76490
76491
|
/*flowContainer*/
|
|
76491
76492
|
void 0,
|
|
76492
76493
|
location.flowNode
|
|
@@ -87825,7 +87826,8 @@ function createTypeChecker(host) {
|
|
|
87825
87826
|
checkComputedPropertyName(node.propertyName);
|
|
87826
87827
|
}
|
|
87827
87828
|
const parent2 = node.parent.parent;
|
|
87828
|
-
const
|
|
87829
|
+
const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
|
|
87830
|
+
const parentType = getTypeForBindingElementParent(parent2, parentCheckMode);
|
|
87829
87831
|
const name = node.propertyName || node.name;
|
|
87830
87832
|
if (parentType && !isBindingPattern(name)) {
|
|
87831
87833
|
const exprType = getLiteralTypeFromPropertyName(name);
|
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": "6.0.0-pr-
|
|
5
|
+
"version": "6.0.0-pr-55267-269",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|