typescript 5.8.0-dev.20250107 → 5.8.0-dev.20250109
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/README.md +1 -1
- package/lib/_tsc.js +4 -2
- package/lib/typescript.js +9 -8
- package/package.json +2 -2
package/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
# TypeScript
|
3
3
|
|
4
|
-
[](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml)
|
5
5
|
[](https://www.npmjs.com/package/typescript)
|
6
6
|
[](https://www.npmjs.com/package/typescript)
|
7
7
|
[](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript)
|
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.8";
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20250109`;
|
22
22
|
|
23
23
|
// src/compiler/core.ts
|
24
24
|
var emptyArray = [];
|
@@ -42534,7 +42534,9 @@ function createBinder() {
|
|
42534
42534
|
case 36 /* ExclamationEqualsToken */:
|
42535
42535
|
case 37 /* EqualsEqualsEqualsToken */:
|
42536
42536
|
case 38 /* ExclamationEqualsEqualsToken */:
|
42537
|
-
|
42537
|
+
const left = skipParentheses(expr.left);
|
42538
|
+
const right = skipParentheses(expr.right);
|
42539
|
+
return isNarrowableOperand(left) || isNarrowableOperand(right) || isNarrowingTypeofOperands(right, left) || isNarrowingTypeofOperands(left, right) || (isBooleanLiteral(right) && isNarrowingExpression(left) || isBooleanLiteral(left) && isNarrowingExpression(right));
|
42538
42540
|
case 104 /* InstanceOfKeyword */:
|
42539
42541
|
return isNarrowableOperand(expr.left);
|
42540
42542
|
case 103 /* InKeyword */:
|
package/lib/typescript.js
CHANGED
@@ -2279,7 +2279,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
2279
2279
|
|
2280
2280
|
// src/compiler/corePublic.ts
|
2281
2281
|
var versionMajorMinor = "5.8";
|
2282
|
-
var version = `${versionMajorMinor}.0-dev.
|
2282
|
+
var version = `${versionMajorMinor}.0-dev.20250109`;
|
2283
2283
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
2284
2284
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
2285
2285
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
@@ -47038,7 +47038,9 @@ function createBinder() {
|
|
47038
47038
|
case 36 /* ExclamationEqualsToken */:
|
47039
47039
|
case 37 /* EqualsEqualsEqualsToken */:
|
47040
47040
|
case 38 /* ExclamationEqualsEqualsToken */:
|
47041
|
-
|
47041
|
+
const left = skipParentheses(expr.left);
|
47042
|
+
const right = skipParentheses(expr.right);
|
47043
|
+
return isNarrowableOperand(left) || isNarrowableOperand(right) || isNarrowingTypeofOperands(right, left) || isNarrowingTypeofOperands(left, right) || (isBooleanLiteral(right) && isNarrowingExpression(left) || isBooleanLiteral(left) && isNarrowingExpression(right));
|
47042
47044
|
case 104 /* InstanceOfKeyword */:
|
47043
47045
|
return isNarrowableOperand(expr.left);
|
47044
47046
|
case 103 /* InKeyword */:
|
@@ -195451,20 +195453,19 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
195451
195453
|
try {
|
195452
195454
|
codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, this.getFormatOptions(file), this.getPreferences(file));
|
195453
195455
|
} catch (e) {
|
195456
|
+
const error2 = e instanceof Error ? e : new Error(e);
|
195454
195457
|
const ls = project.getLanguageService();
|
195455
195458
|
const existingDiagCodes = [
|
195456
195459
|
...ls.getSyntacticDiagnostics(file),
|
195457
195460
|
...ls.getSemanticDiagnostics(file),
|
195458
195461
|
...ls.getSuggestionDiagnostics(file)
|
195459
|
-
].map(
|
195460
|
-
(d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length) && d.code
|
195461
|
-
);
|
195462
|
+
].filter((d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length)).map((d) => d.code);
|
195462
195463
|
const badCode = args.errorCodes.find((c) => !existingDiagCodes.includes(c));
|
195463
195464
|
if (badCode !== void 0) {
|
195464
|
-
|
195465
|
-
${
|
195465
|
+
error2.message += `
|
195466
|
+
Additional information: BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(", ")})`;
|
195466
195467
|
}
|
195467
|
-
throw
|
195468
|
+
throw error2;
|
195468
195469
|
}
|
195469
195470
|
return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions;
|
195470
195471
|
}
|
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.8.0-dev.
|
5
|
+
"version": "5.8.0-dev.20250109",
|
6
6
|
"license": "Apache-2.0",
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
8
8
|
"keywords": [
|
@@ -116,5 +116,5 @@
|
|
116
116
|
"node": "20.1.0",
|
117
117
|
"npm": "8.19.4"
|
118
118
|
},
|
119
|
-
"gitHead": "
|
119
|
+
"gitHead": "e1cef5fa3a616bd800fa5e23c2312fc9f951e59f"
|
120
120
|
}
|