typescript 6.0.0-dev.20260201 → 6.0.0-dev.20260203
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 +30 -10
- package/lib/typescript.js +31 -10
- 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 = "6.0";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20260203`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -17963,7 +17963,23 @@ var _computedOptions = createComputedCompilerOptions({
|
|
|
17963
17963
|
module: {
|
|
17964
17964
|
dependencies: ["target"],
|
|
17965
17965
|
computeValue: (compilerOptions) => {
|
|
17966
|
-
|
|
17966
|
+
if (typeof compilerOptions.module === "number") {
|
|
17967
|
+
return compilerOptions.module;
|
|
17968
|
+
}
|
|
17969
|
+
const target = _computedOptions.target.computeValue(compilerOptions);
|
|
17970
|
+
if (target === 99 /* ESNext */) {
|
|
17971
|
+
return 99 /* ESNext */;
|
|
17972
|
+
}
|
|
17973
|
+
if (target >= 9 /* ES2022 */) {
|
|
17974
|
+
return 7 /* ES2022 */;
|
|
17975
|
+
}
|
|
17976
|
+
if (target >= 7 /* ES2020 */) {
|
|
17977
|
+
return 6 /* ES2020 */;
|
|
17978
|
+
}
|
|
17979
|
+
if (target >= 2 /* ES2015 */) {
|
|
17980
|
+
return 5 /* ES2015 */;
|
|
17981
|
+
}
|
|
17982
|
+
return 1 /* CommonJS */;
|
|
17967
17983
|
}
|
|
17968
17984
|
},
|
|
17969
17985
|
moduleResolution: {
|
|
@@ -42719,7 +42735,7 @@ function createBinder() {
|
|
|
42719
42735
|
currentExceptionTarget = saveExceptionTarget;
|
|
42720
42736
|
activeLabelList = saveActiveLabelList;
|
|
42721
42737
|
hasExplicitReturn = saveHasExplicitReturn;
|
|
42722
|
-
seenThisKeyword =
|
|
42738
|
+
seenThisKeyword = containerFlags & 256 /* PropagatesThisKeyword */ ? saveSeenThisKeyword || seenThisKeyword : saveSeenThisKeyword;
|
|
42723
42739
|
} else if (containerFlags & 64 /* IsInterface */) {
|
|
42724
42740
|
const saveSeenThisKeyword = seenThisKeyword;
|
|
42725
42741
|
seenThisKeyword = false;
|
|
@@ -45085,12 +45101,13 @@ function getContainerFlags(node) {
|
|
|
45085
45101
|
case 185 /* FunctionType */:
|
|
45086
45102
|
case 181 /* ConstructSignature */:
|
|
45087
45103
|
case 186 /* ConstructorType */:
|
|
45088
|
-
return 1 /* IsContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
45104
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 256 /* PropagatesThisKeyword */;
|
|
45089
45105
|
case 352 /* JSDocImportTag */:
|
|
45090
|
-
return 1 /* IsContainer */ | 32 /* HasLocals */;
|
|
45106
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 256 /* PropagatesThisKeyword */;
|
|
45091
45107
|
case 219 /* FunctionExpression */:
|
|
45092
|
-
case 220 /* ArrowFunction */:
|
|
45093
45108
|
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
|
|
45109
|
+
case 220 /* ArrowFunction */:
|
|
45110
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */ | 256 /* PropagatesThisKeyword */;
|
|
45094
45111
|
case 269 /* ModuleBlock */:
|
|
45095
45112
|
return 4 /* IsControlFlowContainer */;
|
|
45096
45113
|
case 300 /* CatchClause */:
|
|
@@ -51239,7 +51256,7 @@ function createTypeChecker(host) {
|
|
|
51239
51256
|
return parentName;
|
|
51240
51257
|
}
|
|
51241
51258
|
const memberName = symbolName(type.symbol);
|
|
51242
|
-
if (isIdentifierText(memberName,
|
|
51259
|
+
if (isIdentifierText(memberName, 99 /* ESNext */)) {
|
|
51243
51260
|
return appendReferenceToType(
|
|
51244
51261
|
parentName,
|
|
51245
51262
|
factory.createTypeReferenceNode(
|
|
@@ -84625,7 +84642,7 @@ function createTypeChecker(host) {
|
|
|
84625
84642
|
}
|
|
84626
84643
|
}
|
|
84627
84644
|
function checkClassNameCollisionWithObject(name) {
|
|
84628
|
-
if (
|
|
84645
|
+
if (name.escapedText === "Object" && host.getEmitModuleFormatOfFile(getSourceFileOfNode(name)) < 5 /* ES2015 */) {
|
|
84629
84646
|
error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0, ModuleKind[moduleKind]);
|
|
84630
84647
|
}
|
|
84631
84648
|
}
|
|
@@ -86036,6 +86053,9 @@ function createTypeChecker(host) {
|
|
|
86036
86053
|
if (102 /* Node20 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ && !isImportAttributes2) {
|
|
86037
86054
|
return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);
|
|
86038
86055
|
}
|
|
86056
|
+
if (!isImportAttributes2 && compilerOptions.ignoreDeprecations !== "6.0") {
|
|
86057
|
+
grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);
|
|
86058
|
+
}
|
|
86039
86059
|
if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === 1 /* CommonJS */) {
|
|
86040
86060
|
return grammarErrorOnNode(
|
|
86041
86061
|
node,
|
|
@@ -93942,7 +93962,7 @@ function transformTypeScript(context) {
|
|
|
93942
93962
|
}
|
|
93943
93963
|
function visitClassDeclaration(node) {
|
|
93944
93964
|
const facts = getClassFacts(node);
|
|
93945
|
-
const promoteToIIFE = languageVersion
|
|
93965
|
+
const promoteToIIFE = languageVersion < 2 /* ES2015 */ && !!(facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */);
|
|
93946
93966
|
if (!isClassLikeDeclarationWithTypeScriptSyntax(node) && !classOrConstructorParameterIsDecorated(legacyDecorators, node) && !isExportOfNamespace(node)) {
|
|
93947
93967
|
return factory2.updateClassDeclaration(
|
|
93948
93968
|
node,
|
|
@@ -117717,7 +117737,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
117717
117737
|
increaseIndent();
|
|
117718
117738
|
}
|
|
117719
117739
|
const preferNewLine = node.multiLine ? 65536 /* PreferNewLine */ : 0 /* None */;
|
|
117720
|
-
const allowTrailingComma = currentSourceFile &&
|
|
117740
|
+
const allowTrailingComma = currentSourceFile && !isJsonSourceFile(currentSourceFile) ? 64 /* AllowTrailingComma */ : 0 /* None */;
|
|
117721
117741
|
emitList(node, node.properties, 526226 /* ObjectLiteralExpressionProperties */ | allowTrailingComma | preferNewLine);
|
|
117722
117742
|
if (indentedFlag) {
|
|
117723
117743
|
decreaseIndent();
|
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-dev.
|
|
2289
|
+
var version = `${versionMajorMinor}.0-dev.20260203`;
|
|
2290
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2291
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2292
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -21934,7 +21934,23 @@ var _computedOptions = createComputedCompilerOptions({
|
|
|
21934
21934
|
module: {
|
|
21935
21935
|
dependencies: ["target"],
|
|
21936
21936
|
computeValue: (compilerOptions) => {
|
|
21937
|
-
|
|
21937
|
+
if (typeof compilerOptions.module === "number") {
|
|
21938
|
+
return compilerOptions.module;
|
|
21939
|
+
}
|
|
21940
|
+
const target = _computedOptions.target.computeValue(compilerOptions);
|
|
21941
|
+
if (target === 99 /* ESNext */) {
|
|
21942
|
+
return 99 /* ESNext */;
|
|
21943
|
+
}
|
|
21944
|
+
if (target >= 9 /* ES2022 */) {
|
|
21945
|
+
return 7 /* ES2022 */;
|
|
21946
|
+
}
|
|
21947
|
+
if (target >= 7 /* ES2020 */) {
|
|
21948
|
+
return 6 /* ES2020 */;
|
|
21949
|
+
}
|
|
21950
|
+
if (target >= 2 /* ES2015 */) {
|
|
21951
|
+
return 5 /* ES2015 */;
|
|
21952
|
+
}
|
|
21953
|
+
return 1 /* CommonJS */;
|
|
21938
21954
|
}
|
|
21939
21955
|
},
|
|
21940
21956
|
moduleResolution: {
|
|
@@ -46837,6 +46853,7 @@ var ContainerFlags = /* @__PURE__ */ ((ContainerFlags2) => {
|
|
|
46837
46853
|
ContainerFlags2[ContainerFlags2["HasLocals"] = 32] = "HasLocals";
|
|
46838
46854
|
ContainerFlags2[ContainerFlags2["IsInterface"] = 64] = "IsInterface";
|
|
46839
46855
|
ContainerFlags2[ContainerFlags2["IsObjectLiteralOrClassExpressionMethodOrAccessor"] = 128] = "IsObjectLiteralOrClassExpressionMethodOrAccessor";
|
|
46856
|
+
ContainerFlags2[ContainerFlags2["PropagatesThisKeyword"] = 256] = "PropagatesThisKeyword";
|
|
46840
46857
|
return ContainerFlags2;
|
|
46841
46858
|
})(ContainerFlags || {});
|
|
46842
46859
|
function createFlowNode(flags, node, antecedent) {
|
|
@@ -47249,7 +47266,7 @@ function createBinder() {
|
|
|
47249
47266
|
currentExceptionTarget = saveExceptionTarget;
|
|
47250
47267
|
activeLabelList = saveActiveLabelList;
|
|
47251
47268
|
hasExplicitReturn = saveHasExplicitReturn;
|
|
47252
|
-
seenThisKeyword =
|
|
47269
|
+
seenThisKeyword = containerFlags & 256 /* PropagatesThisKeyword */ ? saveSeenThisKeyword || seenThisKeyword : saveSeenThisKeyword;
|
|
47253
47270
|
} else if (containerFlags & 64 /* IsInterface */) {
|
|
47254
47271
|
const saveSeenThisKeyword = seenThisKeyword;
|
|
47255
47272
|
seenThisKeyword = false;
|
|
@@ -49615,12 +49632,13 @@ function getContainerFlags(node) {
|
|
|
49615
49632
|
case 185 /* FunctionType */:
|
|
49616
49633
|
case 181 /* ConstructSignature */:
|
|
49617
49634
|
case 186 /* ConstructorType */:
|
|
49618
|
-
return 1 /* IsContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
49635
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 256 /* PropagatesThisKeyword */;
|
|
49619
49636
|
case 352 /* JSDocImportTag */:
|
|
49620
|
-
return 1 /* IsContainer */ | 32 /* HasLocals */;
|
|
49637
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 256 /* PropagatesThisKeyword */;
|
|
49621
49638
|
case 219 /* FunctionExpression */:
|
|
49622
|
-
case 220 /* ArrowFunction */:
|
|
49623
49639
|
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
|
|
49640
|
+
case 220 /* ArrowFunction */:
|
|
49641
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */ | 256 /* PropagatesThisKeyword */;
|
|
49624
49642
|
case 269 /* ModuleBlock */:
|
|
49625
49643
|
return 4 /* IsControlFlowContainer */;
|
|
49626
49644
|
case 300 /* CatchClause */:
|
|
@@ -55869,7 +55887,7 @@ function createTypeChecker(host) {
|
|
|
55869
55887
|
return parentName;
|
|
55870
55888
|
}
|
|
55871
55889
|
const memberName = symbolName(type.symbol);
|
|
55872
|
-
if (isIdentifierText(memberName,
|
|
55890
|
+
if (isIdentifierText(memberName, 99 /* ESNext */)) {
|
|
55873
55891
|
return appendReferenceToType(
|
|
55874
55892
|
parentName,
|
|
55875
55893
|
factory.createTypeReferenceNode(
|
|
@@ -89255,7 +89273,7 @@ function createTypeChecker(host) {
|
|
|
89255
89273
|
}
|
|
89256
89274
|
}
|
|
89257
89275
|
function checkClassNameCollisionWithObject(name) {
|
|
89258
|
-
if (
|
|
89276
|
+
if (name.escapedText === "Object" && host.getEmitModuleFormatOfFile(getSourceFileOfNode(name)) < 5 /* ES2015 */) {
|
|
89259
89277
|
error2(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0, ModuleKind[moduleKind]);
|
|
89260
89278
|
}
|
|
89261
89279
|
}
|
|
@@ -90666,6 +90684,9 @@ function createTypeChecker(host) {
|
|
|
90666
90684
|
if (102 /* Node20 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ && !isImportAttributes2) {
|
|
90667
90685
|
return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);
|
|
90668
90686
|
}
|
|
90687
|
+
if (!isImportAttributes2 && compilerOptions.ignoreDeprecations !== "6.0") {
|
|
90688
|
+
grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);
|
|
90689
|
+
}
|
|
90669
90690
|
if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === 1 /* CommonJS */) {
|
|
90670
90691
|
return grammarErrorOnNode(
|
|
90671
90692
|
node,
|
|
@@ -98754,7 +98775,7 @@ function transformTypeScript(context) {
|
|
|
98754
98775
|
}
|
|
98755
98776
|
function visitClassDeclaration(node) {
|
|
98756
98777
|
const facts = getClassFacts(node);
|
|
98757
|
-
const promoteToIIFE = languageVersion
|
|
98778
|
+
const promoteToIIFE = languageVersion < 2 /* ES2015 */ && !!(facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */);
|
|
98758
98779
|
if (!isClassLikeDeclarationWithTypeScriptSyntax(node) && !classOrConstructorParameterIsDecorated(legacyDecorators, node) && !isExportOfNamespace(node)) {
|
|
98759
98780
|
return factory2.updateClassDeclaration(
|
|
98760
98781
|
node,
|
|
@@ -122540,7 +122561,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
122540
122561
|
increaseIndent();
|
|
122541
122562
|
}
|
|
122542
122563
|
const preferNewLine = node.multiLine ? 65536 /* PreferNewLine */ : 0 /* None */;
|
|
122543
|
-
const allowTrailingComma = currentSourceFile &&
|
|
122564
|
+
const allowTrailingComma = currentSourceFile && !isJsonSourceFile(currentSourceFile) ? 64 /* AllowTrailingComma */ : 0 /* None */;
|
|
122544
122565
|
emitList(node, node.properties, 526226 /* ObjectLiteralExpressionProperties */ | allowTrailingComma | preferNewLine);
|
|
122545
122566
|
if (indentedFlag) {
|
|
122546
122567
|
decreaseIndent();
|
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": "6.0.0-dev.
|
|
5
|
+
"version": "6.0.0-dev.20260203",
|
|
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": "0a74ec4e166d2efb822135ac9693560d43f06233"
|
|
119
119
|
}
|