typescript 5.4.0-dev.20240123 → 5.4.0-dev.20240125
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 +15 -13
- package/lib/tsserver.js +15 -13
- package/lib/typescript.js +15 -13
- 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.20240125`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -42806,7 +42806,11 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi
|
|
|
42806
42806
|
if (modulePath.isRedirect) {
|
|
42807
42807
|
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
|
42808
42808
|
} else if (pathIsBareSpecifier(local)) {
|
|
42809
|
-
|
|
42809
|
+
if (pathContainsNodeModules(local)) {
|
|
42810
|
+
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
42811
|
+
} else {
|
|
42812
|
+
pathsSpecifiers = append(pathsSpecifiers, local);
|
|
42813
|
+
}
|
|
42810
42814
|
} else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
42811
42815
|
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
42812
42816
|
}
|
|
@@ -76090,19 +76094,16 @@ function createTypeChecker(host) {
|
|
|
76090
76094
|
}
|
|
76091
76095
|
}
|
|
76092
76096
|
}
|
|
76093
|
-
function
|
|
76097
|
+
function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
|
|
76094
76098
|
const signature = getSingleCallSignature(funcType);
|
|
76095
|
-
if (signature) {
|
|
76096
|
-
|
|
76097
|
-
if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
|
|
76098
|
-
return returnType;
|
|
76099
|
-
}
|
|
76099
|
+
if (signature && !signature.typeParameters) {
|
|
76100
|
+
return getReturnTypeOfSignature(signature);
|
|
76100
76101
|
}
|
|
76101
76102
|
}
|
|
76102
76103
|
function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
|
|
76103
76104
|
const funcType = checkExpression(expr.expression);
|
|
76104
76105
|
const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
|
|
76105
|
-
const returnType =
|
|
76106
|
+
const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
|
|
76106
76107
|
return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
|
|
76107
76108
|
}
|
|
76108
76109
|
function getTypeOfExpression(node) {
|
|
@@ -76147,7 +76148,7 @@ function createTypeChecker(host) {
|
|
|
76147
76148
|
/*requireStringLiteralLikeArgument*/
|
|
76148
76149
|
true
|
|
76149
76150
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
76150
|
-
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) :
|
|
76151
|
+
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
76151
76152
|
} else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
|
|
76152
76153
|
return getTypeFromTypeNode(expr.type);
|
|
76153
76154
|
} else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
|
|
@@ -81502,14 +81503,15 @@ function createTypeChecker(host) {
|
|
|
81502
81503
|
idText(id)
|
|
81503
81504
|
);
|
|
81504
81505
|
}
|
|
81505
|
-
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
81506
|
-
|
|
81506
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
81507
|
+
const nonLocalMeanings = getSymbolFlags(
|
|
81507
81508
|
sym,
|
|
81508
81509
|
/*excludeTypeOnlyMeanings*/
|
|
81509
81510
|
false,
|
|
81510
81511
|
/*excludeLocalMeanings*/
|
|
81511
81512
|
true
|
|
81512
|
-
)
|
|
81513
|
+
);
|
|
81514
|
+
if (sym.flags & 2097152 /* Alias */ && nonLocalMeanings & 788968 /* Type */ && !(nonLocalMeanings & 111551 /* Value */) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
81513
81515
|
error(
|
|
81514
81516
|
id,
|
|
81515
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.20240125`;
|
|
2344
2344
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2345
2345
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2346
2346
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -47541,7 +47541,11 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi
|
|
|
47541
47541
|
if (modulePath.isRedirect) {
|
|
47542
47542
|
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
|
47543
47543
|
} else if (pathIsBareSpecifier(local)) {
|
|
47544
|
-
|
|
47544
|
+
if (pathContainsNodeModules(local)) {
|
|
47545
|
+
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
47546
|
+
} else {
|
|
47547
|
+
pathsSpecifiers = append(pathsSpecifiers, local);
|
|
47548
|
+
}
|
|
47545
47549
|
} else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
47546
47550
|
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
47547
47551
|
}
|
|
@@ -80825,19 +80829,16 @@ function createTypeChecker(host) {
|
|
|
80825
80829
|
}
|
|
80826
80830
|
}
|
|
80827
80831
|
}
|
|
80828
|
-
function
|
|
80832
|
+
function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
|
|
80829
80833
|
const signature = getSingleCallSignature(funcType);
|
|
80830
|
-
if (signature) {
|
|
80831
|
-
|
|
80832
|
-
if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
|
|
80833
|
-
return returnType;
|
|
80834
|
-
}
|
|
80834
|
+
if (signature && !signature.typeParameters) {
|
|
80835
|
+
return getReturnTypeOfSignature(signature);
|
|
80835
80836
|
}
|
|
80836
80837
|
}
|
|
80837
80838
|
function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
|
|
80838
80839
|
const funcType = checkExpression(expr.expression);
|
|
80839
80840
|
const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
|
|
80840
|
-
const returnType =
|
|
80841
|
+
const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
|
|
80841
80842
|
return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
|
|
80842
80843
|
}
|
|
80843
80844
|
function getTypeOfExpression(node) {
|
|
@@ -80882,7 +80883,7 @@ function createTypeChecker(host) {
|
|
|
80882
80883
|
/*requireStringLiteralLikeArgument*/
|
|
80883
80884
|
true
|
|
80884
80885
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
80885
|
-
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) :
|
|
80886
|
+
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
80886
80887
|
} else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
|
|
80887
80888
|
return getTypeFromTypeNode(expr.type);
|
|
80888
80889
|
} else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
|
|
@@ -86237,14 +86238,15 @@ function createTypeChecker(host) {
|
|
|
86237
86238
|
idText(id)
|
|
86238
86239
|
);
|
|
86239
86240
|
}
|
|
86240
|
-
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
86241
|
-
|
|
86241
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
86242
|
+
const nonLocalMeanings = getSymbolFlags(
|
|
86242
86243
|
sym,
|
|
86243
86244
|
/*excludeTypeOnlyMeanings*/
|
|
86244
86245
|
false,
|
|
86245
86246
|
/*excludeLocalMeanings*/
|
|
86246
86247
|
true
|
|
86247
|
-
)
|
|
86248
|
+
);
|
|
86249
|
+
if (sym.flags & 2097152 /* Alias */ && nonLocalMeanings & 788968 /* Type */ && !(nonLocalMeanings & 111551 /* Value */) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
86248
86250
|
error2(
|
|
86249
86251
|
id,
|
|
86250
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.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.20240125`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -45394,7 +45394,11 @@ ${lanes.join("\n")}
|
|
|
45394
45394
|
if (modulePath.isRedirect) {
|
|
45395
45395
|
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
|
45396
45396
|
} else if (pathIsBareSpecifier(local)) {
|
|
45397
|
-
|
|
45397
|
+
if (pathContainsNodeModules(local)) {
|
|
45398
|
+
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
45399
|
+
} else {
|
|
45400
|
+
pathsSpecifiers = append(pathsSpecifiers, local);
|
|
45401
|
+
}
|
|
45398
45402
|
} else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
45399
45403
|
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
45400
45404
|
}
|
|
@@ -78579,19 +78583,16 @@ ${lanes.join("\n")}
|
|
|
78579
78583
|
}
|
|
78580
78584
|
}
|
|
78581
78585
|
}
|
|
78582
|
-
function
|
|
78586
|
+
function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
|
|
78583
78587
|
const signature = getSingleCallSignature(funcType);
|
|
78584
|
-
if (signature) {
|
|
78585
|
-
|
|
78586
|
-
if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
|
|
78587
|
-
return returnType;
|
|
78588
|
-
}
|
|
78588
|
+
if (signature && !signature.typeParameters) {
|
|
78589
|
+
return getReturnTypeOfSignature(signature);
|
|
78589
78590
|
}
|
|
78590
78591
|
}
|
|
78591
78592
|
function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
|
|
78592
78593
|
const funcType = checkExpression(expr.expression);
|
|
78593
78594
|
const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
|
|
78594
|
-
const returnType =
|
|
78595
|
+
const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
|
|
78595
78596
|
return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
|
|
78596
78597
|
}
|
|
78597
78598
|
function getTypeOfExpression(node) {
|
|
@@ -78636,7 +78637,7 @@ ${lanes.join("\n")}
|
|
|
78636
78637
|
/*requireStringLiteralLikeArgument*/
|
|
78637
78638
|
true
|
|
78638
78639
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
78639
|
-
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) :
|
|
78640
|
+
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
78640
78641
|
} else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
|
|
78641
78642
|
return getTypeFromTypeNode(expr.type);
|
|
78642
78643
|
} else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
|
|
@@ -83991,14 +83992,15 @@ ${lanes.join("\n")}
|
|
|
83991
83992
|
idText(id)
|
|
83992
83993
|
);
|
|
83993
83994
|
}
|
|
83994
|
-
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
83995
|
-
|
|
83995
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
83996
|
+
const nonLocalMeanings = getSymbolFlags(
|
|
83996
83997
|
sym,
|
|
83997
83998
|
/*excludeTypeOnlyMeanings*/
|
|
83998
83999
|
false,
|
|
83999
84000
|
/*excludeLocalMeanings*/
|
|
84000
84001
|
true
|
|
84001
|
-
)
|
|
84002
|
+
);
|
|
84003
|
+
if (sym.flags & 2097152 /* Alias */ && nonLocalMeanings & 788968 /* Type */ && !(nonLocalMeanings & 111551 /* Value */) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
84002
84004
|
error2(
|
|
84003
84005
|
id,
|
|
84004
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.20240125`;
|
|
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.20240125",
|
|
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": "b7f691d9f13be987e445c7878a40190ca5808691"
|
|
117
117
|
}
|