@typescript-deploys/pr-build 5.7.0-pr-60122-2 → 5.7.0-pr-60121-9
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 +11 -10
- package/lib/typescript.js +11 -10
- 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.7";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20241003`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -70426,7 +70426,7 @@ function createTypeChecker(host) {
|
|
|
70426
70426
|
jsxFactorySym = resolveName(
|
|
70427
70427
|
jsxFactoryLocation,
|
|
70428
70428
|
jsxFactoryNamespace,
|
|
70429
|
-
|
|
70429
|
+
111551 /* Value */,
|
|
70430
70430
|
jsxFactoryRefErr,
|
|
70431
70431
|
/*isUse*/
|
|
70432
70432
|
true
|
|
@@ -70445,7 +70445,7 @@ function createTypeChecker(host) {
|
|
|
70445
70445
|
resolveName(
|
|
70446
70446
|
jsxFactoryLocation,
|
|
70447
70447
|
localJsxNamespace,
|
|
70448
|
-
|
|
70448
|
+
111551 /* Value */,
|
|
70449
70449
|
jsxFactoryRefErr,
|
|
70450
70450
|
/*isUse*/
|
|
70451
70451
|
true
|
|
@@ -75963,12 +75963,11 @@ function createTypeChecker(host) {
|
|
|
75963
75963
|
const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node));
|
|
75964
75964
|
if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType;
|
|
75965
75965
|
const jsxFragmentFactoryName = getJsxNamespace(node);
|
|
75966
|
-
if (jsxFragmentFactoryName === "null") return sourceFileLinks.jsxFragmentType = anyType;
|
|
75967
75966
|
const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0;
|
|
75968
75967
|
const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName(
|
|
75969
75968
|
node,
|
|
75970
75969
|
jsxFragmentFactoryName,
|
|
75971
|
-
|
|
75970
|
+
111551 /* Value */,
|
|
75972
75971
|
/*nameNotFoundMessage*/
|
|
75973
75972
|
jsxFactoryRefErr,
|
|
75974
75973
|
/*isUse*/
|
|
@@ -81903,8 +81902,11 @@ function createTypeChecker(host) {
|
|
|
81903
81902
|
}
|
|
81904
81903
|
const parent = node.parent.parent;
|
|
81905
81904
|
const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
|
|
81906
|
-
const parentType = getTypeForBindingElementParent(parent, parentCheckMode);
|
|
81907
81905
|
const name = node.propertyName || node.name;
|
|
81906
|
+
let parentType = getTypeForBindingElementParent(parent, parentCheckMode);
|
|
81907
|
+
if (parentType && !parent.initializer) {
|
|
81908
|
+
parentType = checkNonNullType(parentType, parent);
|
|
81909
|
+
}
|
|
81908
81910
|
if (parentType && !isBindingPattern(name)) {
|
|
81909
81911
|
const exprType = getLiteralTypeFromPropertyName(name);
|
|
81910
81912
|
if (isTypeUsableAsPropertyName(exprType)) {
|
|
@@ -81944,16 +81946,15 @@ function createTypeChecker(host) {
|
|
|
81944
81946
|
if (isInAmbientOrTypeNode(node)) {
|
|
81945
81947
|
return;
|
|
81946
81948
|
}
|
|
81947
|
-
const needCheckInitializer =
|
|
81949
|
+
const needCheckInitializer = node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */;
|
|
81948
81950
|
const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression));
|
|
81949
81951
|
if (needCheckInitializer || needCheckWidenedType) {
|
|
81950
81952
|
const widenedType = getWidenedTypeForVariableLikeDeclaration(node);
|
|
81951
81953
|
if (needCheckInitializer) {
|
|
81952
|
-
const initializerType = checkExpressionCached(node.initializer);
|
|
81953
81954
|
if (strictNullChecks && needCheckWidenedType) {
|
|
81954
|
-
checkNonNullNonVoidType(
|
|
81955
|
+
checkNonNullNonVoidType(checkExpressionCached(node.initializer), node);
|
|
81955
81956
|
} else {
|
|
81956
|
-
checkTypeAssignableToAndOptionallyElaborate(
|
|
81957
|
+
checkTypeAssignableToAndOptionallyElaborate(checkNonNullExpression(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, node.initializer);
|
|
81957
81958
|
}
|
|
81958
81959
|
}
|
|
81959
81960
|
if (needCheckWidenedType) {
|
package/lib/typescript.js
CHANGED
|
@@ -2277,7 +2277,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2277
2277
|
|
|
2278
2278
|
// src/compiler/corePublic.ts
|
|
2279
2279
|
var versionMajorMinor = "5.7";
|
|
2280
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2280
|
+
var version = `${versionMajorMinor}.0-insiders.20241003`;
|
|
2281
2281
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2282
2282
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2283
2283
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -75029,7 +75029,7 @@ function createTypeChecker(host) {
|
|
|
75029
75029
|
jsxFactorySym = resolveName(
|
|
75030
75030
|
jsxFactoryLocation,
|
|
75031
75031
|
jsxFactoryNamespace,
|
|
75032
|
-
|
|
75032
|
+
111551 /* Value */,
|
|
75033
75033
|
jsxFactoryRefErr,
|
|
75034
75034
|
/*isUse*/
|
|
75035
75035
|
true
|
|
@@ -75048,7 +75048,7 @@ function createTypeChecker(host) {
|
|
|
75048
75048
|
resolveName(
|
|
75049
75049
|
jsxFactoryLocation,
|
|
75050
75050
|
localJsxNamespace,
|
|
75051
|
-
|
|
75051
|
+
111551 /* Value */,
|
|
75052
75052
|
jsxFactoryRefErr,
|
|
75053
75053
|
/*isUse*/
|
|
75054
75054
|
true
|
|
@@ -80566,12 +80566,11 @@ function createTypeChecker(host) {
|
|
|
80566
80566
|
const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node));
|
|
80567
80567
|
if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType;
|
|
80568
80568
|
const jsxFragmentFactoryName = getJsxNamespace(node);
|
|
80569
|
-
if (jsxFragmentFactoryName === "null") return sourceFileLinks.jsxFragmentType = anyType;
|
|
80570
80569
|
const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0;
|
|
80571
80570
|
const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName(
|
|
80572
80571
|
node,
|
|
80573
80572
|
jsxFragmentFactoryName,
|
|
80574
|
-
|
|
80573
|
+
111551 /* Value */,
|
|
80575
80574
|
/*nameNotFoundMessage*/
|
|
80576
80575
|
jsxFactoryRefErr,
|
|
80577
80576
|
/*isUse*/
|
|
@@ -86506,8 +86505,11 @@ function createTypeChecker(host) {
|
|
|
86506
86505
|
}
|
|
86507
86506
|
const parent2 = node.parent.parent;
|
|
86508
86507
|
const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
|
|
86509
|
-
const parentType = getTypeForBindingElementParent(parent2, parentCheckMode);
|
|
86510
86508
|
const name = node.propertyName || node.name;
|
|
86509
|
+
let parentType = getTypeForBindingElementParent(parent2, parentCheckMode);
|
|
86510
|
+
if (parentType && !parent2.initializer) {
|
|
86511
|
+
parentType = checkNonNullType(parentType, parent2);
|
|
86512
|
+
}
|
|
86511
86513
|
if (parentType && !isBindingPattern(name)) {
|
|
86512
86514
|
const exprType = getLiteralTypeFromPropertyName(name);
|
|
86513
86515
|
if (isTypeUsableAsPropertyName(exprType)) {
|
|
@@ -86547,16 +86549,15 @@ function createTypeChecker(host) {
|
|
|
86547
86549
|
if (isInAmbientOrTypeNode(node)) {
|
|
86548
86550
|
return;
|
|
86549
86551
|
}
|
|
86550
|
-
const needCheckInitializer =
|
|
86552
|
+
const needCheckInitializer = node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */;
|
|
86551
86553
|
const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression));
|
|
86552
86554
|
if (needCheckInitializer || needCheckWidenedType) {
|
|
86553
86555
|
const widenedType = getWidenedTypeForVariableLikeDeclaration(node);
|
|
86554
86556
|
if (needCheckInitializer) {
|
|
86555
|
-
const initializerType = checkExpressionCached(node.initializer);
|
|
86556
86557
|
if (strictNullChecks && needCheckWidenedType) {
|
|
86557
|
-
checkNonNullNonVoidType(
|
|
86558
|
+
checkNonNullNonVoidType(checkExpressionCached(node.initializer), node);
|
|
86558
86559
|
} else {
|
|
86559
|
-
checkTypeAssignableToAndOptionallyElaborate(
|
|
86560
|
+
checkTypeAssignableToAndOptionallyElaborate(checkNonNullExpression(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, node.initializer);
|
|
86560
86561
|
}
|
|
86561
86562
|
}
|
|
86562
86563
|
if (needCheckWidenedType) {
|
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.7.0-pr-
|
|
5
|
+
"version": "5.7.0-pr-60121-9",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|