@typescript-deploys/pr-build 6.0.0-pr-62151-19 → 6.0.0-pr-62418-21
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 +246 -134
- package/lib/lib.d.ts +0 -2
- package/lib/lib.decorators.d.ts +0 -2
- package/lib/lib.decorators.legacy.d.ts +0 -2
- package/lib/lib.dom.asynciterable.d.ts +2 -25
- package/lib/lib.dom.d.ts +2216 -874
- package/lib/lib.dom.iterable.d.ts +2 -555
- package/lib/lib.es2015.collection.d.ts +0 -2
- package/lib/lib.es2015.core.d.ts +0 -2
- package/lib/lib.es2015.d.ts +0 -2
- package/lib/lib.es2015.generator.d.ts +0 -2
- package/lib/lib.es2015.iterable.d.ts +0 -2
- package/lib/lib.es2015.promise.d.ts +0 -2
- package/lib/lib.es2015.proxy.d.ts +0 -2
- package/lib/lib.es2015.reflect.d.ts +0 -2
- package/lib/lib.es2015.symbol.d.ts +0 -2
- package/lib/lib.es2015.symbol.wellknown.d.ts +0 -2
- package/lib/lib.es2016.array.include.d.ts +0 -2
- package/lib/lib.es2016.d.ts +0 -2
- package/lib/lib.es2016.full.d.ts +0 -2
- package/lib/lib.es2016.intl.d.ts +0 -2
- package/lib/lib.es2017.arraybuffer.d.ts +0 -2
- package/lib/lib.es2017.d.ts +0 -2
- package/lib/lib.es2017.date.d.ts +0 -2
- package/lib/lib.es2017.full.d.ts +0 -2
- package/lib/lib.es2017.intl.d.ts +0 -2
- package/lib/lib.es2017.object.d.ts +0 -2
- package/lib/lib.es2017.sharedmemory.d.ts +0 -2
- package/lib/lib.es2017.string.d.ts +0 -2
- package/lib/lib.es2017.typedarrays.d.ts +0 -2
- package/lib/lib.es2018.asyncgenerator.d.ts +0 -2
- package/lib/lib.es2018.asynciterable.d.ts +0 -2
- package/lib/lib.es2018.d.ts +0 -2
- package/lib/lib.es2018.full.d.ts +0 -2
- package/lib/lib.es2018.intl.d.ts +0 -2
- package/lib/lib.es2018.promise.d.ts +0 -2
- package/lib/lib.es2018.regexp.d.ts +0 -2
- package/lib/lib.es2019.array.d.ts +0 -2
- package/lib/lib.es2019.d.ts +0 -2
- package/lib/lib.es2019.full.d.ts +0 -2
- package/lib/lib.es2019.intl.d.ts +0 -2
- package/lib/lib.es2019.object.d.ts +0 -2
- package/lib/lib.es2019.string.d.ts +0 -2
- package/lib/lib.es2019.symbol.d.ts +0 -2
- package/lib/lib.es2020.bigint.d.ts +0 -2
- package/lib/lib.es2020.d.ts +0 -2
- package/lib/lib.es2020.date.d.ts +0 -2
- package/lib/lib.es2020.full.d.ts +0 -2
- package/lib/lib.es2020.intl.d.ts +0 -2
- package/lib/lib.es2020.number.d.ts +0 -2
- package/lib/lib.es2020.promise.d.ts +0 -2
- package/lib/lib.es2020.sharedmemory.d.ts +0 -2
- package/lib/lib.es2020.string.d.ts +0 -2
- package/lib/lib.es2020.symbol.wellknown.d.ts +0 -2
- package/lib/lib.es2021.d.ts +0 -2
- package/lib/lib.es2021.full.d.ts +0 -2
- package/lib/lib.es2021.intl.d.ts +0 -2
- package/lib/lib.es2021.promise.d.ts +0 -2
- package/lib/lib.es2021.string.d.ts +0 -2
- package/lib/lib.es2021.weakref.d.ts +0 -2
- package/lib/lib.es2022.array.d.ts +0 -2
- package/lib/lib.es2022.d.ts +0 -2
- package/lib/lib.es2022.error.d.ts +0 -2
- package/lib/lib.es2022.full.d.ts +0 -2
- package/lib/lib.es2022.intl.d.ts +0 -2
- package/lib/lib.es2022.object.d.ts +0 -2
- package/lib/lib.es2022.regexp.d.ts +0 -2
- package/lib/lib.es2022.string.d.ts +0 -2
- package/lib/lib.es2023.array.d.ts +0 -2
- package/lib/lib.es2023.collection.d.ts +0 -2
- package/lib/lib.es2023.d.ts +0 -2
- package/lib/lib.es2023.full.d.ts +0 -2
- package/lib/lib.es2023.intl.d.ts +0 -2
- package/lib/lib.es2024.arraybuffer.d.ts +0 -2
- package/lib/lib.es2024.collection.d.ts +0 -2
- package/lib/lib.es2024.d.ts +0 -2
- package/lib/lib.es2024.full.d.ts +0 -2
- package/lib/lib.es2024.object.d.ts +0 -2
- package/lib/lib.es2024.promise.d.ts +0 -2
- package/lib/lib.es2024.regexp.d.ts +0 -2
- package/lib/lib.es2024.sharedmemory.d.ts +0 -2
- package/lib/lib.es2024.string.d.ts +0 -2
- package/lib/lib.es5.d.ts +0 -2
- package/lib/lib.es6.d.ts +0 -2
- package/lib/lib.esnext.array.d.ts +0 -2
- package/lib/lib.esnext.collection.d.ts +0 -2
- package/lib/lib.esnext.d.ts +1 -2
- package/lib/lib.esnext.decorators.d.ts +0 -2
- package/lib/lib.esnext.disposable.d.ts +0 -2
- package/lib/lib.esnext.error.d.ts +0 -2
- package/lib/lib.esnext.float16.d.ts +0 -2
- package/lib/lib.esnext.full.d.ts +0 -2
- package/lib/lib.esnext.intl.d.ts +0 -2
- package/lib/lib.esnext.iterator.d.ts +0 -2
- package/lib/lib.esnext.promise.d.ts +0 -2
- package/lib/lib.esnext.sharedmemory.d.ts +0 -2
- package/lib/lib.esnext.typedarrays.d.ts +90 -0
- package/lib/lib.scripthost.d.ts +0 -2
- package/lib/lib.webworker.asynciterable.d.ts +2 -25
- package/lib/lib.webworker.d.ts +947 -329
- package/lib/lib.webworker.importscripts.d.ts +0 -2
- package/lib/lib.webworker.iterable.d.ts +2 -324
- package/lib/typescript.d.ts +3 -9
- package/lib/typescript.js +294 -171
- package/package.json +2 -3
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.20251003`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -6068,7 +6068,7 @@ var Diagnostics = {
|
|
|
6068
6068
|
A_bigint_literal_cannot_use_exponential_notation: diag(1352, 1 /* Error */, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."),
|
|
6069
6069
|
A_bigint_literal_must_be_an_integer: diag(1353, 1 /* Error */, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."),
|
|
6070
6070
|
readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: diag(1354, 1 /* Error */, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."),
|
|
6071
|
-
|
|
6071
|
+
A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: diag(1355, 1 /* Error */, "A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_o_1355", "A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals."),
|
|
6072
6072
|
Did_you_mean_to_mark_this_function_as_async: diag(1356, 1 /* Error */, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"),
|
|
6073
6073
|
An_enum_member_name_must_be_followed_by_a_or: diag(1357, 1 /* Error */, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."),
|
|
6074
6074
|
Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, 1 /* Error */, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."),
|
|
@@ -6832,6 +6832,7 @@ var Diagnostics = {
|
|
|
6832
6832
|
Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1 /* Error */, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),
|
|
6833
6833
|
Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert: diag(2880, 1 /* Error */, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'."),
|
|
6834
6834
|
This_expression_is_never_nullish: diag(2881, 1 /* Error */, "This_expression_is_never_nullish_2881", "This expression is never nullish."),
|
|
6835
|
+
Cannot_find_module_or_type_declarations_for_side_effect_import_of_0: diag(2882, 1 /* Error */, "Cannot_find_module_or_type_declarations_for_side_effect_import_of_0_2882", "Cannot find module or type declarations for side-effect import of '{0}'."),
|
|
6835
6836
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6836
6837
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6837
6838
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -6946,6 +6947,7 @@ var Diagnostics = {
|
|
|
6946
6947
|
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."),
|
|
6947
6948
|
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."),
|
|
6948
6949
|
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}'."),
|
|
6950
|
+
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."),
|
|
6949
6951
|
Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
|
|
6950
6952
|
Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
|
|
6951
6953
|
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}."),
|
|
@@ -7009,6 +7011,7 @@ var Diagnostics = {
|
|
|
7009
7011
|
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."),
|
|
7010
7012
|
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}'."),
|
|
7011
7013
|
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}'."),
|
|
7014
|
+
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."),
|
|
7012
7015
|
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."),
|
|
7013
7016
|
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."),
|
|
7014
7017
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -13476,6 +13479,12 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
|
|
|
13476
13479
|
"toSorted",
|
|
13477
13480
|
"toSpliced",
|
|
13478
13481
|
"with"
|
|
13482
|
+
],
|
|
13483
|
+
esnext: [
|
|
13484
|
+
"toBase64",
|
|
13485
|
+
"setFromBase64",
|
|
13486
|
+
"toHex",
|
|
13487
|
+
"setFromHex"
|
|
13479
13488
|
]
|
|
13480
13489
|
})),
|
|
13481
13490
|
Uint8ClampedArray: new Map(Object.entries({
|
|
@@ -13604,6 +13613,12 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
|
|
|
13604
13613
|
es2022: [
|
|
13605
13614
|
"cause"
|
|
13606
13615
|
]
|
|
13616
|
+
})),
|
|
13617
|
+
Uint8ArrayConstructor: new Map(Object.entries({
|
|
13618
|
+
esnext: [
|
|
13619
|
+
"fromBase64",
|
|
13620
|
+
"fromHex"
|
|
13621
|
+
]
|
|
13607
13622
|
}))
|
|
13608
13623
|
}))
|
|
13609
13624
|
);
|
|
@@ -15491,6 +15506,9 @@ function getTypeParameterFromJsDoc(node) {
|
|
|
15491
15506
|
const { typeParameters } = node.parent.parent.parent;
|
|
15492
15507
|
return typeParameters && find(typeParameters, (p) => p.name.escapedText === name);
|
|
15493
15508
|
}
|
|
15509
|
+
function hasTypeArguments(node) {
|
|
15510
|
+
return !!node.typeArguments;
|
|
15511
|
+
}
|
|
15494
15512
|
function getAssignmentTarget(node) {
|
|
15495
15513
|
let parent = node.parent;
|
|
15496
15514
|
while (true) {
|
|
@@ -16583,7 +16601,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
|
|
|
16583
16601
|
if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
|
|
16584
16602
|
if (options.outFile) return true;
|
|
16585
16603
|
if (!options.outDir) return false;
|
|
16586
|
-
if (options.rootDir || options.
|
|
16604
|
+
if (options.rootDir || options.configFilePath) {
|
|
16587
16605
|
const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
|
|
16588
16606
|
const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
|
|
16589
16607
|
if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
|
|
@@ -18853,7 +18871,7 @@ function skipTypeCheckingIgnoringNoCheck(sourceFile, options, host) {
|
|
|
18853
18871
|
);
|
|
18854
18872
|
}
|
|
18855
18873
|
function skipTypeCheckingWorker(sourceFile, options, host, ignoreNoCheck) {
|
|
18856
|
-
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile
|
|
18874
|
+
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && host.isSourceFileDefaultLibrary(sourceFile) || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
|
|
18857
18875
|
}
|
|
18858
18876
|
function canIncludeBindAndCheckDiagnostics(sourceFile, options) {
|
|
18859
18877
|
if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
|
|
@@ -24258,8 +24276,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
24258
24276
|
node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
|
|
24259
24277
|
return node;
|
|
24260
24278
|
}
|
|
24261
|
-
function updateSourceFile(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives,
|
|
24262
|
-
return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.
|
|
24279
|
+
function updateSourceFile(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, _hasNoDefaultLib = false, libReferenceDirectives = node.libReferenceDirectives) {
|
|
24280
|
+
return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(
|
|
24281
|
+
node,
|
|
24282
|
+
statements,
|
|
24283
|
+
isDeclarationFile,
|
|
24284
|
+
referencedFiles,
|
|
24285
|
+
typeReferenceDirectives,
|
|
24286
|
+
/*hasNoDefaultLib*/
|
|
24287
|
+
false,
|
|
24288
|
+
libReferenceDirectives
|
|
24289
|
+
), node) : node;
|
|
24263
24290
|
}
|
|
24264
24291
|
function createBundle(sourceFiles) {
|
|
24265
24292
|
const node = createBaseNode(309 /* Bundle */);
|
|
@@ -24267,7 +24294,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
24267
24294
|
node.syntheticFileReferences = void 0;
|
|
24268
24295
|
node.syntheticTypeReferences = void 0;
|
|
24269
24296
|
node.syntheticLibReferences = void 0;
|
|
24270
|
-
node.hasNoDefaultLib = void 0;
|
|
24271
24297
|
return node;
|
|
24272
24298
|
}
|
|
24273
24299
|
function updateBundle(node, sourceFiles) {
|
|
@@ -36170,7 +36196,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
|
|
|
36170
36196
|
context.typeReferenceDirectives = [];
|
|
36171
36197
|
context.libReferenceDirectives = [];
|
|
36172
36198
|
context.amdDependencies = [];
|
|
36173
|
-
context.hasNoDefaultLib = false;
|
|
36174
36199
|
context.pragmas.forEach((entryOrList, key) => {
|
|
36175
36200
|
switch (key) {
|
|
36176
36201
|
case "reference": {
|
|
@@ -36181,7 +36206,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
|
|
|
36181
36206
|
const { types, lib, path, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
|
|
36182
36207
|
const preserve = _preserve === "true" ? true : void 0;
|
|
36183
36208
|
if (arg.arguments["no-default-lib"] === "true") {
|
|
36184
|
-
context.hasNoDefaultLib = true;
|
|
36185
36209
|
} else if (types) {
|
|
36186
36210
|
const parsed = parseResolutionMode(res, types.pos, types.end, reportDiagnostic);
|
|
36187
36211
|
typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
|
|
@@ -36457,6 +36481,7 @@ var libEntries = [
|
|
|
36457
36481
|
["esnext.iterator", "lib.esnext.iterator.d.ts"],
|
|
36458
36482
|
["esnext.promise", "lib.esnext.promise.d.ts"],
|
|
36459
36483
|
["esnext.float16", "lib.esnext.float16.d.ts"],
|
|
36484
|
+
["esnext.typedarrays", "lib.esnext.typedarrays.d.ts"],
|
|
36460
36485
|
["esnext.error", "lib.esnext.error.d.ts"],
|
|
36461
36486
|
["esnext.sharedmemory", "lib.esnext.sharedmemory.d.ts"],
|
|
36462
36487
|
["decorators", "lib.decorators.d.ts"],
|
|
@@ -37054,7 +37079,7 @@ var commandOptionsWithoutBuild = [
|
|
|
37054
37079
|
affectsProgramStructure: true,
|
|
37055
37080
|
category: Diagnostics.Language_and_Environment,
|
|
37056
37081
|
description: Diagnostics.Enable_lib_replacement,
|
|
37057
|
-
defaultValueDescription:
|
|
37082
|
+
defaultValueDescription: false
|
|
37058
37083
|
},
|
|
37059
37084
|
// Strict Type Checks
|
|
37060
37085
|
{
|
|
@@ -37421,7 +37446,7 @@ var commandOptionsWithoutBuild = [
|
|
|
37421
37446
|
affectsBuildInfo: true,
|
|
37422
37447
|
category: Diagnostics.Modules,
|
|
37423
37448
|
description: Diagnostics.Check_side_effect_imports,
|
|
37424
|
-
defaultValueDescription:
|
|
37449
|
+
defaultValueDescription: true
|
|
37425
37450
|
},
|
|
37426
37451
|
// Source Maps
|
|
37427
37452
|
{
|
|
@@ -41657,7 +41682,9 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
41657
41682
|
const subTarget = target[condition];
|
|
41658
41683
|
const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key);
|
|
41659
41684
|
if (result) {
|
|
41660
|
-
|
|
41685
|
+
if (result.value) {
|
|
41686
|
+
traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
|
|
41687
|
+
}
|
|
41661
41688
|
traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);
|
|
41662
41689
|
return result;
|
|
41663
41690
|
} else {
|
|
@@ -41690,10 +41717,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
41690
41717
|
if (state.traceEnabled) {
|
|
41691
41718
|
trace(state.host, Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName);
|
|
41692
41719
|
}
|
|
41693
|
-
return
|
|
41694
|
-
/*value*/
|
|
41695
|
-
void 0
|
|
41696
|
-
);
|
|
41720
|
+
return { value: void 0 };
|
|
41697
41721
|
}
|
|
41698
41722
|
if (state.traceEnabled) {
|
|
41699
41723
|
trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
@@ -41715,7 +41739,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
41715
41739
|
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)) {
|
|
41716
41740
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
41717
41741
|
const commonSourceDirGuesses = [];
|
|
41718
|
-
if (state.compilerOptions.rootDir || state.compilerOptions.
|
|
41742
|
+
if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
|
|
41719
41743
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
41720
41744
|
commonSourceDirGuesses.push(commonDir);
|
|
41721
41745
|
} else if (state.requestContainingDirectory) {
|
|
@@ -46435,7 +46459,7 @@ function createTypeChecker(host) {
|
|
|
46435
46459
|
var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
|
|
46436
46460
|
var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
|
|
46437
46461
|
var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
|
|
46438
|
-
var noUncheckedSideEffectImports =
|
|
46462
|
+
var noUncheckedSideEffectImports = compilerOptions.noUncheckedSideEffectImports !== false;
|
|
46439
46463
|
var checkBinaryExpression = createCheckBinaryExpression();
|
|
46440
46464
|
var emitResolver = createResolver();
|
|
46441
46465
|
var nodeBuilder = createNodeBuilder();
|
|
@@ -49411,9 +49435,9 @@ function createTypeChecker(host) {
|
|
|
49411
49435
|
}
|
|
49412
49436
|
}
|
|
49413
49437
|
}
|
|
49414
|
-
function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) {
|
|
49438
|
+
function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors, errorMessage) {
|
|
49415
49439
|
const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
|
|
49416
|
-
|
|
49440
|
+
errorMessage ?? (errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations);
|
|
49417
49441
|
return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage, ignoreErrors);
|
|
49418
49442
|
}
|
|
49419
49443
|
function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, ignoreErrors = false, isForAugmentation = false) {
|
|
@@ -64079,14 +64103,14 @@ function createTypeChecker(host) {
|
|
|
64079
64103
|
let issuedElaboration = false;
|
|
64080
64104
|
if (!targetProp) {
|
|
64081
64105
|
const indexInfo = getApplicableIndexInfo(target, nameType);
|
|
64082
|
-
if (indexInfo && indexInfo.declaration && !getSourceFileOfNode(indexInfo.declaration)
|
|
64106
|
+
if (indexInfo && indexInfo.declaration && !host.isSourceFileDefaultLibrary(getSourceFileOfNode(indexInfo.declaration))) {
|
|
64083
64107
|
issuedElaboration = true;
|
|
64084
64108
|
addRelatedInfo(reportedDiag, createDiagnosticForNode(indexInfo.declaration, Diagnostics.The_expected_type_comes_from_this_index_signature));
|
|
64085
64109
|
}
|
|
64086
64110
|
}
|
|
64087
64111
|
if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) {
|
|
64088
64112
|
const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0];
|
|
64089
|
-
if (!getSourceFileOfNode(targetNode)
|
|
64113
|
+
if (!host.isSourceFileDefaultLibrary(getSourceFileOfNode(targetNode))) {
|
|
64090
64114
|
addRelatedInfo(
|
|
64091
64115
|
reportedDiag,
|
|
64092
64116
|
createDiagnosticForNode(
|
|
@@ -66780,13 +66804,10 @@ function createTypeChecker(host) {
|
|
|
66780
66804
|
if (isObjectLiteralType(target2)) {
|
|
66781
66805
|
for (const sourceProp of excludeProperties(getPropertiesOfType(source2), excludedProperties)) {
|
|
66782
66806
|
if (!getPropertyOfObjectType(target2, sourceProp.escapedName)) {
|
|
66783
|
-
|
|
66784
|
-
|
|
66785
|
-
if (reportErrors2) {
|
|
66786
|
-
reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target2));
|
|
66787
|
-
}
|
|
66788
|
-
return 0 /* False */;
|
|
66807
|
+
if (reportErrors2) {
|
|
66808
|
+
reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target2));
|
|
66789
66809
|
}
|
|
66810
|
+
return 0 /* False */;
|
|
66790
66811
|
}
|
|
66791
66812
|
}
|
|
66792
66813
|
}
|
|
@@ -67450,7 +67471,7 @@ function createTypeChecker(host) {
|
|
|
67450
67471
|
if (isReadonlySymbol(sourceProp) !== isReadonlySymbol(targetProp)) {
|
|
67451
67472
|
return 0 /* False */;
|
|
67452
67473
|
}
|
|
67453
|
-
return compareTypes(
|
|
67474
|
+
return compareTypes(getNonMissingTypeOfSymbol(sourceProp), getNonMissingTypeOfSymbol(targetProp));
|
|
67454
67475
|
}
|
|
67455
67476
|
function isMatchingSignature(source, target, partialMatch) {
|
|
67456
67477
|
const sourceParameterCount = getParameterCount(source);
|
|
@@ -67739,13 +67760,6 @@ function createTypeChecker(host) {
|
|
|
67739
67760
|
return mapType(type, getDefinitelyFalsyPartOfType);
|
|
67740
67761
|
}
|
|
67741
67762
|
function getDefinitelyFalsyPartOfType(type) {
|
|
67742
|
-
if (type.flags & 262144 /* TypeParameter */) {
|
|
67743
|
-
const constraint = getBaseConstraintOfType(type);
|
|
67744
|
-
if (!constraint || constraint === type) {
|
|
67745
|
-
return neverType;
|
|
67746
|
-
}
|
|
67747
|
-
return getDefinitelyFalsyPartOfType(constraint);
|
|
67748
|
-
}
|
|
67749
67763
|
return type.flags & 4 /* String */ ? emptyStringType : type.flags & 8 /* Number */ ? zeroType : type.flags & 64 /* BigInt */ ? zeroBigIntType : type === regularFalseType || type === falseType || type.flags & (16384 /* Void */ | 32768 /* Undefined */ | 65536 /* Null */ | 3 /* AnyOrUnknown */) || type.flags & 128 /* StringLiteral */ && type.value === "" || type.flags & 256 /* NumberLiteral */ && type.value === 0 || type.flags & 2048 /* BigIntLiteral */ && isZeroBigInt(type) ? type : neverType;
|
|
67750
67764
|
}
|
|
67751
67765
|
function getNullableType(type, flags) {
|
|
@@ -69471,23 +69485,21 @@ function createTypeChecker(host) {
|
|
|
69471
69485
|
for (const type of types) {
|
|
69472
69486
|
if (type.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) {
|
|
69473
69487
|
const discriminant = getTypeOfPropertyOfType(type, name);
|
|
69474
|
-
if (discriminant) {
|
|
69475
|
-
|
|
69476
|
-
return void 0;
|
|
69477
|
-
}
|
|
69478
|
-
let duplicate = false;
|
|
69479
|
-
forEachType(discriminant, (t) => {
|
|
69480
|
-
const id = getTypeId(getRegularTypeOfLiteralType(t));
|
|
69481
|
-
const existing = map2.get(id);
|
|
69482
|
-
if (!existing) {
|
|
69483
|
-
map2.set(id, type);
|
|
69484
|
-
} else if (existing !== unknownType) {
|
|
69485
|
-
map2.set(id, unknownType);
|
|
69486
|
-
duplicate = true;
|
|
69487
|
-
}
|
|
69488
|
-
});
|
|
69489
|
-
if (!duplicate) count++;
|
|
69488
|
+
if (!discriminant || !isLiteralType(discriminant)) {
|
|
69489
|
+
return void 0;
|
|
69490
69490
|
}
|
|
69491
|
+
let duplicate = false;
|
|
69492
|
+
forEachType(discriminant, (t) => {
|
|
69493
|
+
const id = getTypeId(getRegularTypeOfLiteralType(t));
|
|
69494
|
+
const existing = map2.get(id);
|
|
69495
|
+
if (!existing) {
|
|
69496
|
+
map2.set(id, type);
|
|
69497
|
+
} else if (existing !== unknownType) {
|
|
69498
|
+
map2.set(id, unknownType);
|
|
69499
|
+
duplicate = true;
|
|
69500
|
+
}
|
|
69501
|
+
});
|
|
69502
|
+
if (!duplicate) count++;
|
|
69491
69503
|
}
|
|
69492
69504
|
}
|
|
69493
69505
|
return count >= 10 && count * 2 >= types.length ? map2 : void 0;
|
|
@@ -77786,7 +77798,7 @@ function createTypeChecker(host) {
|
|
|
77786
77798
|
const exprType = checkExpression(expression, checkMode);
|
|
77787
77799
|
if (isConstTypeReference(type)) {
|
|
77788
77800
|
if (!isValidConstAssertionArgument(expression)) {
|
|
77789
|
-
error(expression, Diagnostics.
|
|
77801
|
+
error(expression, Diagnostics.A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals);
|
|
77790
77802
|
}
|
|
77791
77803
|
return getRegularTypeOfLiteralType(exprType);
|
|
77792
77804
|
}
|
|
@@ -81604,6 +81616,47 @@ function createTypeChecker(host) {
|
|
|
81604
81616
|
}
|
|
81605
81617
|
return void 0;
|
|
81606
81618
|
}
|
|
81619
|
+
function getUninstantiatedSignatures(node) {
|
|
81620
|
+
switch (node.kind) {
|
|
81621
|
+
case 214 /* CallExpression */:
|
|
81622
|
+
case 171 /* Decorator */:
|
|
81623
|
+
return getSignaturesOfType(
|
|
81624
|
+
getTypeOfExpression(node.expression),
|
|
81625
|
+
0 /* Call */
|
|
81626
|
+
);
|
|
81627
|
+
case 215 /* NewExpression */:
|
|
81628
|
+
return getSignaturesOfType(
|
|
81629
|
+
getTypeOfExpression(node.expression),
|
|
81630
|
+
1 /* Construct */
|
|
81631
|
+
);
|
|
81632
|
+
case 286 /* JsxSelfClosingElement */:
|
|
81633
|
+
case 287 /* JsxOpeningElement */:
|
|
81634
|
+
if (isJsxIntrinsicTagName(node.tagName)) return [];
|
|
81635
|
+
return getSignaturesOfType(
|
|
81636
|
+
getTypeOfExpression(node.tagName),
|
|
81637
|
+
0 /* Call */
|
|
81638
|
+
);
|
|
81639
|
+
case 216 /* TaggedTemplateExpression */:
|
|
81640
|
+
return getSignaturesOfType(
|
|
81641
|
+
getTypeOfExpression(node.tag),
|
|
81642
|
+
0 /* Call */
|
|
81643
|
+
);
|
|
81644
|
+
case 227 /* BinaryExpression */:
|
|
81645
|
+
case 290 /* JsxOpeningFragment */:
|
|
81646
|
+
return [];
|
|
81647
|
+
}
|
|
81648
|
+
}
|
|
81649
|
+
function getTypeParameterConstraintForPositionAcrossSignatures(signatures, position) {
|
|
81650
|
+
const relevantTypeParameterConstraints = flatMap(signatures, (signature) => {
|
|
81651
|
+
var _a;
|
|
81652
|
+
const relevantTypeParameter = (_a = signature.typeParameters) == null ? void 0 : _a[position];
|
|
81653
|
+
if (relevantTypeParameter === void 0) return [];
|
|
81654
|
+
const relevantConstraint = getConstraintOfTypeParameter(relevantTypeParameter);
|
|
81655
|
+
if (relevantConstraint === void 0) return [];
|
|
81656
|
+
return [relevantConstraint];
|
|
81657
|
+
});
|
|
81658
|
+
return getUnionType(relevantTypeParameterConstraints);
|
|
81659
|
+
}
|
|
81607
81660
|
function checkTypeReferenceNode(node) {
|
|
81608
81661
|
checkGrammarTypeArguments(node, node.typeArguments);
|
|
81609
81662
|
if (node.kind === 184 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
|
|
@@ -81639,12 +81692,48 @@ function createTypeChecker(host) {
|
|
|
81639
81692
|
}
|
|
81640
81693
|
}
|
|
81641
81694
|
function getTypeArgumentConstraint(node) {
|
|
81642
|
-
|
|
81643
|
-
if (
|
|
81644
|
-
|
|
81645
|
-
|
|
81646
|
-
|
|
81647
|
-
|
|
81695
|
+
let typeArgumentPosition;
|
|
81696
|
+
if (hasTypeArguments(node.parent) && Array.isArray(node.parent.typeArguments)) {
|
|
81697
|
+
typeArgumentPosition = node.parent.typeArguments.indexOf(node);
|
|
81698
|
+
}
|
|
81699
|
+
if (typeArgumentPosition !== void 0) {
|
|
81700
|
+
if (isCallLikeExpression(node.parent)) {
|
|
81701
|
+
return getTypeParameterConstraintForPositionAcrossSignatures(
|
|
81702
|
+
getUninstantiatedSignatures(node.parent),
|
|
81703
|
+
typeArgumentPosition
|
|
81704
|
+
);
|
|
81705
|
+
}
|
|
81706
|
+
if (isDecorator(node.parent.parent)) {
|
|
81707
|
+
return getTypeParameterConstraintForPositionAcrossSignatures(
|
|
81708
|
+
getUninstantiatedSignatures(node.parent.parent),
|
|
81709
|
+
typeArgumentPosition
|
|
81710
|
+
);
|
|
81711
|
+
}
|
|
81712
|
+
if (isExpressionWithTypeArguments(node.parent) && isExpressionStatement(node.parent.parent)) {
|
|
81713
|
+
const uninstantiatedType = checkExpression(node.parent.expression);
|
|
81714
|
+
const callConstraint = getTypeParameterConstraintForPositionAcrossSignatures(
|
|
81715
|
+
getSignaturesOfType(uninstantiatedType, 0 /* Call */),
|
|
81716
|
+
typeArgumentPosition
|
|
81717
|
+
);
|
|
81718
|
+
const constructConstraint = getTypeParameterConstraintForPositionAcrossSignatures(
|
|
81719
|
+
getSignaturesOfType(uninstantiatedType, 1 /* Construct */),
|
|
81720
|
+
typeArgumentPosition
|
|
81721
|
+
);
|
|
81722
|
+
if (constructConstraint.flags & 131072 /* Never */) return callConstraint;
|
|
81723
|
+
if (callConstraint.flags & 131072 /* Never */) return constructConstraint;
|
|
81724
|
+
return getIntersectionType([callConstraint, constructConstraint]);
|
|
81725
|
+
}
|
|
81726
|
+
if (isTypeReferenceType(node.parent)) {
|
|
81727
|
+
const typeParameters = getTypeParametersForTypeReferenceOrImport(node.parent);
|
|
81728
|
+
if (!typeParameters) return void 0;
|
|
81729
|
+
const relevantTypeParameter = typeParameters[typeArgumentPosition];
|
|
81730
|
+
const constraint = getConstraintOfTypeParameter(relevantTypeParameter);
|
|
81731
|
+
return constraint && instantiateType(
|
|
81732
|
+
constraint,
|
|
81733
|
+
createTypeMapper(typeParameters, getEffectiveTypeArguments(node.parent, typeParameters))
|
|
81734
|
+
);
|
|
81735
|
+
}
|
|
81736
|
+
}
|
|
81648
81737
|
}
|
|
81649
81738
|
function checkTypeQuery(node) {
|
|
81650
81739
|
getTypeFromTypeQueryNode(node);
|
|
@@ -86058,7 +86147,13 @@ function createTypeChecker(host) {
|
|
|
86058
86147
|
error(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind]);
|
|
86059
86148
|
}
|
|
86060
86149
|
} else if (noUncheckedSideEffectImports && !importClause) {
|
|
86061
|
-
void resolveExternalModuleName(
|
|
86150
|
+
void resolveExternalModuleName(
|
|
86151
|
+
node,
|
|
86152
|
+
node.moduleSpecifier,
|
|
86153
|
+
/*ignoreErrors*/
|
|
86154
|
+
void 0,
|
|
86155
|
+
Diagnostics.Cannot_find_module_or_type_declarations_for_side_effect_import_of_0
|
|
86156
|
+
);
|
|
86062
86157
|
}
|
|
86063
86158
|
}
|
|
86064
86159
|
checkImportAttributes(node);
|
|
@@ -113911,11 +114006,9 @@ function transformDeclarations(context) {
|
|
|
113911
114006
|
rawReferencedFiles = [];
|
|
113912
114007
|
rawTypeReferenceDirectives = [];
|
|
113913
114008
|
rawLibReferenceDirectives = [];
|
|
113914
|
-
let hasNoDefaultLib = false;
|
|
113915
114009
|
const bundle = factory2.createBundle(
|
|
113916
114010
|
map(node.sourceFiles, (sourceFile) => {
|
|
113917
114011
|
if (sourceFile.isDeclarationFile) return void 0;
|
|
113918
|
-
hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
|
|
113919
114012
|
currentSourceFile = sourceFile;
|
|
113920
114013
|
enclosingDeclaration = sourceFile;
|
|
113921
114014
|
lateMarkedStatements = void 0;
|
|
@@ -113976,7 +114069,6 @@ function transformDeclarations(context) {
|
|
|
113976
114069
|
bundle.syntheticFileReferences = getReferencedFiles(outputFilePath2);
|
|
113977
114070
|
bundle.syntheticTypeReferences = getTypeReferences();
|
|
113978
114071
|
bundle.syntheticLibReferences = getLibReferences();
|
|
113979
|
-
bundle.hasNoDefaultLib = hasNoDefaultLib;
|
|
113980
114072
|
return bundle;
|
|
113981
114073
|
}
|
|
113982
114074
|
needsDeclare = true;
|
|
@@ -114017,7 +114109,8 @@ function transformDeclarations(context) {
|
|
|
114017
114109
|
true,
|
|
114018
114110
|
getReferencedFiles(outputFilePath),
|
|
114019
114111
|
getTypeReferences(),
|
|
114020
|
-
|
|
114112
|
+
/*hasNoDefaultLib*/
|
|
114113
|
+
false,
|
|
114021
114114
|
getLibReferences()
|
|
114022
114115
|
);
|
|
114023
114116
|
function collectFileReferences(sourceFile) {
|
|
@@ -115927,7 +116020,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
115927
116020
|
if (options.rootDir) {
|
|
115928
116021
|
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
|
|
115929
116022
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
|
|
115930
|
-
} else if (options.
|
|
116023
|
+
} else if (options.configFilePath) {
|
|
115931
116024
|
commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
|
|
115932
116025
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
|
|
115933
116026
|
} else {
|
|
@@ -115938,6 +116031,13 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
115938
116031
|
}
|
|
115939
116032
|
return commonSourceDirectory;
|
|
115940
116033
|
}
|
|
116034
|
+
function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
|
|
116035
|
+
let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
116036
|
+
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
|
|
116037
|
+
commonSourceDirectory += directorySeparator;
|
|
116038
|
+
}
|
|
116039
|
+
return commonSourceDirectory;
|
|
116040
|
+
}
|
|
115941
116041
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
115942
116042
|
return getCommonSourceDirectory(
|
|
115943
116043
|
options,
|
|
@@ -119176,16 +119276,12 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
119176
119276
|
emitSourceFileWorker(node);
|
|
119177
119277
|
}
|
|
119178
119278
|
function emitSyntheticTripleSlashReferencesIfNeeded(node) {
|
|
119179
|
-
emitTripleSlashDirectives(
|
|
119279
|
+
emitTripleSlashDirectives(node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
|
|
119180
119280
|
}
|
|
119181
119281
|
function emitTripleSlashDirectivesIfNeeded(node) {
|
|
119182
|
-
if (node.isDeclarationFile) emitTripleSlashDirectives(node.
|
|
119282
|
+
if (node.isDeclarationFile) emitTripleSlashDirectives(node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
|
|
119183
119283
|
}
|
|
119184
|
-
function emitTripleSlashDirectives(
|
|
119185
|
-
if (hasNoDefaultLib) {
|
|
119186
|
-
writeComment(`/// <reference no-default-lib="true"/>`);
|
|
119187
|
-
writeLine();
|
|
119188
|
-
}
|
|
119284
|
+
function emitTripleSlashDirectives(files, types, libs2) {
|
|
119189
119285
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
119190
119286
|
writeComment(`/// <amd-module name="${currentSourceFile.moduleName}" />`);
|
|
119191
119287
|
writeLine();
|
|
@@ -122132,7 +122228,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
122132
122228
|
mark("beforeProgram");
|
|
122133
122229
|
const host = createProgramOptionsHost || createCompilerHost(options);
|
|
122134
122230
|
const configParsingHost = parseConfigHostFromCompilerHostLike(host);
|
|
122135
|
-
let skipDefaultLib = options.noLib;
|
|
122136
122231
|
const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
|
|
122137
122232
|
const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
|
|
122138
122233
|
let skipVerifyCompilerOptions = false;
|
|
@@ -122220,6 +122315,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
122220
122315
|
let redirectTargetsMap = createMultiMap();
|
|
122221
122316
|
let usesUriStyleNodeCoreModules;
|
|
122222
122317
|
const filesByName = /* @__PURE__ */ new Map();
|
|
122318
|
+
const libFiles = /* @__PURE__ */ new Set();
|
|
122223
122319
|
let missingFileNames = /* @__PURE__ */ new Map();
|
|
122224
122320
|
const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;
|
|
122225
122321
|
let resolvedProjectReferences;
|
|
@@ -122281,8 +122377,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
122281
122377
|
name,
|
|
122282
122378
|
/*isDefaultLib*/
|
|
122283
122379
|
false,
|
|
122284
|
-
/*ignoreNoDefaultLib*/
|
|
122285
|
-
false,
|
|
122286
122380
|
{ kind: 0 /* RootFile */, index }
|
|
122287
122381
|
));
|
|
122288
122382
|
(_j = tracing) == null ? void 0 : _j.pop();
|
|
@@ -122314,15 +122408,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
122314
122408
|
}
|
|
122315
122409
|
(_n = tracing) == null ? void 0 : _n.pop();
|
|
122316
122410
|
}
|
|
122317
|
-
if (rootNames.length && !
|
|
122411
|
+
if (rootNames.length && !options.noLib) {
|
|
122318
122412
|
const defaultLibraryFileName = getDefaultLibraryFileName();
|
|
122319
122413
|
if (!options.lib && defaultLibraryFileName) {
|
|
122414
|
+
libFiles.add(toPath3(defaultLibraryFileName));
|
|
122320
122415
|
processRootFile(
|
|
122321
122416
|
defaultLibraryFileName,
|
|
122322
122417
|
/*isDefaultLib*/
|
|
122323
122418
|
true,
|
|
122324
|
-
/*ignoreNoDefaultLib*/
|
|
122325
|
-
false,
|
|
122326
122419
|
{ kind: 6 /* LibFile */ }
|
|
122327
122420
|
);
|
|
122328
122421
|
} else {
|
|
@@ -122331,8 +122424,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
122331
122424
|
pathForLibFile(libFileName),
|
|
122332
122425
|
/*isDefaultLib*/
|
|
122333
122426
|
true,
|
|
122334
|
-
/*ignoreNoDefaultLib*/
|
|
122335
|
-
false,
|
|
122336
122427
|
{ kind: 6 /* LibFile */, index }
|
|
122337
122428
|
);
|
|
122338
122429
|
});
|
|
@@ -122843,8 +122934,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
122843
122934
|
structureIsReused = 1 /* SafeModules */;
|
|
122844
122935
|
} else if (!arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) {
|
|
122845
122936
|
structureIsReused = 1 /* SafeModules */;
|
|
122846
|
-
} else if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
|
|
122847
|
-
structureIsReused = 1 /* SafeModules */;
|
|
122848
122937
|
} else if (!arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
|
|
122849
122938
|
structureIsReused = 1 /* SafeModules */;
|
|
122850
122939
|
} else {
|
|
@@ -123026,24 +123115,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123026
123115
|
return !!sourceFilesFoundSearchingNodeModules.get(file.path);
|
|
123027
123116
|
}
|
|
123028
123117
|
function isSourceFileDefaultLibrary(file) {
|
|
123029
|
-
|
|
123030
|
-
return false;
|
|
123031
|
-
}
|
|
123032
|
-
if (file.hasNoDefaultLib) {
|
|
123033
|
-
return true;
|
|
123034
|
-
}
|
|
123035
|
-
if (options.noLib) {
|
|
123036
|
-
return false;
|
|
123037
|
-
}
|
|
123038
|
-
const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;
|
|
123039
|
-
if (!options.lib) {
|
|
123040
|
-
return equalityComparer(file.fileName, getDefaultLibraryFileName());
|
|
123041
|
-
} else {
|
|
123042
|
-
return some(options.lib, (libFileName) => {
|
|
123043
|
-
const resolvedLib = resolvedLibReferences.get(libFileName);
|
|
123044
|
-
return !!resolvedLib && equalityComparer(file.fileName, resolvedLib.actual);
|
|
123045
|
-
});
|
|
123046
|
-
}
|
|
123118
|
+
return libFiles.has(file.path);
|
|
123047
123119
|
}
|
|
123048
123120
|
function getTypeChecker() {
|
|
123049
123121
|
return typeChecker || (typeChecker = createTypeChecker(program));
|
|
@@ -123524,11 +123596,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123524
123596
|
function getConfigFileParsingDiagnostics2() {
|
|
123525
123597
|
return configFileParsingDiagnostics || emptyArray;
|
|
123526
123598
|
}
|
|
123527
|
-
function processRootFile(fileName, isDefaultLib,
|
|
123599
|
+
function processRootFile(fileName, isDefaultLib, reason) {
|
|
123528
123600
|
processSourceFile(
|
|
123529
123601
|
normalizePath(fileName),
|
|
123530
123602
|
isDefaultLib,
|
|
123531
|
-
ignoreNoDefaultLib,
|
|
123532
123603
|
/*packageId*/
|
|
123533
123604
|
void 0,
|
|
123534
123605
|
reason
|
|
@@ -123693,10 +123764,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123693
123764
|
return sourceFileWithAddedExtension;
|
|
123694
123765
|
}
|
|
123695
123766
|
}
|
|
123696
|
-
function processSourceFile(fileName, isDefaultLib,
|
|
123767
|
+
function processSourceFile(fileName, isDefaultLib, packageId, reason) {
|
|
123697
123768
|
getSourceFileFromReferenceWorker(
|
|
123698
123769
|
fileName,
|
|
123699
|
-
(fileName2) => findSourceFile(fileName2, isDefaultLib,
|
|
123770
|
+
(fileName2) => findSourceFile(fileName2, isDefaultLib, reason, packageId),
|
|
123700
123771
|
// TODO: GH#18217
|
|
123701
123772
|
(diagnostic, ...args) => addFilePreprocessingFileExplainingDiagnostic(
|
|
123702
123773
|
/*file*/
|
|
@@ -123713,8 +123784,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123713
123784
|
fileName,
|
|
123714
123785
|
/*isDefaultLib*/
|
|
123715
123786
|
false,
|
|
123716
|
-
/*ignoreNoDefaultLib*/
|
|
123717
|
-
false,
|
|
123718
123787
|
/*packageId*/
|
|
123719
123788
|
void 0,
|
|
123720
123789
|
reason
|
|
@@ -123740,14 +123809,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123740
123809
|
sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
|
|
123741
123810
|
return redirect;
|
|
123742
123811
|
}
|
|
123743
|
-
function findSourceFile(fileName, isDefaultLib,
|
|
123812
|
+
function findSourceFile(fileName, isDefaultLib, reason, packageId) {
|
|
123744
123813
|
var _a2, _b2;
|
|
123745
123814
|
(_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "findSourceFile", {
|
|
123746
123815
|
fileName,
|
|
123747
123816
|
isDefaultLib: isDefaultLib || void 0,
|
|
123748
123817
|
fileIncludeKind: FileIncludeKind[reason.kind]
|
|
123749
123818
|
});
|
|
123750
|
-
const result = findSourceFileWorker(fileName, isDefaultLib,
|
|
123819
|
+
const result = findSourceFileWorker(fileName, isDefaultLib, reason, packageId);
|
|
123751
123820
|
(_b2 = tracing) == null ? void 0 : _b2.pop();
|
|
123752
123821
|
return result;
|
|
123753
123822
|
}
|
|
@@ -123757,7 +123826,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123757
123826
|
const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
|
|
123758
123827
|
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
|
|
123759
123828
|
}
|
|
123760
|
-
function findSourceFileWorker(fileName, isDefaultLib,
|
|
123829
|
+
function findSourceFileWorker(fileName, isDefaultLib, reason, packageId) {
|
|
123761
123830
|
var _a2, _b2;
|
|
123762
123831
|
const path = toPath3(fileName);
|
|
123763
123832
|
if (useSourceOfProjectReferenceRedirect) {
|
|
@@ -123767,7 +123836,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123767
123836
|
if (realPath2 !== path) source = getRedirectFromOutput(realPath2);
|
|
123768
123837
|
}
|
|
123769
123838
|
if (source == null ? void 0 : source.source) {
|
|
123770
|
-
const file2 = findSourceFile(source.source, isDefaultLib,
|
|
123839
|
+
const file2 = findSourceFile(source.source, isDefaultLib, reason, packageId);
|
|
123771
123840
|
if (file2) addFileToFilesByName(
|
|
123772
123841
|
file2,
|
|
123773
123842
|
path,
|
|
@@ -123887,7 +123956,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123887
123956
|
filesByNameIgnoreCase.set(pathLowerCase, file);
|
|
123888
123957
|
}
|
|
123889
123958
|
}
|
|
123890
|
-
skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib && !ignoreNoDefaultLib;
|
|
123891
123959
|
if (!options.noResolve) {
|
|
123892
123960
|
processReferencedFiles(file, isDefaultLib);
|
|
123893
123961
|
processTypeReferenceDirectives(file);
|
|
@@ -123948,8 +124016,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123948
124016
|
processSourceFile(
|
|
123949
124017
|
resolveTripleslashReference(ref.fileName, file.fileName),
|
|
123950
124018
|
isDefaultLib,
|
|
123951
|
-
/*ignoreNoDefaultLib*/
|
|
123952
|
-
false,
|
|
123953
124019
|
/*packageId*/
|
|
123954
124020
|
void 0,
|
|
123955
124021
|
{ kind: 4 /* ReferenceFile */, file: file.path, index }
|
|
@@ -123990,8 +124056,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
123990
124056
|
resolvedTypeReferenceDirective.resolvedFileName,
|
|
123991
124057
|
/*isDefaultLib*/
|
|
123992
124058
|
false,
|
|
123993
|
-
/*ignoreNoDefaultLib*/
|
|
123994
|
-
false,
|
|
123995
124059
|
resolvedTypeReferenceDirective.packageId,
|
|
123996
124060
|
reason
|
|
123997
124061
|
);
|
|
@@ -124011,13 +124075,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124011
124075
|
if (existing) return existing.actual;
|
|
124012
124076
|
const result = pathForLibFileWorker(libFileName);
|
|
124013
124077
|
(resolvedLibReferences ?? (resolvedLibReferences = /* @__PURE__ */ new Map())).set(libFileName, result);
|
|
124078
|
+
libFiles.add(toPath3(result.actual));
|
|
124014
124079
|
return result.actual;
|
|
124015
124080
|
}
|
|
124016
124081
|
function pathForLibFileWorker(libFileName) {
|
|
124017
124082
|
var _a2, _b2, _c2, _d2, _e2;
|
|
124018
124083
|
const existing = resolvedLibProcessing == null ? void 0 : resolvedLibProcessing.get(libFileName);
|
|
124019
124084
|
if (existing) return existing;
|
|
124020
|
-
if (options.libReplacement
|
|
124085
|
+
if (!options.libReplacement) {
|
|
124021
124086
|
const result2 = {
|
|
124022
124087
|
resolution: {
|
|
124023
124088
|
resolvedModule: void 0
|
|
@@ -124069,8 +124134,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124069
124134
|
pathForLibFile(libFileName),
|
|
124070
124135
|
/*isDefaultLib*/
|
|
124071
124136
|
true,
|
|
124072
|
-
/*ignoreNoDefaultLib*/
|
|
124073
|
-
true,
|
|
124074
124137
|
{ kind: 7 /* LibReferenceDirective */, file: file.path, index }
|
|
124075
124138
|
);
|
|
124076
124139
|
} else {
|
|
@@ -124118,8 +124181,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124118
124181
|
resolvedFileName,
|
|
124119
124182
|
/*isDefaultLib*/
|
|
124120
124183
|
false,
|
|
124121
|
-
/*ignoreNoDefaultLib*/
|
|
124122
|
-
false,
|
|
124123
124184
|
{ kind: 3 /* Import */, file: file.path, index },
|
|
124124
124185
|
resolution.packageId
|
|
124125
124186
|
);
|
|
@@ -124223,10 +124284,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124223
124284
|
}
|
|
124224
124285
|
const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
|
|
124225
124286
|
commandLine.fileNames.forEach((fileName) => {
|
|
124226
|
-
if (isDeclarationFileName(fileName)) return;
|
|
124227
124287
|
const path = toPath3(fileName);
|
|
124228
124288
|
let outputDts;
|
|
124229
|
-
if (!fileExtensionIs(fileName, ".json" /* Json */)) {
|
|
124289
|
+
if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) {
|
|
124230
124290
|
if (!commandLine.options.outFile) {
|
|
124231
124291
|
outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
|
|
124232
124292
|
mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName });
|
|
@@ -124410,6 +124470,31 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124410
124470
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
124411
124471
|
}
|
|
124412
124472
|
}
|
|
124473
|
+
if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
|
|
124474
|
+
getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
|
|
124475
|
+
options.outFile)) {
|
|
124476
|
+
const dir = getCommonSourceDirectory2();
|
|
124477
|
+
const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
|
|
124478
|
+
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
124479
|
+
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
|
|
124480
|
+
createDiagnosticForOption(
|
|
124481
|
+
/*onKey*/
|
|
124482
|
+
true,
|
|
124483
|
+
options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
|
|
124484
|
+
!options.outFile && options.outDir ? "declarationDir" : void 0,
|
|
124485
|
+
chainDiagnosticMessages(
|
|
124486
|
+
chainDiagnosticMessages(
|
|
124487
|
+
/*details*/
|
|
124488
|
+
void 0,
|
|
124489
|
+
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
124490
|
+
),
|
|
124491
|
+
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,
|
|
124492
|
+
getBaseFileName(options.configFilePath),
|
|
124493
|
+
getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
|
|
124494
|
+
)
|
|
124495
|
+
);
|
|
124496
|
+
}
|
|
124497
|
+
}
|
|
124413
124498
|
if (options.checkJs && !getAllowJSCompilerOption(options)) {
|
|
124414
124499
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
|
|
124415
124500
|
}
|
|
@@ -124537,32 +124622,35 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124537
124622
|
const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */);
|
|
124538
124623
|
const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */;
|
|
124539
124624
|
if (mustBeRemoved || canBeSilenced) {
|
|
124540
|
-
fn((name, value, useInstead) => {
|
|
124625
|
+
fn((name, value, useInstead, related) => {
|
|
124541
124626
|
if (mustBeRemoved) {
|
|
124542
124627
|
if (value === void 0) {
|
|
124543
|
-
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name);
|
|
124628
|
+
createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name);
|
|
124544
124629
|
} else {
|
|
124545
|
-
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value);
|
|
124630
|
+
createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value);
|
|
124546
124631
|
}
|
|
124547
124632
|
} else {
|
|
124548
124633
|
if (value === void 0) {
|
|
124549
|
-
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn);
|
|
124634
|
+
createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn);
|
|
124550
124635
|
} else {
|
|
124551
|
-
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn);
|
|
124636
|
+
createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn);
|
|
124552
124637
|
}
|
|
124553
124638
|
}
|
|
124554
124639
|
});
|
|
124555
124640
|
}
|
|
124556
124641
|
}
|
|
124557
124642
|
function verifyDeprecatedCompilerOptions() {
|
|
124558
|
-
function createDiagnostic(name, value, useInstead, message, ...args) {
|
|
124643
|
+
function createDiagnostic(name, value, useInstead, related, message, ...args) {
|
|
124559
124644
|
if (useInstead) {
|
|
124560
|
-
|
|
124645
|
+
let details = chainDiagnosticMessages(
|
|
124561
124646
|
/*details*/
|
|
124562
124647
|
void 0,
|
|
124563
124648
|
Diagnostics.Use_0_instead,
|
|
124564
124649
|
useInstead
|
|
124565
124650
|
);
|
|
124651
|
+
if (related) {
|
|
124652
|
+
details = chainDiagnosticMessages(details, related);
|
|
124653
|
+
}
|
|
124566
124654
|
const chain = chainDiagnosticMessages(details, message, ...args);
|
|
124567
124655
|
createDiagnosticForOption(
|
|
124568
124656
|
/*onKey*/
|
|
@@ -124573,14 +124661,22 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124573
124661
|
chain
|
|
124574
124662
|
);
|
|
124575
124663
|
} else {
|
|
124664
|
+
let details;
|
|
124665
|
+
if (related) {
|
|
124666
|
+
details = chainDiagnosticMessages(
|
|
124667
|
+
/*details*/
|
|
124668
|
+
void 0,
|
|
124669
|
+
related
|
|
124670
|
+
);
|
|
124671
|
+
}
|
|
124672
|
+
const chain = chainDiagnosticMessages(details, message, ...args);
|
|
124576
124673
|
createDiagnosticForOption(
|
|
124577
124674
|
/*onKey*/
|
|
124578
124675
|
!value,
|
|
124579
124676
|
name,
|
|
124580
124677
|
/*option2*/
|
|
124581
124678
|
void 0,
|
|
124582
|
-
|
|
124583
|
-
...args
|
|
124679
|
+
chain
|
|
124584
124680
|
);
|
|
124585
124681
|
}
|
|
124586
124682
|
}
|
|
@@ -124633,12 +124729,28 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124633
124729
|
});
|
|
124634
124730
|
checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
|
|
124635
124731
|
if (options.moduleResolution === 2 /* Node10 */) {
|
|
124636
|
-
createDeprecatedDiagnostic(
|
|
124732
|
+
createDeprecatedDiagnostic(
|
|
124733
|
+
"moduleResolution",
|
|
124734
|
+
"node10",
|
|
124735
|
+
/*useInstead*/
|
|
124736
|
+
void 0,
|
|
124737
|
+
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
124738
|
+
);
|
|
124739
|
+
}
|
|
124740
|
+
if (options.baseUrl !== void 0) {
|
|
124741
|
+
createDeprecatedDiagnostic(
|
|
124742
|
+
"baseUrl",
|
|
124743
|
+
/*value*/
|
|
124744
|
+
void 0,
|
|
124745
|
+
/*useInstead*/
|
|
124746
|
+
void 0,
|
|
124747
|
+
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
124748
|
+
);
|
|
124637
124749
|
}
|
|
124638
124750
|
});
|
|
124639
124751
|
}
|
|
124640
124752
|
function verifyDeprecatedProjectReference(ref, parentFile, index) {
|
|
124641
|
-
function createDiagnostic(_name, _value, _useInstead, message, ...args) {
|
|
124753
|
+
function createDiagnostic(_name, _value, _useInstead, _related, message, ...args) {
|
|
124642
124754
|
createDiagnosticForReference(parentFile, index, message, ...args);
|
|
124643
124755
|
}
|
|
124644
124756
|
checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => {
|
|
@@ -125873,7 +125985,7 @@ function createBuilderProgramState(newProgram, oldState) {
|
|
|
125873
125985
|
}
|
|
125874
125986
|
if (canCopySemanticDiagnostics) {
|
|
125875
125987
|
if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) return;
|
|
125876
|
-
if (sourceFile
|
|
125988
|
+
if (newProgram.isSourceFileDefaultLibrary(sourceFile) && !copyLibFileDiagnostics) return;
|
|
125877
125989
|
const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
|
|
125878
125990
|
if (diagnostics) {
|
|
125879
125991
|
state.semanticDiagnosticsPerFile.set(
|