...**/!(*.map|*.min.js)Size
Gzip
Dependencies
Publish
Install
@@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | // src/compiler/corePublic.ts | 19 | // src/compiler/corePublic.ts |
| 20 | var versionMajorMinor = "5.6"; | 20 | var versionMajorMinor = "5.6"; |
| 21 | var version = "5.6.2"; | 21 | var version = "5.6.3"; |
| 22 | 22 | ||
| 23 | // src/compiler/core.ts | 23 | // src/compiler/core.ts |
| 24 | var emptyArray = []; | 24 | var emptyArray = []; |
@@ -6885,7 +6885,6 @@ | |||
| 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."), | 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 | 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}'."), | 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 | 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}'."), | 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 | 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."), | 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 | 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."), | 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 | Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), | 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 @@ | |||
| 54960 | /*reportErrors*/ | 54959 | /*reportErrors*/ |
| 54961 | false | 54960 | false |
| 54962 | ) : unknownType; | 54961 | ) : unknownType; |
| 54963 | return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType))); | 54962 | return addOptionality(getWidenedLiteralTypeForInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType))); |
| 54964 | } | 54963 | } |
| 54965 | if (isBindingPattern(element.name)) { | 54964 | if (isBindingPattern(element.name)) { |
| 54966 | return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2); | 54965 | return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2); |
@@ -78755,7 +78754,7 @@ | |||
| 78755 | return createTupleType(elementTypes, elementFlags, type.target.readonly); | 78754 | return createTupleType(elementTypes, elementFlags, type.target.readonly); |
| 78756 | } | 78755 | } |
| 78757 | function widenTypeInferredFromInitializer(declaration, type) { | 78756 | function widenTypeInferredFromInitializer(declaration, type) { |
| 78758 | const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); | 78757 | const widened = getWidenedLiteralTypeForInitializer(declaration, type); |
| 78759 | if (isInJSFile(declaration)) { | 78758 | if (isInJSFile(declaration)) { |
| 78760 | if (isEmptyLiteralType(widened)) { | 78759 | if (isEmptyLiteralType(widened)) { |
| 78761 | reportImplicitAny(declaration, anyType); | 78760 | reportImplicitAny(declaration, anyType); |
@@ -78767,6 +78766,9 @@ | |||
| 78767 | } | 78766 | } |
| 78768 | return widened; | 78767 | return widened; |
| 78769 | } | 78768 | } |
| 78769 | function getWidenedLiteralTypeForInitializer(declaration, type) { | ||
| 78770 | return getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); | ||
| 78771 | } | ||
| 78770 | function isLiteralOfContextualType(candidateType, contextualType) { | 78772 | function isLiteralOfContextualType(candidateType, contextualType) { |
| 78771 | if (contextualType) { | 78773 | if (contextualType) { |
| 78772 | if (contextualType.flags & 3145728 /* UnionOrIntersection */) { | 78774 | if (contextualType.flags & 3145728 /* UnionOrIntersection */) { |
@@ -122129,11 +122131,7 @@ | |||
| 122129 | } | 122131 | } |
| 122130 | } | 122132 | } |
| 122131 | const outputFile = options.outFile; | 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 | programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); | 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 | verifyDeprecatedCompilerOptions(); | 122137 | verifyDeprecatedCompilerOptions(); |
@@ -239,7 +239,6 @@ | |||
| 239 | buildOverload: () => buildOverload, | 239 | buildOverload: () => buildOverload, |
| 240 | bundlerModuleNameResolver: () => bundlerModuleNameResolver, | 240 | bundlerModuleNameResolver: () => bundlerModuleNameResolver, |
| 241 | canBeConvertedToAsync: () => canBeConvertedToAsync, | 241 | canBeConvertedToAsync: () => canBeConvertedToAsync, |
| 242 | canEmitTsBuildInfo: () => canEmitTsBuildInfo, | ||
| 243 | canHaveDecorators: () => canHaveDecorators, | 242 | canHaveDecorators: () => canHaveDecorators, |
| 244 | canHaveExportModifier: () => canHaveExportModifier, | 243 | canHaveExportModifier: () => canHaveExportModifier, |
| 245 | canHaveFlowNode: () => canHaveFlowNode, | 244 | canHaveFlowNode: () => canHaveFlowNode, |
@@ -2263,7 +2262,7 @@ | |||
| 2263 | 2262 | ||
| 2264 | // src/compiler/corePublic.ts | 2263 | // src/compiler/corePublic.ts |
| 2265 | var versionMajorMinor = "5.6"; | 2264 | var versionMajorMinor = "5.6"; |
| 2266 | var version = "5.6.2"; | 2265 | var version = "5.6.3"; |
| 2267 | var Comparison = /* @__PURE__ */ ((Comparison3) => { | 2266 | var Comparison = /* @__PURE__ */ ((Comparison3) => { |
| 2268 | Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; | 2267 | Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; |
| 2269 | Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; | 2268 | Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; |
@@ -10283,7 +10282,6 @@ | |||
| 10283 | 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."), | 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 | 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}'."), | 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 | 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}'."), | 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 | 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."), | 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 | 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."), | 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 | Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), | 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 @@ | |||
| 59580 | /*reportErrors*/ | 59578 | /*reportErrors*/ |
| 59581 | false | 59579 | false |
| 59582 | ) : unknownType; | 59580 | ) : unknownType; |
| 59583 | return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType))); | 59581 | return addOptionality(getWidenedLiteralTypeForInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType))); |
| 59584 | } | 59582 | } |
| 59585 | if (isBindingPattern(element.name)) { | 59583 | if (isBindingPattern(element.name)) { |
| 59586 | return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2); | 59584 | return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2); |
@@ -83375,7 +83373,7 @@ | |||
| 83375 | return createTupleType(elementTypes, elementFlags, type.target.readonly); | 83373 | return createTupleType(elementTypes, elementFlags, type.target.readonly); |
| 83376 | } | 83374 | } |
| 83377 | function widenTypeInferredFromInitializer(declaration, type) { | 83375 | function widenTypeInferredFromInitializer(declaration, type) { |
| 83378 | const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); | 83376 | const widened = getWidenedLiteralTypeForInitializer(declaration, type); |
| 83379 | if (isInJSFile(declaration)) { | 83377 | if (isInJSFile(declaration)) { |
| 83380 | if (isEmptyLiteralType(widened)) { | 83378 | if (isEmptyLiteralType(widened)) { |
| 83381 | reportImplicitAny(declaration, anyType); | 83379 | reportImplicitAny(declaration, anyType); |
@@ -83387,6 +83385,9 @@ | |||
| 83387 | } | 83385 | } |
| 83388 | return widened; | 83386 | return widened; |
| 83389 | } | 83387 | } |
| 83388 | function getWidenedLiteralTypeForInitializer(declaration, type) { | ||
| 83389 | return getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); | ||
| 83390 | } | ||
| 83390 | function isLiteralOfContextualType(candidateType, contextualType) { | 83391 | function isLiteralOfContextualType(candidateType, contextualType) { |
| 83391 | if (contextualType) { | 83392 | if (contextualType) { |
| 83392 | if (contextualType.flags & 3145728 /* UnionOrIntersection */) { | 83393 | if (contextualType.flags & 3145728 /* UnionOrIntersection */) { |
@@ -126988,11 +126989,7 @@ | |||
| 126988 | } | 126989 | } |
| 126989 | } | 126990 | } |
| 126990 | const outputFile = options.outFile; | 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 | programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); | 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 | verifyDeprecatedCompilerOptions(); | 126995 | verifyDeprecatedCompilerOptions(); |
@@ -179691,7 +179688,6 @@ | |||
| 179691 | buildOverload: () => buildOverload, | 179688 | buildOverload: () => buildOverload, |
| 179692 | bundlerModuleNameResolver: () => bundlerModuleNameResolver, | 179689 | bundlerModuleNameResolver: () => bundlerModuleNameResolver, |
| 179693 | canBeConvertedToAsync: () => canBeConvertedToAsync, | 179690 | canBeConvertedToAsync: () => canBeConvertedToAsync, |
| 179694 | canEmitTsBuildInfo: () => canEmitTsBuildInfo, | ||
| 179695 | canHaveDecorators: () => canHaveDecorators, | 179691 | canHaveDecorators: () => canHaveDecorators, |
| 179696 | canHaveExportModifier: () => canHaveExportModifier, | 179692 | canHaveExportModifier: () => canHaveExportModifier, |
| 179697 | canHaveFlowNode: () => canHaveFlowNode, | 179693 | canHaveFlowNode: () => canHaveFlowNode, |
@@ -194049,7 +194045,6 @@ | |||
| 194049 | buildOverload, | 194045 | buildOverload, |
| 194050 | bundlerModuleNameResolver, | 194046 | bundlerModuleNameResolver, |
| 194051 | canBeConvertedToAsync, | 194047 | canBeConvertedToAsync, |
| 194052 | canEmitTsBuildInfo, | ||
| 194053 | canHaveDecorators, | 194048 | canHaveDecorators, |
| 194054 | canHaveExportModifier, | 194049 | canHaveExportModifier, |
| 194055 | canHaveFlowNode, | 194050 | canHaveFlowNode, |
@@ -182,7 +182,7 @@ | |||
| 182 | this.log.writeLine(`Exec: ${command}`); | 182 | this.log.writeLine(`Exec: ${command}`); |
| 183 | } | 183 | } |
| 184 | try { | 184 | try { |
| 185 | const stdout = (0, import_child_process.execFileSync)(command, { ...options, encoding: "utf-8" }); | 185 | const stdout = (0, import_child_process.execSync)(command, { ...options, encoding: "utf-8" }); |
| 186 | if (this.log.isEnabled()) { | 186 | if (this.log.isEnabled()) { |
| 187 | this.log.writeLine(` Succeeded. stdout:${indent(typescript_exports.sys.newLine, stdout)}`); | 187 | this.log.writeLine(` Succeeded. stdout:${indent(typescript_exports.sys.newLine, stdout)}`); |
| 188 | } | 188 | } |
@@ -2,7 +2,7 @@ | |||
| 2 | "name": "typescript", | 2 | "name": "typescript", |
| 3 | "author": "Microsoft Corp.", | 3 | "author": "Microsoft Corp.", |
| 4 | "homepage": "https://www.typescriptlang.org/", | 4 | "homepage": "https://www.typescriptlang.org/", |
| 5 | "version": "5.6.2", | 5 | "version": "5.6.3", |
| 6 | "license": "Apache-2.0", | 6 | "license": "Apache-2.0", |
| 7 | "description": "TypeScript is a language for application scale JavaScript development", | 7 | "description": "TypeScript is a language for application scale JavaScript development", |
| 8 | "keywords": [ | 8 | "keywords": [ |
@@ -117,5 +117,5 @@ | |||
| 117 | "node": "20.1.0", | 117 | "node": "20.1.0", |
| 118 | "npm": "8.19.4" | 118 | "npm": "8.19.4" |
| 119 | }, | 119 | }, |
| 120 | "gitHead": "a7e3374f13327483fbe94e32806d65785b0b6cda" | 120 | "gitHead": "d48a5cf89a62a62d6c6ed53ffa18f070d9458b85" |
| 121 | } | 121 | } |
Publish
Install