typescript 5.4.0-dev.20240124 → 5.4.0-dev.20240126
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 +10 -12
- package/lib/tsserver.js +10 -12
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +10 -12
- 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.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20240126`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -76094,19 +76094,16 @@ function createTypeChecker(host) {
|
|
|
76094
76094
|
}
|
|
76095
76095
|
}
|
|
76096
76096
|
}
|
|
76097
|
-
function
|
|
76097
|
+
function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
|
|
76098
76098
|
const signature = getSingleCallSignature(funcType);
|
|
76099
|
-
if (signature) {
|
|
76100
|
-
|
|
76101
|
-
if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
|
|
76102
|
-
return returnType;
|
|
76103
|
-
}
|
|
76099
|
+
if (signature && !signature.typeParameters) {
|
|
76100
|
+
return getReturnTypeOfSignature(signature);
|
|
76104
76101
|
}
|
|
76105
76102
|
}
|
|
76106
76103
|
function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
|
|
76107
76104
|
const funcType = checkExpression(expr.expression);
|
|
76108
76105
|
const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
|
|
76109
|
-
const returnType =
|
|
76106
|
+
const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
|
|
76110
76107
|
return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
|
|
76111
76108
|
}
|
|
76112
76109
|
function getTypeOfExpression(node) {
|
|
@@ -76151,7 +76148,7 @@ function createTypeChecker(host) {
|
|
|
76151
76148
|
/*requireStringLiteralLikeArgument*/
|
|
76152
76149
|
true
|
|
76153
76150
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
76154
|
-
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) :
|
|
76151
|
+
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
76155
76152
|
} else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
|
|
76156
76153
|
return getTypeFromTypeNode(expr.type);
|
|
76157
76154
|
} else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
|
|
@@ -81506,14 +81503,15 @@ function createTypeChecker(host) {
|
|
|
81506
81503
|
idText(id)
|
|
81507
81504
|
);
|
|
81508
81505
|
}
|
|
81509
|
-
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
81510
|
-
|
|
81506
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
81507
|
+
const nonLocalMeanings = getSymbolFlags(
|
|
81511
81508
|
sym,
|
|
81512
81509
|
/*excludeTypeOnlyMeanings*/
|
|
81513
81510
|
false,
|
|
81514
81511
|
/*excludeLocalMeanings*/
|
|
81515
81512
|
true
|
|
81516
|
-
)
|
|
81513
|
+
);
|
|
81514
|
+
if (sym.flags & 2097152 /* Alias */ && nonLocalMeanings & 788968 /* Type */ && !(nonLocalMeanings & 111551 /* Value */) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
81517
81515
|
error(
|
|
81518
81516
|
id,
|
|
81519
81517
|
node.isExportEquals ? Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
|
package/lib/tsserver.js
CHANGED
|
@@ -2340,7 +2340,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2340
2340
|
|
|
2341
2341
|
// src/compiler/corePublic.ts
|
|
2342
2342
|
var versionMajorMinor = "5.4";
|
|
2343
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2343
|
+
var version = `${versionMajorMinor}.0-dev.20240126`;
|
|
2344
2344
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2345
2345
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2346
2346
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -80829,19 +80829,16 @@ function createTypeChecker(host) {
|
|
|
80829
80829
|
}
|
|
80830
80830
|
}
|
|
80831
80831
|
}
|
|
80832
|
-
function
|
|
80832
|
+
function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
|
|
80833
80833
|
const signature = getSingleCallSignature(funcType);
|
|
80834
|
-
if (signature) {
|
|
80835
|
-
|
|
80836
|
-
if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
|
|
80837
|
-
return returnType;
|
|
80838
|
-
}
|
|
80834
|
+
if (signature && !signature.typeParameters) {
|
|
80835
|
+
return getReturnTypeOfSignature(signature);
|
|
80839
80836
|
}
|
|
80840
80837
|
}
|
|
80841
80838
|
function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
|
|
80842
80839
|
const funcType = checkExpression(expr.expression);
|
|
80843
80840
|
const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
|
|
80844
|
-
const returnType =
|
|
80841
|
+
const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
|
|
80845
80842
|
return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
|
|
80846
80843
|
}
|
|
80847
80844
|
function getTypeOfExpression(node) {
|
|
@@ -80886,7 +80883,7 @@ function createTypeChecker(host) {
|
|
|
80886
80883
|
/*requireStringLiteralLikeArgument*/
|
|
80887
80884
|
true
|
|
80888
80885
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
80889
|
-
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) :
|
|
80886
|
+
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
80890
80887
|
} else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
|
|
80891
80888
|
return getTypeFromTypeNode(expr.type);
|
|
80892
80889
|
} else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
|
|
@@ -86241,14 +86238,15 @@ function createTypeChecker(host) {
|
|
|
86241
86238
|
idText(id)
|
|
86242
86239
|
);
|
|
86243
86240
|
}
|
|
86244
|
-
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
86245
|
-
|
|
86241
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
86242
|
+
const nonLocalMeanings = getSymbolFlags(
|
|
86246
86243
|
sym,
|
|
86247
86244
|
/*excludeTypeOnlyMeanings*/
|
|
86248
86245
|
false,
|
|
86249
86246
|
/*excludeLocalMeanings*/
|
|
86250
86247
|
true
|
|
86251
|
-
)
|
|
86248
|
+
);
|
|
86249
|
+
if (sym.flags & 2097152 /* Alias */ && nonLocalMeanings & 788968 /* Type */ && !(nonLocalMeanings & 111551 /* Value */) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
86252
86250
|
error2(
|
|
86253
86251
|
id,
|
|
86254
86252
|
node.isExportEquals ? Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
|
package/lib/typescript.d.ts
CHANGED
|
@@ -205,7 +205,7 @@ declare namespace ts {
|
|
|
205
205
|
/**
|
|
206
206
|
* Request to reload the project structure for all the opened files
|
|
207
207
|
*/
|
|
208
|
-
interface ReloadProjectsRequest extends
|
|
208
|
+
interface ReloadProjectsRequest extends Request {
|
|
209
209
|
command: CommandTypes.ReloadProjects;
|
|
210
210
|
}
|
|
211
211
|
/**
|
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.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20240126`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -78583,19 +78583,16 @@ ${lanes.join("\n")}
|
|
|
78583
78583
|
}
|
|
78584
78584
|
}
|
|
78585
78585
|
}
|
|
78586
|
-
function
|
|
78586
|
+
function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
|
|
78587
78587
|
const signature = getSingleCallSignature(funcType);
|
|
78588
|
-
if (signature) {
|
|
78589
|
-
|
|
78590
|
-
if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
|
|
78591
|
-
return returnType;
|
|
78592
|
-
}
|
|
78588
|
+
if (signature && !signature.typeParameters) {
|
|
78589
|
+
return getReturnTypeOfSignature(signature);
|
|
78593
78590
|
}
|
|
78594
78591
|
}
|
|
78595
78592
|
function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
|
|
78596
78593
|
const funcType = checkExpression(expr.expression);
|
|
78597
78594
|
const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
|
|
78598
|
-
const returnType =
|
|
78595
|
+
const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
|
|
78599
78596
|
return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
|
|
78600
78597
|
}
|
|
78601
78598
|
function getTypeOfExpression(node) {
|
|
@@ -78640,7 +78637,7 @@ ${lanes.join("\n")}
|
|
|
78640
78637
|
/*requireStringLiteralLikeArgument*/
|
|
78641
78638
|
true
|
|
78642
78639
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
78643
|
-
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) :
|
|
78640
|
+
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
78644
78641
|
} else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
|
|
78645
78642
|
return getTypeFromTypeNode(expr.type);
|
|
78646
78643
|
} else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
|
|
@@ -83995,14 +83992,15 @@ ${lanes.join("\n")}
|
|
|
83995
83992
|
idText(id)
|
|
83996
83993
|
);
|
|
83997
83994
|
}
|
|
83998
|
-
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
83999
|
-
|
|
83995
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
83996
|
+
const nonLocalMeanings = getSymbolFlags(
|
|
84000
83997
|
sym,
|
|
84001
83998
|
/*excludeTypeOnlyMeanings*/
|
|
84002
83999
|
false,
|
|
84003
84000
|
/*excludeLocalMeanings*/
|
|
84004
84001
|
true
|
|
84005
|
-
)
|
|
84002
|
+
);
|
|
84003
|
+
if (sym.flags & 2097152 /* Alias */ && nonLocalMeanings & 788968 /* Type */ && !(nonLocalMeanings & 111551 /* Value */) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
84006
84004
|
error2(
|
|
84007
84005
|
id,
|
|
84008
84006
|
node.isExportEquals ? Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
|
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.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20240126`;
|
|
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.4.0-dev.
|
|
5
|
+
"version": "5.4.0-dev.20240126",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "1a421a75c32aeb43d089087e0a8565c765bfa777"
|
|
117
117
|
}
|