typescript 5.7.0-dev.20241013 → 5.7.0-dev.20241015
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 +29 -12
- package/lib/typescript.js +32 -14
- 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.7";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20241015`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -91014,9 +91014,9 @@ function getDecoratorsOfParameters(node) {
|
|
|
91014
91014
|
}
|
|
91015
91015
|
return decorators;
|
|
91016
91016
|
}
|
|
91017
|
-
function getAllDecoratorsOfClass(node) {
|
|
91017
|
+
function getAllDecoratorsOfClass(node, useLegacyDecorators) {
|
|
91018
91018
|
const decorators = getDecorators(node);
|
|
91019
|
-
const parameters = getDecoratorsOfParameters(getFirstConstructorWithBody(node));
|
|
91019
|
+
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(getFirstConstructorWithBody(node)) : void 0;
|
|
91020
91020
|
if (!some(decorators) && !some(parameters)) {
|
|
91021
91021
|
return void 0;
|
|
91022
91022
|
}
|
|
@@ -91030,18 +91030,27 @@ function getAllDecoratorsOfClassElement(member, parent, useLegacyDecorators) {
|
|
|
91030
91030
|
case 177 /* GetAccessor */:
|
|
91031
91031
|
case 178 /* SetAccessor */:
|
|
91032
91032
|
if (!useLegacyDecorators) {
|
|
91033
|
-
return getAllDecoratorsOfMethod(
|
|
91033
|
+
return getAllDecoratorsOfMethod(
|
|
91034
|
+
member,
|
|
91035
|
+
/*useLegacyDecorators*/
|
|
91036
|
+
false
|
|
91037
|
+
);
|
|
91034
91038
|
}
|
|
91035
|
-
return getAllDecoratorsOfAccessors(
|
|
91039
|
+
return getAllDecoratorsOfAccessors(
|
|
91040
|
+
member,
|
|
91041
|
+
parent,
|
|
91042
|
+
/*useLegacyDecorators*/
|
|
91043
|
+
true
|
|
91044
|
+
);
|
|
91036
91045
|
case 174 /* MethodDeclaration */:
|
|
91037
|
-
return getAllDecoratorsOfMethod(member);
|
|
91046
|
+
return getAllDecoratorsOfMethod(member, useLegacyDecorators);
|
|
91038
91047
|
case 172 /* PropertyDeclaration */:
|
|
91039
91048
|
return getAllDecoratorsOfProperty(member);
|
|
91040
91049
|
default:
|
|
91041
91050
|
return void 0;
|
|
91042
91051
|
}
|
|
91043
91052
|
}
|
|
91044
|
-
function getAllDecoratorsOfAccessors(accessor, parent) {
|
|
91053
|
+
function getAllDecoratorsOfAccessors(accessor, parent, useLegacyDecorators) {
|
|
91045
91054
|
if (!accessor.body) {
|
|
91046
91055
|
return void 0;
|
|
91047
91056
|
}
|
|
@@ -91051,7 +91060,7 @@ function getAllDecoratorsOfAccessors(accessor, parent) {
|
|
|
91051
91060
|
return void 0;
|
|
91052
91061
|
}
|
|
91053
91062
|
const decorators = getDecorators(firstAccessorWithDecorators);
|
|
91054
|
-
const parameters = getDecoratorsOfParameters(setAccessor);
|
|
91063
|
+
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(setAccessor) : void 0;
|
|
91055
91064
|
if (!some(decorators) && !some(parameters)) {
|
|
91056
91065
|
return void 0;
|
|
91057
91066
|
}
|
|
@@ -91062,12 +91071,12 @@ function getAllDecoratorsOfAccessors(accessor, parent) {
|
|
|
91062
91071
|
setDecorators: setAccessor && getDecorators(setAccessor)
|
|
91063
91072
|
};
|
|
91064
91073
|
}
|
|
91065
|
-
function getAllDecoratorsOfMethod(method) {
|
|
91074
|
+
function getAllDecoratorsOfMethod(method, useLegacyDecorators) {
|
|
91066
91075
|
if (!method.body) {
|
|
91067
91076
|
return void 0;
|
|
91068
91077
|
}
|
|
91069
91078
|
const decorators = getDecorators(method);
|
|
91070
|
-
const parameters = getDecoratorsOfParameters(method);
|
|
91079
|
+
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(method) : void 0;
|
|
91071
91080
|
if (!some(decorators) && !some(parameters)) {
|
|
91072
91081
|
return void 0;
|
|
91073
91082
|
}
|
|
@@ -96701,7 +96710,11 @@ function transformLegacyDecorators(context) {
|
|
|
96701
96710
|
}
|
|
96702
96711
|
}
|
|
96703
96712
|
function generateConstructorDecorationExpression(node) {
|
|
96704
|
-
const allDecorators = getAllDecoratorsOfClass(
|
|
96713
|
+
const allDecorators = getAllDecoratorsOfClass(
|
|
96714
|
+
node,
|
|
96715
|
+
/*useLegacyDecorators*/
|
|
96716
|
+
true
|
|
96717
|
+
);
|
|
96705
96718
|
const decoratorExpressions = transformAllDecoratorsOfDeclaration(allDecorators);
|
|
96706
96719
|
if (!decoratorExpressions) {
|
|
96707
96720
|
return void 0;
|
|
@@ -97213,7 +97226,11 @@ function transformESDecorators(context) {
|
|
|
97213
97226
|
let syntheticConstructor;
|
|
97214
97227
|
let heritageClauses;
|
|
97215
97228
|
let shouldTransformPrivateStaticElementsInClass = false;
|
|
97216
|
-
const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(
|
|
97229
|
+
const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(
|
|
97230
|
+
node,
|
|
97231
|
+
/*useLegacyDecorators*/
|
|
97232
|
+
false
|
|
97233
|
+
));
|
|
97217
97234
|
if (classDecorators) {
|
|
97218
97235
|
classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */ | 32 /* FileLevel */);
|
|
97219
97236
|
classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */);
|
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-dev.
|
|
2280
|
+
var version = `${versionMajorMinor}.0-dev.20241015`;
|
|
2281
2281
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2282
2282
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2283
2283
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -95789,9 +95789,9 @@ function getDecoratorsOfParameters(node) {
|
|
|
95789
95789
|
}
|
|
95790
95790
|
return decorators;
|
|
95791
95791
|
}
|
|
95792
|
-
function getAllDecoratorsOfClass(node) {
|
|
95792
|
+
function getAllDecoratorsOfClass(node, useLegacyDecorators) {
|
|
95793
95793
|
const decorators = getDecorators(node);
|
|
95794
|
-
const parameters = getDecoratorsOfParameters(getFirstConstructorWithBody(node));
|
|
95794
|
+
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(getFirstConstructorWithBody(node)) : void 0;
|
|
95795
95795
|
if (!some(decorators) && !some(parameters)) {
|
|
95796
95796
|
return void 0;
|
|
95797
95797
|
}
|
|
@@ -95805,18 +95805,27 @@ function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) {
|
|
|
95805
95805
|
case 177 /* GetAccessor */:
|
|
95806
95806
|
case 178 /* SetAccessor */:
|
|
95807
95807
|
if (!useLegacyDecorators) {
|
|
95808
|
-
return getAllDecoratorsOfMethod(
|
|
95808
|
+
return getAllDecoratorsOfMethod(
|
|
95809
|
+
member,
|
|
95810
|
+
/*useLegacyDecorators*/
|
|
95811
|
+
false
|
|
95812
|
+
);
|
|
95809
95813
|
}
|
|
95810
|
-
return getAllDecoratorsOfAccessors(
|
|
95814
|
+
return getAllDecoratorsOfAccessors(
|
|
95815
|
+
member,
|
|
95816
|
+
parent2,
|
|
95817
|
+
/*useLegacyDecorators*/
|
|
95818
|
+
true
|
|
95819
|
+
);
|
|
95811
95820
|
case 174 /* MethodDeclaration */:
|
|
95812
|
-
return getAllDecoratorsOfMethod(member);
|
|
95821
|
+
return getAllDecoratorsOfMethod(member, useLegacyDecorators);
|
|
95813
95822
|
case 172 /* PropertyDeclaration */:
|
|
95814
95823
|
return getAllDecoratorsOfProperty(member);
|
|
95815
95824
|
default:
|
|
95816
95825
|
return void 0;
|
|
95817
95826
|
}
|
|
95818
95827
|
}
|
|
95819
|
-
function getAllDecoratorsOfAccessors(accessor, parent2) {
|
|
95828
|
+
function getAllDecoratorsOfAccessors(accessor, parent2, useLegacyDecorators) {
|
|
95820
95829
|
if (!accessor.body) {
|
|
95821
95830
|
return void 0;
|
|
95822
95831
|
}
|
|
@@ -95826,7 +95835,7 @@ function getAllDecoratorsOfAccessors(accessor, parent2) {
|
|
|
95826
95835
|
return void 0;
|
|
95827
95836
|
}
|
|
95828
95837
|
const decorators = getDecorators(firstAccessorWithDecorators);
|
|
95829
|
-
const parameters = getDecoratorsOfParameters(setAccessor);
|
|
95838
|
+
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(setAccessor) : void 0;
|
|
95830
95839
|
if (!some(decorators) && !some(parameters)) {
|
|
95831
95840
|
return void 0;
|
|
95832
95841
|
}
|
|
@@ -95837,12 +95846,12 @@ function getAllDecoratorsOfAccessors(accessor, parent2) {
|
|
|
95837
95846
|
setDecorators: setAccessor && getDecorators(setAccessor)
|
|
95838
95847
|
};
|
|
95839
95848
|
}
|
|
95840
|
-
function getAllDecoratorsOfMethod(method) {
|
|
95849
|
+
function getAllDecoratorsOfMethod(method, useLegacyDecorators) {
|
|
95841
95850
|
if (!method.body) {
|
|
95842
95851
|
return void 0;
|
|
95843
95852
|
}
|
|
95844
95853
|
const decorators = getDecorators(method);
|
|
95845
|
-
const parameters = getDecoratorsOfParameters(method);
|
|
95854
|
+
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(method) : void 0;
|
|
95846
95855
|
if (!some(decorators) && !some(parameters)) {
|
|
95847
95856
|
return void 0;
|
|
95848
95857
|
}
|
|
@@ -101486,7 +101495,11 @@ function transformLegacyDecorators(context) {
|
|
|
101486
101495
|
}
|
|
101487
101496
|
}
|
|
101488
101497
|
function generateConstructorDecorationExpression(node) {
|
|
101489
|
-
const allDecorators = getAllDecoratorsOfClass(
|
|
101498
|
+
const allDecorators = getAllDecoratorsOfClass(
|
|
101499
|
+
node,
|
|
101500
|
+
/*useLegacyDecorators*/
|
|
101501
|
+
true
|
|
101502
|
+
);
|
|
101490
101503
|
const decoratorExpressions = transformAllDecoratorsOfDeclaration(allDecorators);
|
|
101491
101504
|
if (!decoratorExpressions) {
|
|
101492
101505
|
return void 0;
|
|
@@ -101998,7 +102011,11 @@ function transformESDecorators(context) {
|
|
|
101998
102011
|
let syntheticConstructor;
|
|
101999
102012
|
let heritageClauses;
|
|
102000
102013
|
let shouldTransformPrivateStaticElementsInClass = false;
|
|
102001
|
-
const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(
|
|
102014
|
+
const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(
|
|
102015
|
+
node,
|
|
102016
|
+
/*useLegacyDecorators*/
|
|
102017
|
+
false
|
|
102018
|
+
));
|
|
102002
102019
|
if (classDecorators) {
|
|
102003
102020
|
classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */ | 32 /* FileLevel */);
|
|
102004
102021
|
classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */);
|
|
@@ -156999,7 +157016,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre
|
|
|
156999
157016
|
function writeFixes(changeTracker, oldFileQuotePreference) {
|
|
157000
157017
|
var _a, _b;
|
|
157001
157018
|
let quotePreference;
|
|
157002
|
-
if (
|
|
157019
|
+
if (sourceFile.imports !== void 0 && sourceFile.imports.length === 0 && oldFileQuotePreference !== void 0) {
|
|
157003
157020
|
quotePreference = oldFileQuotePreference;
|
|
157004
157021
|
} else {
|
|
157005
157022
|
quotePreference = getQuotePreference(sourceFile, preferences);
|
|
@@ -159608,8 +159625,9 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ
|
|
|
159608
159625
|
}
|
|
159609
159626
|
if (type.flags & 1056 /* EnumLike */) {
|
|
159610
159627
|
const enumMember = type.symbol.exports ? firstOrUndefinedIterator(type.symbol.exports.values()) : type.symbol;
|
|
159628
|
+
const symbol = type.symbol.parent && type.symbol.parent.flags & 256 /* RegularEnum */ ? type.symbol.parent : type.symbol;
|
|
159611
159629
|
const name = checker.symbolToExpression(
|
|
159612
|
-
|
|
159630
|
+
symbol,
|
|
159613
159631
|
111551 /* Value */,
|
|
159614
159632
|
/*enclosingDeclaration*/
|
|
159615
159633
|
void 0,
|
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.7.0-dev.
|
|
5
|
+
"version": "5.7.0-dev.20241015",
|
|
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": "40caf3431986884b3da7a607de22ced5d364d9fc"
|
|
120
120
|
}
|