typescript 5.6.2 → 5.6.3
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 +7 -9
- package/lib/typescript.js +7 -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.6";
|
|
21
|
-
var version = "5.6.
|
|
21
|
+
var version = "5.6.3";
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -6885,7 +6885,6 @@ var Diagnostics = {
|
|
|
6885
6885
|
Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."),
|
|
6886
6886
|
Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),
|
|
6887
6887
|
Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),
|
|
6888
|
-
Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b: diag(5111, 1 /* Error */, "Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111", "Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'."),
|
|
6889
6888
|
Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
|
|
6890
6889
|
Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
|
|
6891
6890
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -54960,7 +54959,7 @@ function createTypeChecker(host) {
|
|
|
54960
54959
|
/*reportErrors*/
|
|
54961
54960
|
false
|
|
54962
54961
|
) : unknownType;
|
|
54963
|
-
return addOptionality(
|
|
54962
|
+
return addOptionality(getWidenedLiteralTypeForInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType)));
|
|
54964
54963
|
}
|
|
54965
54964
|
if (isBindingPattern(element.name)) {
|
|
54966
54965
|
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2);
|
|
@@ -78755,7 +78754,7 @@ function createTypeChecker(host) {
|
|
|
78755
78754
|
return createTupleType(elementTypes, elementFlags, type.target.readonly);
|
|
78756
78755
|
}
|
|
78757
78756
|
function widenTypeInferredFromInitializer(declaration, type) {
|
|
78758
|
-
const widened =
|
|
78757
|
+
const widened = getWidenedLiteralTypeForInitializer(declaration, type);
|
|
78759
78758
|
if (isInJSFile(declaration)) {
|
|
78760
78759
|
if (isEmptyLiteralType(widened)) {
|
|
78761
78760
|
reportImplicitAny(declaration, anyType);
|
|
@@ -78767,6 +78766,9 @@ function createTypeChecker(host) {
|
|
|
78767
78766
|
}
|
|
78768
78767
|
return widened;
|
|
78769
78768
|
}
|
|
78769
|
+
function getWidenedLiteralTypeForInitializer(declaration, type) {
|
|
78770
|
+
return getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
|
|
78771
|
+
}
|
|
78770
78772
|
function isLiteralOfContextualType(candidateType, contextualType) {
|
|
78771
78773
|
if (contextualType) {
|
|
78772
78774
|
if (contextualType.flags & 3145728 /* UnionOrIntersection */) {
|
|
@@ -122129,11 +122131,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122129
122131
|
}
|
|
122130
122132
|
}
|
|
122131
122133
|
const outputFile = options.outFile;
|
|
122132
|
-
if (options.tsBuildInfoFile) {
|
|
122133
|
-
if (!canEmitTsBuildInfo(options)) {
|
|
122134
|
-
createDiagnosticForOptionName(Diagnostics.Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b, "tsBuildInfoFile");
|
|
122135
|
-
}
|
|
122136
|
-
} else if (options.incremental && !outputFile && !options.configFilePath) {
|
|
122134
|
+
if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {
|
|
122137
122135
|
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
|
|
122138
122136
|
}
|
|
122139
122137
|
verifyDeprecatedCompilerOptions();
|
package/lib/typescript.js
CHANGED
|
@@ -239,7 +239,6 @@ __export(typescript_exports, {
|
|
|
239
239
|
buildOverload: () => buildOverload,
|
|
240
240
|
bundlerModuleNameResolver: () => bundlerModuleNameResolver,
|
|
241
241
|
canBeConvertedToAsync: () => canBeConvertedToAsync,
|
|
242
|
-
canEmitTsBuildInfo: () => canEmitTsBuildInfo,
|
|
243
242
|
canHaveDecorators: () => canHaveDecorators,
|
|
244
243
|
canHaveExportModifier: () => canHaveExportModifier,
|
|
245
244
|
canHaveFlowNode: () => canHaveFlowNode,
|
|
@@ -2263,7 +2262,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2263
2262
|
|
|
2264
2263
|
// src/compiler/corePublic.ts
|
|
2265
2264
|
var versionMajorMinor = "5.6";
|
|
2266
|
-
var version = "5.6.
|
|
2265
|
+
var version = "5.6.3";
|
|
2267
2266
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2268
2267
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2269
2268
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -10283,7 +10282,6 @@ var Diagnostics = {
|
|
|
10283
10282
|
Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."),
|
|
10284
10283
|
Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),
|
|
10285
10284
|
Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),
|
|
10286
|
-
Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b: diag(5111, 1 /* Error */, "Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111", "Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'."),
|
|
10287
10285
|
Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
|
|
10288
10286
|
Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
|
|
10289
10287
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -59580,7 +59578,7 @@ function createTypeChecker(host) {
|
|
|
59580
59578
|
/*reportErrors*/
|
|
59581
59579
|
false
|
|
59582
59580
|
) : unknownType;
|
|
59583
|
-
return addOptionality(
|
|
59581
|
+
return addOptionality(getWidenedLiteralTypeForInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType)));
|
|
59584
59582
|
}
|
|
59585
59583
|
if (isBindingPattern(element.name)) {
|
|
59586
59584
|
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2);
|
|
@@ -83375,7 +83373,7 @@ function createTypeChecker(host) {
|
|
|
83375
83373
|
return createTupleType(elementTypes, elementFlags, type.target.readonly);
|
|
83376
83374
|
}
|
|
83377
83375
|
function widenTypeInferredFromInitializer(declaration, type) {
|
|
83378
|
-
const widened =
|
|
83376
|
+
const widened = getWidenedLiteralTypeForInitializer(declaration, type);
|
|
83379
83377
|
if (isInJSFile(declaration)) {
|
|
83380
83378
|
if (isEmptyLiteralType(widened)) {
|
|
83381
83379
|
reportImplicitAny(declaration, anyType);
|
|
@@ -83387,6 +83385,9 @@ function createTypeChecker(host) {
|
|
|
83387
83385
|
}
|
|
83388
83386
|
return widened;
|
|
83389
83387
|
}
|
|
83388
|
+
function getWidenedLiteralTypeForInitializer(declaration, type) {
|
|
83389
|
+
return getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
|
|
83390
|
+
}
|
|
83390
83391
|
function isLiteralOfContextualType(candidateType, contextualType) {
|
|
83391
83392
|
if (contextualType) {
|
|
83392
83393
|
if (contextualType.flags & 3145728 /* UnionOrIntersection */) {
|
|
@@ -126988,11 +126989,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
126988
126989
|
}
|
|
126989
126990
|
}
|
|
126990
126991
|
const outputFile = options.outFile;
|
|
126991
|
-
if (options.tsBuildInfoFile) {
|
|
126992
|
-
if (!canEmitTsBuildInfo(options)) {
|
|
126993
|
-
createDiagnosticForOptionName(Diagnostics.Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b, "tsBuildInfoFile");
|
|
126994
|
-
}
|
|
126995
|
-
} else if (options.incremental && !outputFile && !options.configFilePath) {
|
|
126992
|
+
if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {
|
|
126996
126993
|
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
|
|
126997
126994
|
}
|
|
126998
126995
|
verifyDeprecatedCompilerOptions();
|
|
@@ -179691,7 +179688,6 @@ __export(ts_exports2, {
|
|
|
179691
179688
|
buildOverload: () => buildOverload,
|
|
179692
179689
|
bundlerModuleNameResolver: () => bundlerModuleNameResolver,
|
|
179693
179690
|
canBeConvertedToAsync: () => canBeConvertedToAsync,
|
|
179694
|
-
canEmitTsBuildInfo: () => canEmitTsBuildInfo,
|
|
179695
179691
|
canHaveDecorators: () => canHaveDecorators,
|
|
179696
179692
|
canHaveExportModifier: () => canHaveExportModifier,
|
|
179697
179693
|
canHaveFlowNode: () => canHaveFlowNode,
|
|
@@ -194049,7 +194045,6 @@ if (typeof console !== "undefined") {
|
|
|
194049
194045
|
buildOverload,
|
|
194050
194046
|
bundlerModuleNameResolver,
|
|
194051
194047
|
canBeConvertedToAsync,
|
|
194052
|
-
canEmitTsBuildInfo,
|
|
194053
194048
|
canHaveDecorators,
|
|
194054
194049
|
canHaveExportModifier,
|
|
194055
194050
|
canHaveFlowNode,
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -182,7 +182,7 @@ var NodeTypingsInstaller = class extends typescript_exports.server.typingsInstal
|
|
|
182
182
|
this.log.writeLine(`Exec: ${command}`);
|
|
183
183
|
}
|
|
184
184
|
try {
|
|
185
|
-
const stdout = (0, import_child_process.
|
|
185
|
+
const stdout = (0, import_child_process.execSync)(command, { ...options, encoding: "utf-8" });
|
|
186
186
|
if (this.log.isEnabled()) {
|
|
187
187
|
this.log.writeLine(` Succeeded. stdout:${indent(typescript_exports.sys.newLine, stdout)}`);
|
|
188
188
|
}
|
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.6.
|
|
5
|
+
"version": "5.6.3",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"node": "20.1.0",
|
|
118
118
|
"npm": "8.19.4"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "d48a5cf89a62a62d6c6ed53ffa18f070d9458b85"
|
|
121
121
|
}
|