typescript 5.5.0-dev.20240314 → 5.5.0-dev.20240315
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 +9 -2
- package/lib/tsserver.js +9 -2
- package/lib/typescript.js +9 -2
- 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.5";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20240315`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -57847,6 +57847,7 @@ function createTypeChecker(host) {
|
|
|
57847
57847
|
return links.resolvedType;
|
|
57848
57848
|
}
|
|
57849
57849
|
function getTemplateLiteralType(texts, types) {
|
|
57850
|
+
var _a, _b;
|
|
57850
57851
|
const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));
|
|
57851
57852
|
if (unionIndex >= 0) {
|
|
57852
57853
|
return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;
|
|
@@ -57854,6 +57855,9 @@ function createTypeChecker(host) {
|
|
|
57854
57855
|
if (contains(types, wildcardType)) {
|
|
57855
57856
|
return wildcardType;
|
|
57856
57857
|
}
|
|
57858
|
+
if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a = types[0].symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
|
|
57859
|
+
return types[0];
|
|
57860
|
+
}
|
|
57857
57861
|
const newTypes = [];
|
|
57858
57862
|
const newTexts = [];
|
|
57859
57863
|
let text = texts[0];
|
|
@@ -71506,7 +71510,10 @@ function createTypeChecker(host) {
|
|
|
71506
71510
|
return Debug.fail();
|
|
71507
71511
|
}
|
|
71508
71512
|
function getDecoratorArgumentCount(node, signature) {
|
|
71509
|
-
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) :
|
|
71513
|
+
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : (
|
|
71514
|
+
// Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.
|
|
71515
|
+
Math.min(Math.max(getParameterCount(signature), 1), 2)
|
|
71516
|
+
);
|
|
71510
71517
|
}
|
|
71511
71518
|
function getLegacyDecoratorArgumentCount(node, signature) {
|
|
71512
71519
|
switch (node.parent.kind) {
|
package/lib/tsserver.js
CHANGED
|
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2327
2327
|
|
|
2328
2328
|
// src/compiler/corePublic.ts
|
|
2329
2329
|
var versionMajorMinor = "5.5";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-dev.20240315`;
|
|
2331
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -62600,6 +62600,7 @@ function createTypeChecker(host) {
|
|
|
62600
62600
|
return links.resolvedType;
|
|
62601
62601
|
}
|
|
62602
62602
|
function getTemplateLiteralType(texts, types) {
|
|
62603
|
+
var _a, _b;
|
|
62603
62604
|
const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));
|
|
62604
62605
|
if (unionIndex >= 0) {
|
|
62605
62606
|
return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;
|
|
@@ -62607,6 +62608,9 @@ function createTypeChecker(host) {
|
|
|
62607
62608
|
if (contains(types, wildcardType)) {
|
|
62608
62609
|
return wildcardType;
|
|
62609
62610
|
}
|
|
62611
|
+
if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a = types[0].symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
|
|
62612
|
+
return types[0];
|
|
62613
|
+
}
|
|
62610
62614
|
const newTypes = [];
|
|
62611
62615
|
const newTexts = [];
|
|
62612
62616
|
let text = texts[0];
|
|
@@ -76259,7 +76263,10 @@ function createTypeChecker(host) {
|
|
|
76259
76263
|
return Debug.fail();
|
|
76260
76264
|
}
|
|
76261
76265
|
function getDecoratorArgumentCount(node, signature) {
|
|
76262
|
-
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) :
|
|
76266
|
+
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : (
|
|
76267
|
+
// Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.
|
|
76268
|
+
Math.min(Math.max(getParameterCount(signature), 1), 2)
|
|
76269
|
+
);
|
|
76263
76270
|
}
|
|
76264
76271
|
function getLegacyDecoratorArgumentCount(node, signature) {
|
|
76265
76272
|
switch (node.parent.kind) {
|
package/lib/typescript.js
CHANGED
|
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2327
2327
|
|
|
2328
2328
|
// src/compiler/corePublic.ts
|
|
2329
2329
|
var versionMajorMinor = "5.5";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-dev.20240315`;
|
|
2331
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -62600,6 +62600,7 @@ function createTypeChecker(host) {
|
|
|
62600
62600
|
return links.resolvedType;
|
|
62601
62601
|
}
|
|
62602
62602
|
function getTemplateLiteralType(texts, types) {
|
|
62603
|
+
var _a, _b;
|
|
62603
62604
|
const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));
|
|
62604
62605
|
if (unionIndex >= 0) {
|
|
62605
62606
|
return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;
|
|
@@ -62607,6 +62608,9 @@ function createTypeChecker(host) {
|
|
|
62607
62608
|
if (contains(types, wildcardType)) {
|
|
62608
62609
|
return wildcardType;
|
|
62609
62610
|
}
|
|
62611
|
+
if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a = types[0].symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
|
|
62612
|
+
return types[0];
|
|
62613
|
+
}
|
|
62610
62614
|
const newTypes = [];
|
|
62611
62615
|
const newTexts = [];
|
|
62612
62616
|
let text = texts[0];
|
|
@@ -76259,7 +76263,10 @@ function createTypeChecker(host) {
|
|
|
76259
76263
|
return Debug.fail();
|
|
76260
76264
|
}
|
|
76261
76265
|
function getDecoratorArgumentCount(node, signature) {
|
|
76262
|
-
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) :
|
|
76266
|
+
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : (
|
|
76267
|
+
// Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.
|
|
76268
|
+
Math.min(Math.max(getParameterCount(signature), 1), 2)
|
|
76269
|
+
);
|
|
76263
76270
|
}
|
|
76264
76271
|
function getLegacyDecoratorArgumentCount(node, signature) {
|
|
76265
76272
|
switch (node.parent.kind) {
|
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.5";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20240315`;
|
|
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.5.0-dev.
|
|
5
|
+
"version": "5.5.0-dev.20240315",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"node": "20.1.0",
|
|
113
113
|
"npm": "8.19.4"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "60cf79127af5025ebdd239aa47ca136e7a366347"
|
|
116
116
|
}
|