typescript 5.8.0-dev.20241205 → 5.8.0-dev.20241207
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 +19 -13
- package/lib/typescript.js +20 -15
- 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.8";
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20241207`;
|
22
22
|
|
23
23
|
// src/compiler/core.ts
|
24
24
|
var emptyArray = [];
|
@@ -6850,6 +6850,8 @@ var Diagnostics = {
|
|
6850
6850
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
6851
6851
|
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
6852
6852
|
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
6853
|
+
This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic: diag(4127, 1 /* Error */, "This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127", "This member cannot have an 'override' modifier because its name is dynamic."),
|
6854
|
+
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic: diag(4128, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128", "This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."),
|
6853
6855
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
6854
6856
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
6855
6857
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
@@ -40736,9 +40738,7 @@ function tryFileLookup(fileName, onlyRecordFailures, state) {
|
|
40736
40738
|
}
|
40737
40739
|
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson = true) {
|
40738
40740
|
const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;
|
40739
|
-
|
40740
|
-
const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state);
|
40741
|
-
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths), state);
|
40741
|
+
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo), state);
|
40742
40742
|
}
|
40743
40743
|
function getTemporaryModuleResolutionState(packageJsonInfoCache, host, options) {
|
40744
40744
|
return {
|
@@ -40845,13 +40845,14 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
40845
40845
|
(_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath);
|
40846
40846
|
}
|
40847
40847
|
}
|
40848
|
-
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state,
|
40848
|
+
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJson) {
|
40849
|
+
const versionPaths = packageJson && getVersionPathsOfPackageJsonInfo(packageJson, state);
|
40849
40850
|
let packageFile;
|
40850
|
-
if (
|
40851
|
+
if (packageJson && arePathsEqual(packageJson == null ? void 0 : packageJson.packageDirectory, candidate, state.host)) {
|
40851
40852
|
if (state.isConfigLookup) {
|
40852
|
-
packageFile = readPackageJsonTSConfigField(
|
40853
|
+
packageFile = readPackageJsonTSConfigField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state);
|
40853
40854
|
} else {
|
40854
|
-
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(
|
40855
|
+
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || void 0;
|
40855
40856
|
}
|
40856
40857
|
}
|
40857
40858
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
@@ -40870,7 +40871,7 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
40870
40871
|
const features = state2.features;
|
40871
40872
|
const candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField;
|
40872
40873
|
state2.candidateIsFromPackageJsonField = true;
|
40873
|
-
if ((
|
40874
|
+
if ((packageJson == null ? void 0 : packageJson.contents.packageJsonContent.type) !== "module") {
|
40874
40875
|
state2.features &= ~32 /* EsmMode */;
|
40875
40876
|
}
|
40876
40877
|
const result = nodeLoadModuleByRelativeName(
|
@@ -41473,8 +41474,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
41473
41474
|
candidate,
|
41474
41475
|
!nodeModulesDirectoryExists,
|
41475
41476
|
state,
|
41476
|
-
packageInfo
|
41477
|
-
getVersionPathsOfPackageJsonInfo(packageInfo, state)
|
41477
|
+
packageInfo
|
41478
41478
|
);
|
41479
41479
|
return withPackageId(packageInfo, fromDirectory, state);
|
41480
41480
|
}
|
@@ -41484,8 +41484,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
41484
41484
|
candidate2,
|
41485
41485
|
onlyRecordFailures,
|
41486
41486
|
state2,
|
41487
|
-
packageInfo
|
41488
|
-
packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state2)
|
41487
|
+
packageInfo
|
41489
41488
|
);
|
41490
41489
|
if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) {
|
41491
41490
|
pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2);
|
@@ -84103,6 +84102,13 @@ function createTypeChecker(host) {
|
|
84103
84102
|
function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) {
|
84104
84103
|
const isJs = isInJSFile(node);
|
84105
84104
|
const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */);
|
84105
|
+
if (memberHasOverrideModifier && (member == null ? void 0 : member.valueDeclaration) && isClassElement(member.valueDeclaration) && member.valueDeclaration.name && isNonBindableDynamicName(member.valueDeclaration.name)) {
|
84106
|
+
error(
|
84107
|
+
errorNode,
|
84108
|
+
isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic
|
84109
|
+
);
|
84110
|
+
return 2 /* HasInvalidOverride */;
|
84111
|
+
}
|
84106
84112
|
if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {
|
84107
84113
|
const thisType = memberIsStatic ? staticType : typeWithThis;
|
84108
84114
|
const baseType = memberIsStatic ? baseStaticType : baseWithThis;
|
package/lib/typescript.js
CHANGED
@@ -2278,7 +2278,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
2278
2278
|
|
2279
2279
|
// src/compiler/corePublic.ts
|
2280
2280
|
var versionMajorMinor = "5.8";
|
2281
|
-
var version = `${versionMajorMinor}.0-dev.
|
2281
|
+
var version = `${versionMajorMinor}.0-dev.20241207`;
|
2282
2282
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
2283
2283
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
2284
2284
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
@@ -10229,6 +10229,8 @@ var Diagnostics = {
|
|
10229
10229
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
10230
10230
|
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
10231
10231
|
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
10232
|
+
This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic: diag(4127, 1 /* Error */, "This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127", "This member cannot have an 'override' modifier because its name is dynamic."),
|
10233
|
+
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic: diag(4128, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128", "This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."),
|
10232
10234
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
10233
10235
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
10234
10236
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
@@ -45107,9 +45109,7 @@ function tryFileLookup(fileName, onlyRecordFailures, state) {
|
|
45107
45109
|
}
|
45108
45110
|
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson = true) {
|
45109
45111
|
const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;
|
45110
|
-
|
45111
|
-
const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state);
|
45112
|
-
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths), state);
|
45112
|
+
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo), state);
|
45113
45113
|
}
|
45114
45114
|
function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache, resolveJs) {
|
45115
45115
|
if (!resolveJs && packageJsonInfo.contents.resolvedEntrypoints !== void 0) {
|
@@ -45127,8 +45127,7 @@ function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache
|
|
45127
45127
|
/*onlyRecordFailures*/
|
45128
45128
|
false,
|
45129
45129
|
loadPackageJsonMainState,
|
45130
|
-
packageJsonInfo
|
45131
|
-
getVersionPathsOfPackageJsonInfo(packageJsonInfo, loadPackageJsonMainState)
|
45130
|
+
packageJsonInfo
|
45132
45131
|
);
|
45133
45132
|
entrypoints = append(entrypoints, mainResolution == null ? void 0 : mainResolution.path);
|
45134
45133
|
if (features & 8 /* Exports */ && packageJsonInfo.contents.packageJsonContent.exports) {
|
@@ -45331,13 +45330,14 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
45331
45330
|
(_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath);
|
45332
45331
|
}
|
45333
45332
|
}
|
45334
|
-
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state,
|
45333
|
+
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJson) {
|
45334
|
+
const versionPaths = packageJson && getVersionPathsOfPackageJsonInfo(packageJson, state);
|
45335
45335
|
let packageFile;
|
45336
|
-
if (
|
45336
|
+
if (packageJson && arePathsEqual(packageJson == null ? void 0 : packageJson.packageDirectory, candidate, state.host)) {
|
45337
45337
|
if (state.isConfigLookup) {
|
45338
|
-
packageFile = readPackageJsonTSConfigField(
|
45338
|
+
packageFile = readPackageJsonTSConfigField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state);
|
45339
45339
|
} else {
|
45340
|
-
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(
|
45340
|
+
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || void 0;
|
45341
45341
|
}
|
45342
45342
|
}
|
45343
45343
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
@@ -45356,7 +45356,7 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
45356
45356
|
const features = state2.features;
|
45357
45357
|
const candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField;
|
45358
45358
|
state2.candidateIsFromPackageJsonField = true;
|
45359
|
-
if ((
|
45359
|
+
if ((packageJson == null ? void 0 : packageJson.contents.packageJsonContent.type) !== "module") {
|
45360
45360
|
state2.features &= ~32 /* EsmMode */;
|
45361
45361
|
}
|
45362
45362
|
const result = nodeLoadModuleByRelativeName(
|
@@ -45959,8 +45959,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
45959
45959
|
candidate,
|
45960
45960
|
!nodeModulesDirectoryExists,
|
45961
45961
|
state,
|
45962
|
-
packageInfo
|
45963
|
-
getVersionPathsOfPackageJsonInfo(packageInfo, state)
|
45962
|
+
packageInfo
|
45964
45963
|
);
|
45965
45964
|
return withPackageId(packageInfo, fromDirectory, state);
|
45966
45965
|
}
|
@@ -45970,8 +45969,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
45970
45969
|
candidate2,
|
45971
45970
|
onlyRecordFailures,
|
45972
45971
|
state2,
|
45973
|
-
packageInfo
|
45974
|
-
packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state2)
|
45972
|
+
packageInfo
|
45975
45973
|
);
|
45976
45974
|
if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) {
|
45977
45975
|
pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2);
|
@@ -88707,6 +88705,13 @@ function createTypeChecker(host) {
|
|
88707
88705
|
function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) {
|
88708
88706
|
const isJs = isInJSFile(node);
|
88709
88707
|
const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */);
|
88708
|
+
if (memberHasOverrideModifier && (member == null ? void 0 : member.valueDeclaration) && isClassElement(member.valueDeclaration) && member.valueDeclaration.name && isNonBindableDynamicName(member.valueDeclaration.name)) {
|
88709
|
+
error2(
|
88710
|
+
errorNode,
|
88711
|
+
isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic
|
88712
|
+
);
|
88713
|
+
return 2 /* HasInvalidOverride */;
|
88714
|
+
}
|
88710
88715
|
if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {
|
88711
88716
|
const thisType = memberIsStatic ? staticType : typeWithThis;
|
88712
88717
|
const baseType = memberIsStatic ? baseStaticType : baseWithThis;
|
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.8.0-dev.
|
5
|
+
"version": "5.8.0-dev.20241207",
|
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": "421f5c5458d09dad601604e6eff8765283aef14e"
|
120
120
|
}
|