typescript 5.2.0-dev.20230807 → 5.2.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 +1 -1
- package/lib/tsserver.js +21 -13
- package/lib/tsserverlibrary.js +21 -13
- package/lib/typescript.js +6 -6
- package/lib/typingsInstaller.js +1 -1
- package/package.json +3 -4
package/lib/tsc.js
CHANGED
package/lib/tsserver.js
CHANGED
|
@@ -2331,7 +2331,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2331
2331
|
|
|
2332
2332
|
// src/compiler/corePublic.ts
|
|
2333
2333
|
var versionMajorMinor = "5.2";
|
|
2334
|
-
var version =
|
|
2334
|
+
var version = "5.2.2";
|
|
2335
2335
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2336
2336
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2337
2337
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -164760,11 +164760,11 @@ function provideInlayHints(context) {
|
|
|
164760
164760
|
function isSignatureSupportingReturnAnnotation(node) {
|
|
164761
164761
|
return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node);
|
|
164762
164762
|
}
|
|
164763
|
-
function addParameterHints(text, parameter, position, isFirstVariadicArgument
|
|
164763
|
+
function addParameterHints(text, parameter, position, isFirstVariadicArgument) {
|
|
164764
164764
|
let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`;
|
|
164765
164765
|
let displayParts;
|
|
164766
164766
|
if (shouldUseInteractiveInlayHints(preferences)) {
|
|
164767
|
-
displayParts = [getNodeDisplayPart(hintText, parameter
|
|
164767
|
+
displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }];
|
|
164768
164768
|
hintText = "";
|
|
164769
164769
|
} else {
|
|
164770
164770
|
hintText += ":";
|
|
@@ -164837,7 +164837,6 @@ function provideInlayHints(context) {
|
|
|
164837
164837
|
return;
|
|
164838
164838
|
}
|
|
164839
164839
|
let signatureParamPos = 0;
|
|
164840
|
-
const sourceFile = shouldUseInteractiveInlayHints(preferences) ? expr.getSourceFile() : void 0;
|
|
164841
164840
|
for (const originalArg of args) {
|
|
164842
164841
|
const arg = skipParentheses(originalArg);
|
|
164843
164842
|
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
|
|
@@ -164870,7 +164869,7 @@ function provideInlayHints(context) {
|
|
|
164870
164869
|
if (leadingCommentsContainsParameterName(arg, name)) {
|
|
164871
164870
|
continue;
|
|
164872
164871
|
}
|
|
164873
|
-
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument
|
|
164872
|
+
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument);
|
|
164874
164873
|
}
|
|
164875
164874
|
}
|
|
164876
164875
|
}
|
|
@@ -165006,7 +165005,8 @@ function provideInlayHints(context) {
|
|
|
165006
165005
|
}
|
|
165007
165006
|
return true;
|
|
165008
165007
|
}
|
|
165009
|
-
function getNodeDisplayPart(text, node
|
|
165008
|
+
function getNodeDisplayPart(text, node) {
|
|
165009
|
+
const sourceFile = node.getSourceFile();
|
|
165010
165010
|
return {
|
|
165011
165011
|
text,
|
|
165012
165012
|
span: createTextSpanFromNode(node, sourceFile),
|
|
@@ -183666,14 +183666,22 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
183666
183666
|
return {
|
|
183667
183667
|
...hint,
|
|
183668
183668
|
position: scriptInfo.positionToLineOffset(position),
|
|
183669
|
-
displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) =>
|
|
183670
|
-
|
|
183671
|
-
|
|
183672
|
-
|
|
183673
|
-
|
|
183674
|
-
|
|
183669
|
+
displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => {
|
|
183670
|
+
if (span) {
|
|
183671
|
+
Debug.assertIsDefined(file2, "Target file should be defined together with its span.");
|
|
183672
|
+
const scriptInfo2 = this.projectService.getScriptInfo(file2);
|
|
183673
|
+
return {
|
|
183674
|
+
text,
|
|
183675
|
+
span: {
|
|
183676
|
+
start: scriptInfo2.positionToLineOffset(span.start),
|
|
183677
|
+
end: scriptInfo2.positionToLineOffset(span.start + span.length),
|
|
183678
|
+
file: file2
|
|
183679
|
+
}
|
|
183680
|
+
};
|
|
183681
|
+
} else {
|
|
183682
|
+
return { text };
|
|
183675
183683
|
}
|
|
183676
|
-
})
|
|
183684
|
+
})
|
|
183677
183685
|
};
|
|
183678
183686
|
});
|
|
183679
183687
|
}
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.2";
|
|
38
|
-
version =
|
|
38
|
+
version = "5.2.2";
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -164108,11 +164108,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164108
164108
|
function isSignatureSupportingReturnAnnotation(node) {
|
|
164109
164109
|
return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node);
|
|
164110
164110
|
}
|
|
164111
|
-
function addParameterHints(text, parameter, position, isFirstVariadicArgument
|
|
164111
|
+
function addParameterHints(text, parameter, position, isFirstVariadicArgument) {
|
|
164112
164112
|
let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`;
|
|
164113
164113
|
let displayParts;
|
|
164114
164114
|
if (shouldUseInteractiveInlayHints(preferences)) {
|
|
164115
|
-
displayParts = [getNodeDisplayPart(hintText, parameter
|
|
164115
|
+
displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }];
|
|
164116
164116
|
hintText = "";
|
|
164117
164117
|
} else {
|
|
164118
164118
|
hintText += ":";
|
|
@@ -164185,7 +164185,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164185
164185
|
return;
|
|
164186
164186
|
}
|
|
164187
164187
|
let signatureParamPos = 0;
|
|
164188
|
-
const sourceFile = shouldUseInteractiveInlayHints(preferences) ? expr.getSourceFile() : void 0;
|
|
164189
164188
|
for (const originalArg of args) {
|
|
164190
164189
|
const arg = skipParentheses(originalArg);
|
|
164191
164190
|
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
|
|
@@ -164218,7 +164217,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164218
164217
|
if (leadingCommentsContainsParameterName(arg, name)) {
|
|
164219
164218
|
continue;
|
|
164220
164219
|
}
|
|
164221
|
-
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument
|
|
164220
|
+
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument);
|
|
164222
164221
|
}
|
|
164223
164222
|
}
|
|
164224
164223
|
}
|
|
@@ -164354,7 +164353,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164354
164353
|
}
|
|
164355
164354
|
return true;
|
|
164356
164355
|
}
|
|
164357
|
-
function getNodeDisplayPart(text, node
|
|
164356
|
+
function getNodeDisplayPart(text, node) {
|
|
164357
|
+
const sourceFile = node.getSourceFile();
|
|
164358
164358
|
return {
|
|
164359
164359
|
text,
|
|
164360
164360
|
span: createTextSpanFromNode(node, sourceFile),
|
|
@@ -181073,14 +181073,22 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
181073
181073
|
return {
|
|
181074
181074
|
...hint,
|
|
181075
181075
|
position: scriptInfo.positionToLineOffset(position),
|
|
181076
|
-
displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) =>
|
|
181077
|
-
|
|
181078
|
-
|
|
181079
|
-
|
|
181080
|
-
|
|
181081
|
-
|
|
181076
|
+
displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => {
|
|
181077
|
+
if (span) {
|
|
181078
|
+
Debug.assertIsDefined(file2, "Target file should be defined together with its span.");
|
|
181079
|
+
const scriptInfo2 = this.projectService.getScriptInfo(file2);
|
|
181080
|
+
return {
|
|
181081
|
+
text,
|
|
181082
|
+
span: {
|
|
181083
|
+
start: scriptInfo2.positionToLineOffset(span.start),
|
|
181084
|
+
end: scriptInfo2.positionToLineOffset(span.start + span.length),
|
|
181085
|
+
file: file2
|
|
181086
|
+
}
|
|
181087
|
+
};
|
|
181088
|
+
} else {
|
|
181089
|
+
return { text };
|
|
181082
181090
|
}
|
|
181083
|
-
})
|
|
181091
|
+
})
|
|
181084
181092
|
};
|
|
181085
181093
|
});
|
|
181086
181094
|
}
|
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.2";
|
|
38
|
-
version =
|
|
38
|
+
version = "5.2.2";
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -164123,11 +164123,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164123
164123
|
function isSignatureSupportingReturnAnnotation(node) {
|
|
164124
164124
|
return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node);
|
|
164125
164125
|
}
|
|
164126
|
-
function addParameterHints(text, parameter, position, isFirstVariadicArgument
|
|
164126
|
+
function addParameterHints(text, parameter, position, isFirstVariadicArgument) {
|
|
164127
164127
|
let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`;
|
|
164128
164128
|
let displayParts;
|
|
164129
164129
|
if (shouldUseInteractiveInlayHints(preferences)) {
|
|
164130
|
-
displayParts = [getNodeDisplayPart(hintText, parameter
|
|
164130
|
+
displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }];
|
|
164131
164131
|
hintText = "";
|
|
164132
164132
|
} else {
|
|
164133
164133
|
hintText += ":";
|
|
@@ -164200,7 +164200,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164200
164200
|
return;
|
|
164201
164201
|
}
|
|
164202
164202
|
let signatureParamPos = 0;
|
|
164203
|
-
const sourceFile = shouldUseInteractiveInlayHints(preferences) ? expr.getSourceFile() : void 0;
|
|
164204
164203
|
for (const originalArg of args) {
|
|
164205
164204
|
const arg = skipParentheses(originalArg);
|
|
164206
164205
|
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
|
|
@@ -164233,7 +164232,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164233
164232
|
if (leadingCommentsContainsParameterName(arg, name)) {
|
|
164234
164233
|
continue;
|
|
164235
164234
|
}
|
|
164236
|
-
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument
|
|
164235
|
+
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument);
|
|
164237
164236
|
}
|
|
164238
164237
|
}
|
|
164239
164238
|
}
|
|
@@ -164369,7 +164368,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164369
164368
|
}
|
|
164370
164369
|
return true;
|
|
164371
164370
|
}
|
|
164372
|
-
function getNodeDisplayPart(text, node
|
|
164371
|
+
function getNodeDisplayPart(text, node) {
|
|
164372
|
+
const sourceFile = node.getSourceFile();
|
|
164373
164373
|
return {
|
|
164374
164374
|
text,
|
|
164375
164375
|
span: createTextSpanFromNode(node, sourceFile),
|
package/lib/typingsInstaller.js
CHANGED
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.2.
|
|
5
|
+
"version": "5.2.2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -112,6 +112,5 @@
|
|
|
112
112
|
"volta": {
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
}
|
|
115
|
+
}
|
|
116
|
+
}
|