typescript 5.3.0-dev.20230820 → 5.3.0-dev.20230822
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 +24 -18
- package/lib/tsserver.js +24 -18
- package/lib/typescript.js +24 -18
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
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.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20230822`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -54740,7 +54740,7 @@ function createTypeChecker(host) {
|
|
|
54740
54740
|
}
|
|
54741
54741
|
const iife = getImmediatelyInvokedFunctionExpression(node.parent);
|
|
54742
54742
|
if (iife) {
|
|
54743
|
-
return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.
|
|
54743
|
+
return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length;
|
|
54744
54744
|
}
|
|
54745
54745
|
return false;
|
|
54746
54746
|
}
|
|
@@ -72040,14 +72040,14 @@ function createTypeChecker(host) {
|
|
|
72040
72040
|
return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType;
|
|
72041
72041
|
}
|
|
72042
72042
|
function getTypeOfParameter(symbol) {
|
|
72043
|
-
const
|
|
72044
|
-
|
|
72045
|
-
|
|
72046
|
-
|
|
72047
|
-
|
|
72048
|
-
|
|
72049
|
-
|
|
72050
|
-
|
|
72043
|
+
const declaration = symbol.valueDeclaration;
|
|
72044
|
+
return addOptionality(
|
|
72045
|
+
getTypeOfSymbol(symbol),
|
|
72046
|
+
/*isProperty*/
|
|
72047
|
+
false,
|
|
72048
|
+
/*isOptional*/
|
|
72049
|
+
!!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
|
|
72050
|
+
);
|
|
72051
72051
|
}
|
|
72052
72052
|
function getTupleElementLabel(d, index, restParameterName = "arg") {
|
|
72053
72053
|
if (!d) {
|
|
@@ -72314,23 +72314,29 @@ function createTypeChecker(host) {
|
|
|
72314
72314
|
assignParameterType(parameter);
|
|
72315
72315
|
}
|
|
72316
72316
|
}
|
|
72317
|
-
function assignParameterType(parameter,
|
|
72317
|
+
function assignParameterType(parameter, contextualType) {
|
|
72318
72318
|
const links = getSymbolLinks(parameter);
|
|
72319
72319
|
if (!links.type) {
|
|
72320
72320
|
const declaration = parameter.valueDeclaration;
|
|
72321
|
-
links.type =
|
|
72322
|
-
declaration
|
|
72323
|
-
|
|
72324
|
-
|
|
72325
|
-
|
|
72321
|
+
links.type = addOptionality(
|
|
72322
|
+
contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration(
|
|
72323
|
+
declaration,
|
|
72324
|
+
/*reportErrors*/
|
|
72325
|
+
true
|
|
72326
|
+
) : getTypeOfSymbol(parameter)),
|
|
72327
|
+
/*isProperty*/
|
|
72328
|
+
false,
|
|
72329
|
+
/*isOptional*/
|
|
72330
|
+
!!declaration && !declaration.initializer && isOptionalDeclaration(declaration)
|
|
72331
|
+
);
|
|
72326
72332
|
if (declaration && declaration.name.kind !== 80 /* Identifier */) {
|
|
72327
72333
|
if (links.type === unknownType) {
|
|
72328
72334
|
links.type = getTypeFromBindingPattern(declaration.name);
|
|
72329
72335
|
}
|
|
72330
72336
|
assignBindingElementTypes(declaration.name, links.type);
|
|
72331
72337
|
}
|
|
72332
|
-
} else if (
|
|
72333
|
-
Debug.assertEqual(links.type,
|
|
72338
|
+
} else if (contextualType) {
|
|
72339
|
+
Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type");
|
|
72334
72340
|
}
|
|
72335
72341
|
}
|
|
72336
72342
|
function assignBindingElementTypes(pattern, parentType) {
|
package/lib/tsserver.js
CHANGED
|
@@ -2333,7 +2333,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2333
2333
|
|
|
2334
2334
|
// src/compiler/corePublic.ts
|
|
2335
2335
|
var versionMajorMinor = "5.3";
|
|
2336
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2336
|
+
var version = `${versionMajorMinor}.0-dev.20230822`;
|
|
2337
2337
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2338
2338
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2339
2339
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -59448,7 +59448,7 @@ function createTypeChecker(host) {
|
|
|
59448
59448
|
}
|
|
59449
59449
|
const iife = getImmediatelyInvokedFunctionExpression(node.parent);
|
|
59450
59450
|
if (iife) {
|
|
59451
|
-
return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.
|
|
59451
|
+
return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length;
|
|
59452
59452
|
}
|
|
59453
59453
|
return false;
|
|
59454
59454
|
}
|
|
@@ -76748,14 +76748,14 @@ function createTypeChecker(host) {
|
|
|
76748
76748
|
return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType;
|
|
76749
76749
|
}
|
|
76750
76750
|
function getTypeOfParameter(symbol) {
|
|
76751
|
-
const
|
|
76752
|
-
|
|
76753
|
-
|
|
76754
|
-
|
|
76755
|
-
|
|
76756
|
-
|
|
76757
|
-
|
|
76758
|
-
|
|
76751
|
+
const declaration = symbol.valueDeclaration;
|
|
76752
|
+
return addOptionality(
|
|
76753
|
+
getTypeOfSymbol(symbol),
|
|
76754
|
+
/*isProperty*/
|
|
76755
|
+
false,
|
|
76756
|
+
/*isOptional*/
|
|
76757
|
+
!!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
|
|
76758
|
+
);
|
|
76759
76759
|
}
|
|
76760
76760
|
function getTupleElementLabel(d, index, restParameterName = "arg") {
|
|
76761
76761
|
if (!d) {
|
|
@@ -77022,23 +77022,29 @@ function createTypeChecker(host) {
|
|
|
77022
77022
|
assignParameterType(parameter);
|
|
77023
77023
|
}
|
|
77024
77024
|
}
|
|
77025
|
-
function assignParameterType(parameter,
|
|
77025
|
+
function assignParameterType(parameter, contextualType) {
|
|
77026
77026
|
const links = getSymbolLinks(parameter);
|
|
77027
77027
|
if (!links.type) {
|
|
77028
77028
|
const declaration = parameter.valueDeclaration;
|
|
77029
|
-
links.type =
|
|
77030
|
-
declaration
|
|
77031
|
-
|
|
77032
|
-
|
|
77033
|
-
|
|
77029
|
+
links.type = addOptionality(
|
|
77030
|
+
contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration(
|
|
77031
|
+
declaration,
|
|
77032
|
+
/*reportErrors*/
|
|
77033
|
+
true
|
|
77034
|
+
) : getTypeOfSymbol(parameter)),
|
|
77035
|
+
/*isProperty*/
|
|
77036
|
+
false,
|
|
77037
|
+
/*isOptional*/
|
|
77038
|
+
!!declaration && !declaration.initializer && isOptionalDeclaration(declaration)
|
|
77039
|
+
);
|
|
77034
77040
|
if (declaration && declaration.name.kind !== 80 /* Identifier */) {
|
|
77035
77041
|
if (links.type === unknownType) {
|
|
77036
77042
|
links.type = getTypeFromBindingPattern(declaration.name);
|
|
77037
77043
|
}
|
|
77038
77044
|
assignBindingElementTypes(declaration.name, links.type);
|
|
77039
77045
|
}
|
|
77040
|
-
} else if (
|
|
77041
|
-
Debug.assertEqual(links.type,
|
|
77046
|
+
} else if (contextualType) {
|
|
77047
|
+
Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type");
|
|
77042
77048
|
}
|
|
77043
77049
|
}
|
|
77044
77050
|
function assignBindingElementTypes(pattern, parentType) {
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230822`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -57209,7 +57209,7 @@ ${lanes.join("\n")}
|
|
|
57209
57209
|
}
|
|
57210
57210
|
const iife = getImmediatelyInvokedFunctionExpression(node.parent);
|
|
57211
57211
|
if (iife) {
|
|
57212
|
-
return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.
|
|
57212
|
+
return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length;
|
|
57213
57213
|
}
|
|
57214
57214
|
return false;
|
|
57215
57215
|
}
|
|
@@ -74509,14 +74509,14 @@ ${lanes.join("\n")}
|
|
|
74509
74509
|
return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType;
|
|
74510
74510
|
}
|
|
74511
74511
|
function getTypeOfParameter(symbol) {
|
|
74512
|
-
const
|
|
74513
|
-
|
|
74514
|
-
|
|
74515
|
-
|
|
74516
|
-
|
|
74517
|
-
|
|
74518
|
-
|
|
74519
|
-
|
|
74512
|
+
const declaration = symbol.valueDeclaration;
|
|
74513
|
+
return addOptionality(
|
|
74514
|
+
getTypeOfSymbol(symbol),
|
|
74515
|
+
/*isProperty*/
|
|
74516
|
+
false,
|
|
74517
|
+
/*isOptional*/
|
|
74518
|
+
!!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
|
|
74519
|
+
);
|
|
74520
74520
|
}
|
|
74521
74521
|
function getTupleElementLabel(d, index, restParameterName = "arg") {
|
|
74522
74522
|
if (!d) {
|
|
@@ -74783,23 +74783,29 @@ ${lanes.join("\n")}
|
|
|
74783
74783
|
assignParameterType(parameter);
|
|
74784
74784
|
}
|
|
74785
74785
|
}
|
|
74786
|
-
function assignParameterType(parameter,
|
|
74786
|
+
function assignParameterType(parameter, contextualType) {
|
|
74787
74787
|
const links = getSymbolLinks(parameter);
|
|
74788
74788
|
if (!links.type) {
|
|
74789
74789
|
const declaration = parameter.valueDeclaration;
|
|
74790
|
-
links.type =
|
|
74791
|
-
declaration
|
|
74792
|
-
|
|
74793
|
-
|
|
74794
|
-
|
|
74790
|
+
links.type = addOptionality(
|
|
74791
|
+
contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration(
|
|
74792
|
+
declaration,
|
|
74793
|
+
/*reportErrors*/
|
|
74794
|
+
true
|
|
74795
|
+
) : getTypeOfSymbol(parameter)),
|
|
74796
|
+
/*isProperty*/
|
|
74797
|
+
false,
|
|
74798
|
+
/*isOptional*/
|
|
74799
|
+
!!declaration && !declaration.initializer && isOptionalDeclaration(declaration)
|
|
74800
|
+
);
|
|
74795
74801
|
if (declaration && declaration.name.kind !== 80 /* Identifier */) {
|
|
74796
74802
|
if (links.type === unknownType) {
|
|
74797
74803
|
links.type = getTypeFromBindingPattern(declaration.name);
|
|
74798
74804
|
}
|
|
74799
74805
|
assignBindingElementTypes(declaration.name, links.type);
|
|
74800
74806
|
}
|
|
74801
|
-
} else if (
|
|
74802
|
-
Debug.assertEqual(links.type,
|
|
74807
|
+
} else if (contextualType) {
|
|
74808
|
+
Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type");
|
|
74803
74809
|
}
|
|
74804
74810
|
}
|
|
74805
74811
|
function assignBindingElementTypes(pattern, parentType) {
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230822`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.3.0-dev.
|
|
5
|
+
"version": "5.3.0-dev.20230822",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "5439c8111de50fa6ea239f95fc23c76dc868fc07"
|
|
119
119
|
}
|