@typescript-deploys/pr-build 6.0.0-pr-62418-27 → 6.0.0-pr-53017-20
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 +97 -49
- package/lib/lib.es5.d.ts +9 -0
- package/lib/typescript.js +97 -52
- package/package.json +1 -1
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 = "6.0";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20251129`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -6241,6 +6241,7 @@ var Diagnostics = {
|
|
|
6241
6241
|
await_using_declarations_are_not_allowed_in_ambient_contexts: diag(1546, 1 /* Error */, "await_using_declarations_are_not_allowed_in_ambient_contexts_1546", "'await using' declarations are not allowed in ambient contexts."),
|
|
6242
6242
|
using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block: diag(1547, 1 /* Error */, "using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1547", "'using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block."),
|
|
6243
6243
|
await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block: diag(1548, 1 /* Error */, "await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1548", "'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block."),
|
|
6244
|
+
Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files: diag(1549, 3 /* Message */, "Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files_1549", "Ignore the tsconfig found and build with commandline options and files."),
|
|
6244
6245
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
6245
6246
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
6246
6247
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -6936,7 +6937,6 @@ var Diagnostics = {
|
|
|
6936
6937
|
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."),
|
|
6937
6938
|
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."),
|
|
6938
6939
|
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}'."),
|
|
6939
|
-
The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout: diag(5011, 1 /* Error */, "The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another__5011", "The common source directory of '{0}' is '{1}'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout."),
|
|
6940
6940
|
Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
|
|
6941
6941
|
Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
|
|
6942
6942
|
Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."),
|
|
@@ -7001,6 +7001,7 @@ var Diagnostics = {
|
|
|
7001
7001
|
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}'."),
|
|
7002
7002
|
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}'."),
|
|
7003
7003
|
Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information: diag(5111, 3 /* Message */, "Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information_5111", "Visit https://aka.ms/ts6 for migration information."),
|
|
7004
|
+
tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error: diag(5112, 1 /* Error */, "tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConf_5112", "tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error."),
|
|
7004
7005
|
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."),
|
|
7005
7006
|
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."),
|
|
7006
7007
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -16587,7 +16588,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
|
|
|
16587
16588
|
if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
|
|
16588
16589
|
if (options.outFile) return true;
|
|
16589
16590
|
if (!options.outDir) return false;
|
|
16590
|
-
if (options.rootDir || options.configFilePath) {
|
|
16591
|
+
if (options.rootDir || options.composite && options.configFilePath) {
|
|
16591
16592
|
const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
|
|
16592
16593
|
const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
|
|
16593
16594
|
if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
|
|
@@ -36863,6 +36864,15 @@ var commandOptionsWithoutBuild = [
|
|
|
36863
36864
|
description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
36864
36865
|
defaultValueDescription: false
|
|
36865
36866
|
},
|
|
36867
|
+
{
|
|
36868
|
+
name: "ignoreConfig",
|
|
36869
|
+
type: "boolean",
|
|
36870
|
+
showInSimplifiedHelpView: true,
|
|
36871
|
+
category: Diagnostics.Command_line_Options,
|
|
36872
|
+
isCommandLineOnly: true,
|
|
36873
|
+
description: Diagnostics.Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files,
|
|
36874
|
+
defaultValueDescription: false
|
|
36875
|
+
},
|
|
36866
36876
|
// Basic
|
|
36867
36877
|
targetOptionDeclaration,
|
|
36868
36878
|
moduleOptionDeclaration,
|
|
@@ -41723,7 +41733,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
41723
41733
|
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
41724
41734
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
41725
41735
|
const commonSourceDirGuesses = [];
|
|
41726
|
-
if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
|
|
41736
|
+
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
41727
41737
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
41728
41738
|
commonSourceDirGuesses.push(commonDir);
|
|
41729
41739
|
} else if (state.requestContainingDirectory) {
|
|
@@ -68143,7 +68153,8 @@ function createTypeChecker(host) {
|
|
|
68143
68153
|
priority: void 0,
|
|
68144
68154
|
topLevel: true,
|
|
68145
68155
|
isFixed: false,
|
|
68146
|
-
impliedArity: void 0
|
|
68156
|
+
impliedArity: void 0,
|
|
68157
|
+
indexes: void 0
|
|
68147
68158
|
};
|
|
68148
68159
|
}
|
|
68149
68160
|
function cloneInferenceInfo(inference) {
|
|
@@ -68155,7 +68166,8 @@ function createTypeChecker(host) {
|
|
|
68155
68166
|
priority: inference.priority,
|
|
68156
68167
|
topLevel: inference.topLevel,
|
|
68157
68168
|
isFixed: inference.isFixed,
|
|
68158
|
-
impliedArity: inference.impliedArity
|
|
68169
|
+
impliedArity: inference.impliedArity,
|
|
68170
|
+
indexes: inference.indexes && inference.indexes.slice()
|
|
68159
68171
|
};
|
|
68160
68172
|
}
|
|
68161
68173
|
function cloneInferredPartOfContext(context) {
|
|
@@ -68273,7 +68285,7 @@ function createTypeChecker(host) {
|
|
|
68273
68285
|
const templateType = getTemplateTypeFromMappedType(target);
|
|
68274
68286
|
const inference = createInferenceInfo(typeParameter);
|
|
68275
68287
|
inferTypes([inference], sourceType, templateType);
|
|
68276
|
-
return getTypeFromInference(inference) || unknownType;
|
|
68288
|
+
return getTypeFromInference(inference) || (inference.indexes ? getIntersectionType(inference.indexes) : unknownType);
|
|
68277
68289
|
}
|
|
68278
68290
|
function inferReverseMappedType(source, target, constraint) {
|
|
68279
68291
|
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
|
@@ -68614,6 +68626,24 @@ function createTypeChecker(host) {
|
|
|
68614
68626
|
} else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) {
|
|
68615
68627
|
inferFromTypes(source.objectType, target.objectType);
|
|
68616
68628
|
inferFromTypes(source.indexType, target.indexType);
|
|
68629
|
+
} else if (!(priority & 1 /* NakedTypeVariable */) && target.flags & 8388608 /* IndexedAccess */) {
|
|
68630
|
+
if (isFromInferenceBlockedSource(source)) {
|
|
68631
|
+
return;
|
|
68632
|
+
}
|
|
68633
|
+
const inference = getInferenceInfoForType(getActualTypeVariable(target.objectType));
|
|
68634
|
+
if (inference) {
|
|
68635
|
+
if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source === nonInferrableAnyType) {
|
|
68636
|
+
return;
|
|
68637
|
+
}
|
|
68638
|
+
if (!inference.isFixed) {
|
|
68639
|
+
const inferenceTypeSymbol = getGlobalSymbol("PartialInference", 788968 /* Type */, Diagnostics.Cannot_find_global_type_0);
|
|
68640
|
+
const inferenceType = inferenceTypeSymbol && getDeclaredTypeOfSymbol(inferenceTypeSymbol);
|
|
68641
|
+
if (inferenceType && inferenceType !== unknownType) {
|
|
68642
|
+
const mapper = createTypeMapper(getSymbolLinks(inferenceTypeSymbol).typeParameters, [source, target.indexType]);
|
|
68643
|
+
inference.indexes = append(inference.indexes, instantiateType(inferenceType, mapper));
|
|
68644
|
+
}
|
|
68645
|
+
}
|
|
68646
|
+
}
|
|
68617
68647
|
} else if (source.flags & 268435456 /* StringMapping */ && target.flags & 268435456 /* StringMapping */) {
|
|
68618
68648
|
if (source.symbol === target.symbol) {
|
|
68619
68649
|
inferFromTypes(source.type, target.type);
|
|
@@ -69117,6 +69147,51 @@ function createTypeChecker(host) {
|
|
|
69117
69147
|
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & (131072 /* Never */ | 1 /* Any */)) && some(inference.contraCandidates, (t) => isTypeAssignableTo(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeAssignableTo(t, inferredCovariantType))));
|
|
69118
69148
|
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
69119
69149
|
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
69150
|
+
} else if (inference.indexes) {
|
|
69151
|
+
let aggregateInference = getIntersectionType(inference.indexes);
|
|
69152
|
+
const constraint2 = getConstraintOfTypeParameter(inference.typeParameter);
|
|
69153
|
+
if (constraint2) {
|
|
69154
|
+
const instantiatedConstraint = instantiateType(constraint2, context.nonFixingMapper);
|
|
69155
|
+
if (instantiatedConstraint.flags & 1048576 /* Union */ && !context.compareTypes(aggregateInference, getTypeWithThisArgument(instantiatedConstraint, aggregateInference))) {
|
|
69156
|
+
const discriminantProps = findDiscriminantProperties(getPropertiesOfType(aggregateInference), instantiatedConstraint);
|
|
69157
|
+
if (discriminantProps) {
|
|
69158
|
+
let match;
|
|
69159
|
+
findDiscriminant:
|
|
69160
|
+
for (const p of discriminantProps) {
|
|
69161
|
+
const candidatePropType = getTypeOfPropertyOfType(aggregateInference, p.escapedName);
|
|
69162
|
+
for (const type of instantiatedConstraint.types) {
|
|
69163
|
+
const propType = getTypeOfPropertyOfType(type, p.escapedName);
|
|
69164
|
+
if (propType && candidatePropType && checkTypeAssignableTo(
|
|
69165
|
+
candidatePropType,
|
|
69166
|
+
propType,
|
|
69167
|
+
/*errorNode*/
|
|
69168
|
+
void 0
|
|
69169
|
+
)) {
|
|
69170
|
+
if (match && match !== type) {
|
|
69171
|
+
match = void 0;
|
|
69172
|
+
break findDiscriminant;
|
|
69173
|
+
} else {
|
|
69174
|
+
match = type;
|
|
69175
|
+
}
|
|
69176
|
+
}
|
|
69177
|
+
}
|
|
69178
|
+
}
|
|
69179
|
+
if (match) {
|
|
69180
|
+
aggregateInference = getSpreadType(
|
|
69181
|
+
match,
|
|
69182
|
+
aggregateInference,
|
|
69183
|
+
/*symbol*/
|
|
69184
|
+
void 0,
|
|
69185
|
+
/*propegatedFlags*/
|
|
69186
|
+
0,
|
|
69187
|
+
/*readonly*/
|
|
69188
|
+
false
|
|
69189
|
+
);
|
|
69190
|
+
}
|
|
69191
|
+
}
|
|
69192
|
+
}
|
|
69193
|
+
}
|
|
69194
|
+
inferredType = aggregateInference;
|
|
69120
69195
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
69121
69196
|
inferredType = silentNeverType;
|
|
69122
69197
|
} else {
|
|
@@ -115959,7 +116034,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
115959
116034
|
if (options.rootDir) {
|
|
115960
116035
|
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
|
|
115961
116036
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
|
|
115962
|
-
} else if (options.configFilePath) {
|
|
116037
|
+
} else if (options.composite && options.configFilePath) {
|
|
115963
116038
|
commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
|
|
115964
116039
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
|
|
115965
116040
|
} else {
|
|
@@ -115970,13 +116045,6 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
115970
116045
|
}
|
|
115971
116046
|
return commonSourceDirectory;
|
|
115972
116047
|
}
|
|
115973
|
-
function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
|
|
115974
|
-
let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
115975
|
-
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
|
|
115976
|
-
commonSourceDirectory += directorySeparator;
|
|
115977
|
-
}
|
|
115978
|
-
return commonSourceDirectory;
|
|
115979
|
-
}
|
|
115980
116048
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
115981
116049
|
return getCommonSourceDirectory(
|
|
115982
116050
|
options,
|
|
@@ -124409,31 +124477,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124409
124477
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
124410
124478
|
}
|
|
124411
124479
|
}
|
|
124412
|
-
if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
|
|
124413
|
-
getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
|
|
124414
|
-
options.outFile)) {
|
|
124415
|
-
const dir = getCommonSourceDirectory2();
|
|
124416
|
-
const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
|
|
124417
|
-
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
124418
|
-
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
|
|
124419
|
-
createDiagnosticForOption(
|
|
124420
|
-
/*onKey*/
|
|
124421
|
-
true,
|
|
124422
|
-
options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
|
|
124423
|
-
!options.outFile && options.outDir ? "declarationDir" : void 0,
|
|
124424
|
-
chainDiagnosticMessages(
|
|
124425
|
-
chainDiagnosticMessages(
|
|
124426
|
-
/*details*/
|
|
124427
|
-
void 0,
|
|
124428
|
-
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
124429
|
-
),
|
|
124430
|
-
Diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout,
|
|
124431
|
-
getBaseFileName(options.configFilePath),
|
|
124432
|
-
getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
|
|
124433
|
-
)
|
|
124434
|
-
);
|
|
124435
|
-
}
|
|
124436
|
-
}
|
|
124437
124480
|
if (options.checkJs && !getAllowJSCompilerOption(options)) {
|
|
124438
124481
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
|
|
124439
124482
|
}
|
|
@@ -132088,18 +132131,23 @@ function executeCommandLineWorker(sys2, cb, commandLine) {
|
|
|
132088
132131
|
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
132089
132132
|
}
|
|
132090
132133
|
}
|
|
132091
|
-
} else if (commandLine.fileNames.length === 0) {
|
|
132134
|
+
} else if (!commandLine.options.ignoreConfig || commandLine.fileNames.length === 0) {
|
|
132092
132135
|
const searchPath = normalizePath(sys2.getCurrentDirectory());
|
|
132093
132136
|
configFileName = findConfigFile(searchPath, (fileName) => sys2.fileExists(fileName));
|
|
132094
|
-
|
|
132095
|
-
|
|
132096
|
-
|
|
132097
|
-
|
|
132098
|
-
|
|
132099
|
-
|
|
132100
|
-
|
|
132137
|
+
if (commandLine.fileNames.length !== 0) {
|
|
132138
|
+
if (configFileName) {
|
|
132139
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error));
|
|
132140
|
+
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
132141
|
+
}
|
|
132142
|
+
} else if (!configFileName) {
|
|
132143
|
+
if (commandLine.options.showConfig) {
|
|
132144
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, normalizePath(sys2.getCurrentDirectory())));
|
|
132145
|
+
} else {
|
|
132146
|
+
printVersion(sys2);
|
|
132147
|
+
printHelp(sys2, commandLine);
|
|
132148
|
+
}
|
|
132149
|
+
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
132101
132150
|
}
|
|
132102
|
-
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
132103
132151
|
}
|
|
132104
132152
|
const currentDirectory = sys2.getCurrentDirectory();
|
|
132105
132153
|
const commandLineOptions = convertToOptionsWithAbsolutePaths(
|
package/lib/lib.es5.d.ts
CHANGED
|
@@ -1682,6 +1682,15 @@ type NoInfer<T> = intrinsic;
|
|
|
1682
1682
|
*/
|
|
1683
1683
|
interface ThisType<T> {}
|
|
1684
1684
|
|
|
1685
|
+
/**
|
|
1686
|
+
* Type instantiated to perform partial inferences from indexed accesses
|
|
1687
|
+
*/
|
|
1688
|
+
type PartialInference<T, Keys extends string> = ({
|
|
1689
|
+
[K in Keys]: {
|
|
1690
|
+
[K1 in K]: T;
|
|
1691
|
+
};
|
|
1692
|
+
})[Keys];
|
|
1693
|
+
|
|
1685
1694
|
/**
|
|
1686
1695
|
* Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry
|
|
1687
1696
|
*/
|
package/lib/typescript.js
CHANGED
|
@@ -673,7 +673,6 @@ __export(typescript_exports, {
|
|
|
673
673
|
getCommonSourceDirectory: () => getCommonSourceDirectory,
|
|
674
674
|
getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
|
|
675
675
|
getCompilerOptionValue: () => getCompilerOptionValue,
|
|
676
|
-
getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
|
|
677
676
|
getConditions: () => getConditions,
|
|
678
677
|
getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
|
|
679
678
|
getConstantValue: () => getConstantValue,
|
|
@@ -2287,7 +2286,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2287
2286
|
|
|
2288
2287
|
// src/compiler/corePublic.ts
|
|
2289
2288
|
var versionMajorMinor = "6.0";
|
|
2290
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2289
|
+
var version = `${versionMajorMinor}.0-insiders.20251129`;
|
|
2291
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2292
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2293
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -9643,6 +9642,7 @@ var Diagnostics = {
|
|
|
9643
9642
|
await_using_declarations_are_not_allowed_in_ambient_contexts: diag(1546, 1 /* Error */, "await_using_declarations_are_not_allowed_in_ambient_contexts_1546", "'await using' declarations are not allowed in ambient contexts."),
|
|
9644
9643
|
using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block: diag(1547, 1 /* Error */, "using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1547", "'using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block."),
|
|
9645
9644
|
await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block: diag(1548, 1 /* Error */, "await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1548", "'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block."),
|
|
9645
|
+
Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files: diag(1549, 3 /* Message */, "Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files_1549", "Ignore the tsconfig found and build with commandline options and files."),
|
|
9646
9646
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
9647
9647
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
9648
9648
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -10338,7 +10338,6 @@ var Diagnostics = {
|
|
|
10338
10338
|
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."),
|
|
10339
10339
|
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."),
|
|
10340
10340
|
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}'."),
|
|
10341
|
-
The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout: diag(5011, 1 /* Error */, "The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another__5011", "The common source directory of '{0}' is '{1}'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout."),
|
|
10342
10341
|
Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
|
|
10343
10342
|
Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
|
|
10344
10343
|
Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."),
|
|
@@ -10403,6 +10402,7 @@ var Diagnostics = {
|
|
|
10403
10402
|
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}'."),
|
|
10404
10403
|
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}'."),
|
|
10405
10404
|
Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information: diag(5111, 3 /* Message */, "Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information_5111", "Visit https://aka.ms/ts6 for migration information."),
|
|
10405
|
+
tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error: diag(5112, 1 /* Error */, "tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConf_5112", "tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error."),
|
|
10406
10406
|
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."),
|
|
10407
10407
|
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."),
|
|
10408
10408
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -20415,7 +20415,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
|
|
|
20415
20415
|
if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
|
|
20416
20416
|
if (options.outFile) return true;
|
|
20417
20417
|
if (!options.outDir) return false;
|
|
20418
|
-
if (options.rootDir || options.configFilePath) {
|
|
20418
|
+
if (options.rootDir || options.composite && options.configFilePath) {
|
|
20419
20419
|
const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
|
|
20420
20420
|
const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
|
|
20421
20421
|
if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
|
|
@@ -41142,6 +41142,15 @@ var commandOptionsWithoutBuild = [
|
|
|
41142
41142
|
description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
41143
41143
|
defaultValueDescription: false
|
|
41144
41144
|
},
|
|
41145
|
+
{
|
|
41146
|
+
name: "ignoreConfig",
|
|
41147
|
+
type: "boolean",
|
|
41148
|
+
showInSimplifiedHelpView: true,
|
|
41149
|
+
category: Diagnostics.Command_line_Options,
|
|
41150
|
+
isCommandLineOnly: true,
|
|
41151
|
+
description: Diagnostics.Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files,
|
|
41152
|
+
defaultValueDescription: false
|
|
41153
|
+
},
|
|
41145
41154
|
// Basic
|
|
41146
41155
|
targetOptionDeclaration,
|
|
41147
41156
|
moduleOptionDeclaration,
|
|
@@ -46234,7 +46243,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
46234
46243
|
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
46235
46244
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
46236
46245
|
const commonSourceDirGuesses = [];
|
|
46237
|
-
if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
|
|
46246
|
+
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
46238
46247
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
46239
46248
|
commonSourceDirGuesses.push(commonDir);
|
|
46240
46249
|
} else if (state.requestContainingDirectory) {
|
|
@@ -72772,7 +72781,8 @@ function createTypeChecker(host) {
|
|
|
72772
72781
|
priority: void 0,
|
|
72773
72782
|
topLevel: true,
|
|
72774
72783
|
isFixed: false,
|
|
72775
|
-
impliedArity: void 0
|
|
72784
|
+
impliedArity: void 0,
|
|
72785
|
+
indexes: void 0
|
|
72776
72786
|
};
|
|
72777
72787
|
}
|
|
72778
72788
|
function cloneInferenceInfo(inference) {
|
|
@@ -72784,7 +72794,8 @@ function createTypeChecker(host) {
|
|
|
72784
72794
|
priority: inference.priority,
|
|
72785
72795
|
topLevel: inference.topLevel,
|
|
72786
72796
|
isFixed: inference.isFixed,
|
|
72787
|
-
impliedArity: inference.impliedArity
|
|
72797
|
+
impliedArity: inference.impliedArity,
|
|
72798
|
+
indexes: inference.indexes && inference.indexes.slice()
|
|
72788
72799
|
};
|
|
72789
72800
|
}
|
|
72790
72801
|
function cloneInferredPartOfContext(context) {
|
|
@@ -72902,7 +72913,7 @@ function createTypeChecker(host) {
|
|
|
72902
72913
|
const templateType = getTemplateTypeFromMappedType(target);
|
|
72903
72914
|
const inference = createInferenceInfo(typeParameter);
|
|
72904
72915
|
inferTypes([inference], sourceType, templateType);
|
|
72905
|
-
return getTypeFromInference(inference) || unknownType;
|
|
72916
|
+
return getTypeFromInference(inference) || (inference.indexes ? getIntersectionType(inference.indexes) : unknownType);
|
|
72906
72917
|
}
|
|
72907
72918
|
function inferReverseMappedType(source, target, constraint) {
|
|
72908
72919
|
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
|
@@ -73243,6 +73254,24 @@ function createTypeChecker(host) {
|
|
|
73243
73254
|
} else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) {
|
|
73244
73255
|
inferFromTypes(source.objectType, target.objectType);
|
|
73245
73256
|
inferFromTypes(source.indexType, target.indexType);
|
|
73257
|
+
} else if (!(priority & 1 /* NakedTypeVariable */) && target.flags & 8388608 /* IndexedAccess */) {
|
|
73258
|
+
if (isFromInferenceBlockedSource(source)) {
|
|
73259
|
+
return;
|
|
73260
|
+
}
|
|
73261
|
+
const inference = getInferenceInfoForType(getActualTypeVariable(target.objectType));
|
|
73262
|
+
if (inference) {
|
|
73263
|
+
if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source === nonInferrableAnyType) {
|
|
73264
|
+
return;
|
|
73265
|
+
}
|
|
73266
|
+
if (!inference.isFixed) {
|
|
73267
|
+
const inferenceTypeSymbol = getGlobalSymbol("PartialInference", 788968 /* Type */, Diagnostics.Cannot_find_global_type_0);
|
|
73268
|
+
const inferenceType = inferenceTypeSymbol && getDeclaredTypeOfSymbol(inferenceTypeSymbol);
|
|
73269
|
+
if (inferenceType && inferenceType !== unknownType) {
|
|
73270
|
+
const mapper = createTypeMapper(getSymbolLinks(inferenceTypeSymbol).typeParameters, [source, target.indexType]);
|
|
73271
|
+
inference.indexes = append(inference.indexes, instantiateType(inferenceType, mapper));
|
|
73272
|
+
}
|
|
73273
|
+
}
|
|
73274
|
+
}
|
|
73246
73275
|
} else if (source.flags & 268435456 /* StringMapping */ && target.flags & 268435456 /* StringMapping */) {
|
|
73247
73276
|
if (source.symbol === target.symbol) {
|
|
73248
73277
|
inferFromTypes(source.type, target.type);
|
|
@@ -73746,6 +73775,51 @@ function createTypeChecker(host) {
|
|
|
73746
73775
|
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & (131072 /* Never */ | 1 /* Any */)) && some(inference.contraCandidates, (t) => isTypeAssignableTo(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeAssignableTo(t, inferredCovariantType))));
|
|
73747
73776
|
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
73748
73777
|
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
73778
|
+
} else if (inference.indexes) {
|
|
73779
|
+
let aggregateInference = getIntersectionType(inference.indexes);
|
|
73780
|
+
const constraint2 = getConstraintOfTypeParameter(inference.typeParameter);
|
|
73781
|
+
if (constraint2) {
|
|
73782
|
+
const instantiatedConstraint = instantiateType(constraint2, context.nonFixingMapper);
|
|
73783
|
+
if (instantiatedConstraint.flags & 1048576 /* Union */ && !context.compareTypes(aggregateInference, getTypeWithThisArgument(instantiatedConstraint, aggregateInference))) {
|
|
73784
|
+
const discriminantProps = findDiscriminantProperties(getPropertiesOfType(aggregateInference), instantiatedConstraint);
|
|
73785
|
+
if (discriminantProps) {
|
|
73786
|
+
let match;
|
|
73787
|
+
findDiscriminant:
|
|
73788
|
+
for (const p of discriminantProps) {
|
|
73789
|
+
const candidatePropType = getTypeOfPropertyOfType(aggregateInference, p.escapedName);
|
|
73790
|
+
for (const type of instantiatedConstraint.types) {
|
|
73791
|
+
const propType = getTypeOfPropertyOfType(type, p.escapedName);
|
|
73792
|
+
if (propType && candidatePropType && checkTypeAssignableTo(
|
|
73793
|
+
candidatePropType,
|
|
73794
|
+
propType,
|
|
73795
|
+
/*errorNode*/
|
|
73796
|
+
void 0
|
|
73797
|
+
)) {
|
|
73798
|
+
if (match && match !== type) {
|
|
73799
|
+
match = void 0;
|
|
73800
|
+
break findDiscriminant;
|
|
73801
|
+
} else {
|
|
73802
|
+
match = type;
|
|
73803
|
+
}
|
|
73804
|
+
}
|
|
73805
|
+
}
|
|
73806
|
+
}
|
|
73807
|
+
if (match) {
|
|
73808
|
+
aggregateInference = getSpreadType(
|
|
73809
|
+
match,
|
|
73810
|
+
aggregateInference,
|
|
73811
|
+
/*symbol*/
|
|
73812
|
+
void 0,
|
|
73813
|
+
/*propegatedFlags*/
|
|
73814
|
+
0,
|
|
73815
|
+
/*readonly*/
|
|
73816
|
+
false
|
|
73817
|
+
);
|
|
73818
|
+
}
|
|
73819
|
+
}
|
|
73820
|
+
}
|
|
73821
|
+
}
|
|
73822
|
+
inferredType = aggregateInference;
|
|
73749
73823
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
73750
73824
|
inferredType = silentNeverType;
|
|
73751
73825
|
} else {
|
|
@@ -120770,7 +120844,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
120770
120844
|
if (options.rootDir) {
|
|
120771
120845
|
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
|
|
120772
120846
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
|
|
120773
|
-
} else if (options.configFilePath) {
|
|
120847
|
+
} else if (options.composite && options.configFilePath) {
|
|
120774
120848
|
commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
|
|
120775
120849
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
|
|
120776
120850
|
} else {
|
|
@@ -120781,13 +120855,6 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
120781
120855
|
}
|
|
120782
120856
|
return commonSourceDirectory;
|
|
120783
120857
|
}
|
|
120784
|
-
function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
|
|
120785
|
-
let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
120786
|
-
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
|
|
120787
|
-
commonSourceDirectory += directorySeparator;
|
|
120788
|
-
}
|
|
120789
|
-
return commonSourceDirectory;
|
|
120790
|
-
}
|
|
120791
120858
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
120792
120859
|
return getCommonSourceDirectory(
|
|
120793
120860
|
options,
|
|
@@ -129277,31 +129344,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129277
129344
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
129278
129345
|
}
|
|
129279
129346
|
}
|
|
129280
|
-
if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
|
|
129281
|
-
getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
|
|
129282
|
-
options.outFile)) {
|
|
129283
|
-
const dir = getCommonSourceDirectory2();
|
|
129284
|
-
const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
|
|
129285
|
-
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
129286
|
-
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
|
|
129287
|
-
createDiagnosticForOption(
|
|
129288
|
-
/*onKey*/
|
|
129289
|
-
true,
|
|
129290
|
-
options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
|
|
129291
|
-
!options.outFile && options.outDir ? "declarationDir" : void 0,
|
|
129292
|
-
chainDiagnosticMessages(
|
|
129293
|
-
chainDiagnosticMessages(
|
|
129294
|
-
/*details*/
|
|
129295
|
-
void 0,
|
|
129296
|
-
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
129297
|
-
),
|
|
129298
|
-
Diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout,
|
|
129299
|
-
getBaseFileName(options.configFilePath),
|
|
129300
|
-
getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
|
|
129301
|
-
)
|
|
129302
|
-
);
|
|
129303
|
-
}
|
|
129304
|
-
}
|
|
129305
129347
|
if (options.checkJs && !getAllowJSCompilerOption(options)) {
|
|
129306
129348
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
|
|
129307
129349
|
}
|
|
@@ -137074,18 +137116,23 @@ function executeCommandLineWorker(sys2, cb, commandLine) {
|
|
|
137074
137116
|
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
137075
137117
|
}
|
|
137076
137118
|
}
|
|
137077
|
-
} else if (commandLine.fileNames.length === 0) {
|
|
137119
|
+
} else if (!commandLine.options.ignoreConfig || commandLine.fileNames.length === 0) {
|
|
137078
137120
|
const searchPath = normalizePath(sys2.getCurrentDirectory());
|
|
137079
137121
|
configFileName = findConfigFile(searchPath, (fileName) => sys2.fileExists(fileName));
|
|
137080
|
-
|
|
137081
|
-
|
|
137082
|
-
|
|
137083
|
-
|
|
137084
|
-
|
|
137085
|
-
|
|
137086
|
-
|
|
137122
|
+
if (commandLine.fileNames.length !== 0) {
|
|
137123
|
+
if (configFileName) {
|
|
137124
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error));
|
|
137125
|
+
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
137126
|
+
}
|
|
137127
|
+
} else if (!configFileName) {
|
|
137128
|
+
if (commandLine.options.showConfig) {
|
|
137129
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, normalizePath(sys2.getCurrentDirectory())));
|
|
137130
|
+
} else {
|
|
137131
|
+
printVersion(sys2);
|
|
137132
|
+
printHelp(sys2, commandLine);
|
|
137133
|
+
}
|
|
137134
|
+
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
137087
137135
|
}
|
|
137088
|
-
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
137089
137136
|
}
|
|
137090
137137
|
const currentDirectory = sys2.getCurrentDirectory();
|
|
137091
137138
|
const commandLineOptions = convertToOptionsWithAbsolutePaths(
|
|
@@ -184045,7 +184092,6 @@ __export(ts_exports2, {
|
|
|
184045
184092
|
getCommonSourceDirectory: () => getCommonSourceDirectory,
|
|
184046
184093
|
getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
|
|
184047
184094
|
getCompilerOptionValue: () => getCompilerOptionValue,
|
|
184048
|
-
getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
|
|
184049
184095
|
getConditions: () => getConditions,
|
|
184050
184096
|
getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
|
|
184051
184097
|
getConstantValue: () => getConstantValue,
|
|
@@ -198808,7 +198854,6 @@ if (typeof console !== "undefined") {
|
|
|
198808
198854
|
getCommonSourceDirectory,
|
|
198809
198855
|
getCommonSourceDirectoryOfConfig,
|
|
198810
198856
|
getCompilerOptionValue,
|
|
198811
|
-
getComputedCommonSourceDirectory,
|
|
198812
198857
|
getConditions,
|
|
198813
198858
|
getConfigFileParsingDiagnostics,
|
|
198814
198859
|
getConstantValue,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "6.0.0-pr-
|
|
5
|
+
"version": "6.0.0-pr-53017-20",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|