@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/typescript.js
CHANGED
|
@@ -672,6 +672,7 @@ __export(typescript_exports, {
|
|
|
672
672
|
getCommonSourceDirectory: () => getCommonSourceDirectory,
|
|
673
673
|
getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
|
|
674
674
|
getCompilerOptionValue: () => getCompilerOptionValue,
|
|
675
|
+
getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
|
|
675
676
|
getConditions: () => getConditions,
|
|
676
677
|
getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
|
|
677
678
|
getConstantValue: () => getConstantValue,
|
|
@@ -2286,7 +2287,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2286
2287
|
|
|
2287
2288
|
// src/compiler/corePublic.ts
|
|
2288
2289
|
var versionMajorMinor = "6.0";
|
|
2289
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2290
|
+
var version = `${versionMajorMinor}.0-insiders.20251003`;
|
|
2290
2291
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2291
2292
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2292
2293
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6791,10 +6792,10 @@ var ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => {
|
|
|
6791
6792
|
ScriptTarget12[ScriptTarget12["Latest"] = 99 /* ESNext */] = "Latest";
|
|
6792
6793
|
return ScriptTarget12;
|
|
6793
6794
|
})(ScriptTarget || {});
|
|
6794
|
-
var LanguageVariant = /* @__PURE__ */ ((
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
return
|
|
6795
|
+
var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => {
|
|
6796
|
+
LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard";
|
|
6797
|
+
LanguageVariant4[LanguageVariant4["JSX"] = 1] = "JSX";
|
|
6798
|
+
return LanguageVariant4;
|
|
6798
6799
|
})(LanguageVariant || {});
|
|
6799
6800
|
var WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => {
|
|
6800
6801
|
WatchDirectoryFlags3[WatchDirectoryFlags3["None"] = 0] = "None";
|
|
@@ -9455,7 +9456,7 @@ var Diagnostics = {
|
|
|
9455
9456
|
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."),
|
|
9456
9457
|
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."),
|
|
9457
9458
|
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."),
|
|
9458
|
-
|
|
9459
|
+
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."),
|
|
9459
9460
|
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'?"),
|
|
9460
9461
|
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 '}'."),
|
|
9461
9462
|
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."),
|
|
@@ -10219,6 +10220,7 @@ var Diagnostics = {
|
|
|
10219
10220
|
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."),
|
|
10220
10221
|
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'."),
|
|
10221
10222
|
This_expression_is_never_nullish: diag(2881, 1 /* Error */, "This_expression_is_never_nullish_2881", "This expression is never nullish."),
|
|
10223
|
+
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}'."),
|
|
10222
10224
|
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}'."),
|
|
10223
10225
|
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}'."),
|
|
10224
10226
|
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}'."),
|
|
@@ -10333,6 +10335,7 @@ var Diagnostics = {
|
|
|
10333
10335
|
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."),
|
|
10334
10336
|
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."),
|
|
10335
10337
|
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}'."),
|
|
10338
|
+
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."),
|
|
10336
10339
|
Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
|
|
10337
10340
|
Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
|
|
10338
10341
|
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}."),
|
|
@@ -10396,6 +10399,7 @@ var Diagnostics = {
|
|
|
10396
10399
|
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."),
|
|
10397
10400
|
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}'."),
|
|
10398
10401
|
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}'."),
|
|
10402
|
+
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."),
|
|
10399
10403
|
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."),
|
|
10400
10404
|
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."),
|
|
10401
10405
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -17107,6 +17111,12 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
|
|
|
17107
17111
|
"toSorted",
|
|
17108
17112
|
"toSpliced",
|
|
17109
17113
|
"with"
|
|
17114
|
+
],
|
|
17115
|
+
esnext: [
|
|
17116
|
+
"toBase64",
|
|
17117
|
+
"setFromBase64",
|
|
17118
|
+
"toHex",
|
|
17119
|
+
"setFromHex"
|
|
17110
17120
|
]
|
|
17111
17121
|
})),
|
|
17112
17122
|
Uint8ClampedArray: new Map(Object.entries({
|
|
@@ -17235,6 +17245,12 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
|
|
|
17235
17245
|
es2022: [
|
|
17236
17246
|
"cause"
|
|
17237
17247
|
]
|
|
17248
|
+
})),
|
|
17249
|
+
Uint8ArrayConstructor: new Map(Object.entries({
|
|
17250
|
+
esnext: [
|
|
17251
|
+
"fromBase64",
|
|
17252
|
+
"fromHex"
|
|
17253
|
+
]
|
|
17238
17254
|
}))
|
|
17239
17255
|
}))
|
|
17240
17256
|
);
|
|
@@ -20396,7 +20412,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
|
|
|
20396
20412
|
if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
|
|
20397
20413
|
if (options.outFile) return true;
|
|
20398
20414
|
if (!options.outDir) return false;
|
|
20399
|
-
if (options.rootDir || options.
|
|
20415
|
+
if (options.rootDir || options.configFilePath) {
|
|
20400
20416
|
const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
|
|
20401
20417
|
const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
|
|
20402
20418
|
if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
|
|
@@ -22832,7 +22848,7 @@ function skipTypeCheckingIgnoringNoCheck(sourceFile, options, host) {
|
|
|
22832
22848
|
);
|
|
22833
22849
|
}
|
|
22834
22850
|
function skipTypeCheckingWorker(sourceFile, options, host, ignoreNoCheck) {
|
|
22835
|
-
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile
|
|
22851
|
+
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && host.isSourceFileDefaultLibrary(sourceFile) || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
|
|
22836
22852
|
}
|
|
22837
22853
|
function canIncludeBindAndCheckDiagnostics(sourceFile, options) {
|
|
22838
22854
|
if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
|
|
@@ -28364,8 +28380,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
28364
28380
|
node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
|
|
28365
28381
|
return node;
|
|
28366
28382
|
}
|
|
28367
|
-
function updateSourceFile2(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives,
|
|
28368
|
-
return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.
|
|
28383
|
+
function updateSourceFile2(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, _hasNoDefaultLib = false, libReferenceDirectives = node.libReferenceDirectives) {
|
|
28384
|
+
return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(
|
|
28385
|
+
node,
|
|
28386
|
+
statements,
|
|
28387
|
+
isDeclarationFile,
|
|
28388
|
+
referencedFiles,
|
|
28389
|
+
typeReferenceDirectives,
|
|
28390
|
+
/*hasNoDefaultLib*/
|
|
28391
|
+
false,
|
|
28392
|
+
libReferenceDirectives
|
|
28393
|
+
), node) : node;
|
|
28369
28394
|
}
|
|
28370
28395
|
function createBundle(sourceFiles) {
|
|
28371
28396
|
const node = createBaseNode(309 /* Bundle */);
|
|
@@ -28373,7 +28398,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
28373
28398
|
node.syntheticFileReferences = void 0;
|
|
28374
28399
|
node.syntheticTypeReferences = void 0;
|
|
28375
28400
|
node.syntheticLibReferences = void 0;
|
|
28376
|
-
node.hasNoDefaultLib = void 0;
|
|
28377
28401
|
return node;
|
|
28378
28402
|
}
|
|
28379
28403
|
function updateBundle(node, sourceFiles) {
|
|
@@ -40429,7 +40453,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
|
|
|
40429
40453
|
context.typeReferenceDirectives = [];
|
|
40430
40454
|
context.libReferenceDirectives = [];
|
|
40431
40455
|
context.amdDependencies = [];
|
|
40432
|
-
context.hasNoDefaultLib = false;
|
|
40433
40456
|
context.pragmas.forEach((entryOrList, key) => {
|
|
40434
40457
|
switch (key) {
|
|
40435
40458
|
case "reference": {
|
|
@@ -40440,7 +40463,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
|
|
|
40440
40463
|
const { types, lib, path, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
|
|
40441
40464
|
const preserve = _preserve === "true" ? true : void 0;
|
|
40442
40465
|
if (arg.arguments["no-default-lib"] === "true") {
|
|
40443
|
-
context.hasNoDefaultLib = true;
|
|
40444
40466
|
} else if (types) {
|
|
40445
40467
|
const parsed = parseResolutionMode(res, types.pos, types.end, reportDiagnostic);
|
|
40446
40468
|
typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
|
|
@@ -40716,6 +40738,7 @@ var libEntries = [
|
|
|
40716
40738
|
["esnext.iterator", "lib.esnext.iterator.d.ts"],
|
|
40717
40739
|
["esnext.promise", "lib.esnext.promise.d.ts"],
|
|
40718
40740
|
["esnext.float16", "lib.esnext.float16.d.ts"],
|
|
40741
|
+
["esnext.typedarrays", "lib.esnext.typedarrays.d.ts"],
|
|
40719
40742
|
["esnext.error", "lib.esnext.error.d.ts"],
|
|
40720
40743
|
["esnext.sharedmemory", "lib.esnext.sharedmemory.d.ts"],
|
|
40721
40744
|
["decorators", "lib.decorators.d.ts"],
|
|
@@ -41313,7 +41336,7 @@ var commandOptionsWithoutBuild = [
|
|
|
41313
41336
|
affectsProgramStructure: true,
|
|
41314
41337
|
category: Diagnostics.Language_and_Environment,
|
|
41315
41338
|
description: Diagnostics.Enable_lib_replacement,
|
|
41316
|
-
defaultValueDescription:
|
|
41339
|
+
defaultValueDescription: false
|
|
41317
41340
|
},
|
|
41318
41341
|
// Strict Type Checks
|
|
41319
41342
|
{
|
|
@@ -41680,7 +41703,7 @@ var commandOptionsWithoutBuild = [
|
|
|
41680
41703
|
affectsBuildInfo: true,
|
|
41681
41704
|
category: Diagnostics.Modules,
|
|
41682
41705
|
description: Diagnostics.Check_side_effect_imports,
|
|
41683
|
-
defaultValueDescription:
|
|
41706
|
+
defaultValueDescription: true
|
|
41684
41707
|
},
|
|
41685
41708
|
// Source Maps
|
|
41686
41709
|
{
|
|
@@ -46148,7 +46171,9 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
46148
46171
|
const subTarget = target[condition];
|
|
46149
46172
|
const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key);
|
|
46150
46173
|
if (result) {
|
|
46151
|
-
|
|
46174
|
+
if (result.value) {
|
|
46175
|
+
traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
|
|
46176
|
+
}
|
|
46152
46177
|
traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);
|
|
46153
46178
|
return result;
|
|
46154
46179
|
} else {
|
|
@@ -46181,10 +46206,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
46181
46206
|
if (state.traceEnabled) {
|
|
46182
46207
|
trace(state.host, Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName);
|
|
46183
46208
|
}
|
|
46184
|
-
return
|
|
46185
|
-
/*value*/
|
|
46186
|
-
void 0
|
|
46187
|
-
);
|
|
46209
|
+
return { value: void 0 };
|
|
46188
46210
|
}
|
|
46189
46211
|
if (state.traceEnabled) {
|
|
46190
46212
|
trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
@@ -46206,7 +46228,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
46206
46228
|
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)) {
|
|
46207
46229
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
46208
46230
|
const commonSourceDirGuesses = [];
|
|
46209
|
-
if (state.compilerOptions.rootDir || state.compilerOptions.
|
|
46231
|
+
if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
|
|
46210
46232
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
46211
46233
|
commonSourceDirGuesses.push(commonDir);
|
|
46212
46234
|
} else if (state.requestContainingDirectory) {
|
|
@@ -51044,7 +51066,7 @@ function createTypeChecker(host) {
|
|
|
51044
51066
|
var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
|
|
51045
51067
|
var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
|
|
51046
51068
|
var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
|
|
51047
|
-
var noUncheckedSideEffectImports =
|
|
51069
|
+
var noUncheckedSideEffectImports = compilerOptions.noUncheckedSideEffectImports !== false;
|
|
51048
51070
|
var checkBinaryExpression = createCheckBinaryExpression();
|
|
51049
51071
|
var emitResolver = createResolver();
|
|
51050
51072
|
var nodeBuilder = createNodeBuilder();
|
|
@@ -54020,9 +54042,9 @@ function createTypeChecker(host) {
|
|
|
54020
54042
|
}
|
|
54021
54043
|
}
|
|
54022
54044
|
}
|
|
54023
|
-
function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) {
|
|
54045
|
+
function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors, errorMessage) {
|
|
54024
54046
|
const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
|
|
54025
|
-
|
|
54047
|
+
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);
|
|
54026
54048
|
return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage, ignoreErrors);
|
|
54027
54049
|
}
|
|
54028
54050
|
function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, ignoreErrors = false, isForAugmentation = false) {
|
|
@@ -68688,14 +68710,14 @@ function createTypeChecker(host) {
|
|
|
68688
68710
|
let issuedElaboration = false;
|
|
68689
68711
|
if (!targetProp) {
|
|
68690
68712
|
const indexInfo = getApplicableIndexInfo(target, nameType);
|
|
68691
|
-
if (indexInfo && indexInfo.declaration && !getSourceFileOfNode(indexInfo.declaration)
|
|
68713
|
+
if (indexInfo && indexInfo.declaration && !host.isSourceFileDefaultLibrary(getSourceFileOfNode(indexInfo.declaration))) {
|
|
68692
68714
|
issuedElaboration = true;
|
|
68693
68715
|
addRelatedInfo(reportedDiag, createDiagnosticForNode(indexInfo.declaration, Diagnostics.The_expected_type_comes_from_this_index_signature));
|
|
68694
68716
|
}
|
|
68695
68717
|
}
|
|
68696
68718
|
if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) {
|
|
68697
68719
|
const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0];
|
|
68698
|
-
if (!getSourceFileOfNode(targetNode)
|
|
68720
|
+
if (!host.isSourceFileDefaultLibrary(getSourceFileOfNode(targetNode))) {
|
|
68699
68721
|
addRelatedInfo(
|
|
68700
68722
|
reportedDiag,
|
|
68701
68723
|
createDiagnosticForNode(
|
|
@@ -71389,13 +71411,10 @@ function createTypeChecker(host) {
|
|
|
71389
71411
|
if (isObjectLiteralType2(target2)) {
|
|
71390
71412
|
for (const sourceProp of excludeProperties(getPropertiesOfType(source2), excludedProperties)) {
|
|
71391
71413
|
if (!getPropertyOfObjectType(target2, sourceProp.escapedName)) {
|
|
71392
|
-
|
|
71393
|
-
|
|
71394
|
-
if (reportErrors2) {
|
|
71395
|
-
reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target2));
|
|
71396
|
-
}
|
|
71397
|
-
return 0 /* False */;
|
|
71414
|
+
if (reportErrors2) {
|
|
71415
|
+
reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target2));
|
|
71398
71416
|
}
|
|
71417
|
+
return 0 /* False */;
|
|
71399
71418
|
}
|
|
71400
71419
|
}
|
|
71401
71420
|
}
|
|
@@ -72059,7 +72078,7 @@ function createTypeChecker(host) {
|
|
|
72059
72078
|
if (isReadonlySymbol(sourceProp) !== isReadonlySymbol(targetProp)) {
|
|
72060
72079
|
return 0 /* False */;
|
|
72061
72080
|
}
|
|
72062
|
-
return compareTypes(
|
|
72081
|
+
return compareTypes(getNonMissingTypeOfSymbol(sourceProp), getNonMissingTypeOfSymbol(targetProp));
|
|
72063
72082
|
}
|
|
72064
72083
|
function isMatchingSignature(source, target, partialMatch) {
|
|
72065
72084
|
const sourceParameterCount = getParameterCount(source);
|
|
@@ -72348,13 +72367,6 @@ function createTypeChecker(host) {
|
|
|
72348
72367
|
return mapType(type, getDefinitelyFalsyPartOfType);
|
|
72349
72368
|
}
|
|
72350
72369
|
function getDefinitelyFalsyPartOfType(type) {
|
|
72351
|
-
if (type.flags & 262144 /* TypeParameter */) {
|
|
72352
|
-
const constraint = getBaseConstraintOfType(type);
|
|
72353
|
-
if (!constraint || constraint === type) {
|
|
72354
|
-
return neverType;
|
|
72355
|
-
}
|
|
72356
|
-
return getDefinitelyFalsyPartOfType(constraint);
|
|
72357
|
-
}
|
|
72358
72370
|
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;
|
|
72359
72371
|
}
|
|
72360
72372
|
function getNullableType(type, flags) {
|
|
@@ -74080,23 +74092,21 @@ function createTypeChecker(host) {
|
|
|
74080
74092
|
for (const type of types) {
|
|
74081
74093
|
if (type.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) {
|
|
74082
74094
|
const discriminant = getTypeOfPropertyOfType(type, name);
|
|
74083
|
-
if (discriminant) {
|
|
74084
|
-
|
|
74085
|
-
return void 0;
|
|
74086
|
-
}
|
|
74087
|
-
let duplicate = false;
|
|
74088
|
-
forEachType(discriminant, (t) => {
|
|
74089
|
-
const id = getTypeId(getRegularTypeOfLiteralType(t));
|
|
74090
|
-
const existing = map2.get(id);
|
|
74091
|
-
if (!existing) {
|
|
74092
|
-
map2.set(id, type);
|
|
74093
|
-
} else if (existing !== unknownType) {
|
|
74094
|
-
map2.set(id, unknownType);
|
|
74095
|
-
duplicate = true;
|
|
74096
|
-
}
|
|
74097
|
-
});
|
|
74098
|
-
if (!duplicate) count++;
|
|
74095
|
+
if (!discriminant || !isLiteralType(discriminant)) {
|
|
74096
|
+
return void 0;
|
|
74099
74097
|
}
|
|
74098
|
+
let duplicate = false;
|
|
74099
|
+
forEachType(discriminant, (t) => {
|
|
74100
|
+
const id = getTypeId(getRegularTypeOfLiteralType(t));
|
|
74101
|
+
const existing = map2.get(id);
|
|
74102
|
+
if (!existing) {
|
|
74103
|
+
map2.set(id, type);
|
|
74104
|
+
} else if (existing !== unknownType) {
|
|
74105
|
+
map2.set(id, unknownType);
|
|
74106
|
+
duplicate = true;
|
|
74107
|
+
}
|
|
74108
|
+
});
|
|
74109
|
+
if (!duplicate) count++;
|
|
74100
74110
|
}
|
|
74101
74111
|
}
|
|
74102
74112
|
return count >= 10 && count * 2 >= types.length ? map2 : void 0;
|
|
@@ -82395,7 +82405,7 @@ function createTypeChecker(host) {
|
|
|
82395
82405
|
const exprType = checkExpression(expression, checkMode);
|
|
82396
82406
|
if (isConstTypeReference(type)) {
|
|
82397
82407
|
if (!isValidConstAssertionArgument(expression)) {
|
|
82398
|
-
error2(expression, Diagnostics.
|
|
82408
|
+
error2(expression, Diagnostics.A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals);
|
|
82399
82409
|
}
|
|
82400
82410
|
return getRegularTypeOfLiteralType(exprType);
|
|
82401
82411
|
}
|
|
@@ -86213,6 +86223,47 @@ function createTypeChecker(host) {
|
|
|
86213
86223
|
}
|
|
86214
86224
|
return void 0;
|
|
86215
86225
|
}
|
|
86226
|
+
function getUninstantiatedSignatures(node) {
|
|
86227
|
+
switch (node.kind) {
|
|
86228
|
+
case 214 /* CallExpression */:
|
|
86229
|
+
case 171 /* Decorator */:
|
|
86230
|
+
return getSignaturesOfType(
|
|
86231
|
+
getTypeOfExpression(node.expression),
|
|
86232
|
+
0 /* Call */
|
|
86233
|
+
);
|
|
86234
|
+
case 215 /* NewExpression */:
|
|
86235
|
+
return getSignaturesOfType(
|
|
86236
|
+
getTypeOfExpression(node.expression),
|
|
86237
|
+
1 /* Construct */
|
|
86238
|
+
);
|
|
86239
|
+
case 286 /* JsxSelfClosingElement */:
|
|
86240
|
+
case 287 /* JsxOpeningElement */:
|
|
86241
|
+
if (isJsxIntrinsicTagName(node.tagName)) return [];
|
|
86242
|
+
return getSignaturesOfType(
|
|
86243
|
+
getTypeOfExpression(node.tagName),
|
|
86244
|
+
0 /* Call */
|
|
86245
|
+
);
|
|
86246
|
+
case 216 /* TaggedTemplateExpression */:
|
|
86247
|
+
return getSignaturesOfType(
|
|
86248
|
+
getTypeOfExpression(node.tag),
|
|
86249
|
+
0 /* Call */
|
|
86250
|
+
);
|
|
86251
|
+
case 227 /* BinaryExpression */:
|
|
86252
|
+
case 290 /* JsxOpeningFragment */:
|
|
86253
|
+
return [];
|
|
86254
|
+
}
|
|
86255
|
+
}
|
|
86256
|
+
function getTypeParameterConstraintForPositionAcrossSignatures(signatures, position) {
|
|
86257
|
+
const relevantTypeParameterConstraints = flatMap(signatures, (signature) => {
|
|
86258
|
+
var _a;
|
|
86259
|
+
const relevantTypeParameter = (_a = signature.typeParameters) == null ? void 0 : _a[position];
|
|
86260
|
+
if (relevantTypeParameter === void 0) return [];
|
|
86261
|
+
const relevantConstraint = getConstraintOfTypeParameter(relevantTypeParameter);
|
|
86262
|
+
if (relevantConstraint === void 0) return [];
|
|
86263
|
+
return [relevantConstraint];
|
|
86264
|
+
});
|
|
86265
|
+
return getUnionType(relevantTypeParameterConstraints);
|
|
86266
|
+
}
|
|
86216
86267
|
function checkTypeReferenceNode(node) {
|
|
86217
86268
|
checkGrammarTypeArguments(node, node.typeArguments);
|
|
86218
86269
|
if (node.kind === 184 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
|
|
@@ -86248,12 +86299,48 @@ function createTypeChecker(host) {
|
|
|
86248
86299
|
}
|
|
86249
86300
|
}
|
|
86250
86301
|
function getTypeArgumentConstraint(node) {
|
|
86251
|
-
|
|
86252
|
-
if (
|
|
86253
|
-
|
|
86254
|
-
|
|
86255
|
-
|
|
86256
|
-
|
|
86302
|
+
let typeArgumentPosition;
|
|
86303
|
+
if (hasTypeArguments(node.parent) && Array.isArray(node.parent.typeArguments)) {
|
|
86304
|
+
typeArgumentPosition = node.parent.typeArguments.indexOf(node);
|
|
86305
|
+
}
|
|
86306
|
+
if (typeArgumentPosition !== void 0) {
|
|
86307
|
+
if (isCallLikeExpression(node.parent)) {
|
|
86308
|
+
return getTypeParameterConstraintForPositionAcrossSignatures(
|
|
86309
|
+
getUninstantiatedSignatures(node.parent),
|
|
86310
|
+
typeArgumentPosition
|
|
86311
|
+
);
|
|
86312
|
+
}
|
|
86313
|
+
if (isDecorator(node.parent.parent)) {
|
|
86314
|
+
return getTypeParameterConstraintForPositionAcrossSignatures(
|
|
86315
|
+
getUninstantiatedSignatures(node.parent.parent),
|
|
86316
|
+
typeArgumentPosition
|
|
86317
|
+
);
|
|
86318
|
+
}
|
|
86319
|
+
if (isExpressionWithTypeArguments(node.parent) && isExpressionStatement(node.parent.parent)) {
|
|
86320
|
+
const uninstantiatedType = checkExpression(node.parent.expression);
|
|
86321
|
+
const callConstraint = getTypeParameterConstraintForPositionAcrossSignatures(
|
|
86322
|
+
getSignaturesOfType(uninstantiatedType, 0 /* Call */),
|
|
86323
|
+
typeArgumentPosition
|
|
86324
|
+
);
|
|
86325
|
+
const constructConstraint = getTypeParameterConstraintForPositionAcrossSignatures(
|
|
86326
|
+
getSignaturesOfType(uninstantiatedType, 1 /* Construct */),
|
|
86327
|
+
typeArgumentPosition
|
|
86328
|
+
);
|
|
86329
|
+
if (constructConstraint.flags & 131072 /* Never */) return callConstraint;
|
|
86330
|
+
if (callConstraint.flags & 131072 /* Never */) return constructConstraint;
|
|
86331
|
+
return getIntersectionType([callConstraint, constructConstraint]);
|
|
86332
|
+
}
|
|
86333
|
+
if (isTypeReferenceType(node.parent)) {
|
|
86334
|
+
const typeParameters = getTypeParametersForTypeReferenceOrImport(node.parent);
|
|
86335
|
+
if (!typeParameters) return void 0;
|
|
86336
|
+
const relevantTypeParameter = typeParameters[typeArgumentPosition];
|
|
86337
|
+
const constraint = getConstraintOfTypeParameter(relevantTypeParameter);
|
|
86338
|
+
return constraint && instantiateType(
|
|
86339
|
+
constraint,
|
|
86340
|
+
createTypeMapper(typeParameters, getEffectiveTypeArguments2(node.parent, typeParameters))
|
|
86341
|
+
);
|
|
86342
|
+
}
|
|
86343
|
+
}
|
|
86257
86344
|
}
|
|
86258
86345
|
function checkTypeQuery(node) {
|
|
86259
86346
|
getTypeFromTypeQueryNode(node);
|
|
@@ -90667,7 +90754,13 @@ function createTypeChecker(host) {
|
|
|
90667
90754
|
error2(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]);
|
|
90668
90755
|
}
|
|
90669
90756
|
} else if (noUncheckedSideEffectImports && !importClause) {
|
|
90670
|
-
void resolveExternalModuleName(
|
|
90757
|
+
void resolveExternalModuleName(
|
|
90758
|
+
node,
|
|
90759
|
+
node.moduleSpecifier,
|
|
90760
|
+
/*ignoreErrors*/
|
|
90761
|
+
void 0,
|
|
90762
|
+
Diagnostics.Cannot_find_module_or_type_declarations_for_side_effect_import_of_0
|
|
90763
|
+
);
|
|
90671
90764
|
}
|
|
90672
90765
|
}
|
|
90673
90766
|
checkImportAttributes(node);
|
|
@@ -118702,11 +118795,9 @@ function transformDeclarations(context) {
|
|
|
118702
118795
|
rawReferencedFiles = [];
|
|
118703
118796
|
rawTypeReferenceDirectives = [];
|
|
118704
118797
|
rawLibReferenceDirectives = [];
|
|
118705
|
-
let hasNoDefaultLib = false;
|
|
118706
118798
|
const bundle = factory2.createBundle(
|
|
118707
118799
|
map(node.sourceFiles, (sourceFile) => {
|
|
118708
118800
|
if (sourceFile.isDeclarationFile) return void 0;
|
|
118709
|
-
hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
|
|
118710
118801
|
currentSourceFile = sourceFile;
|
|
118711
118802
|
enclosingDeclaration = sourceFile;
|
|
118712
118803
|
lateMarkedStatements = void 0;
|
|
@@ -118767,7 +118858,6 @@ function transformDeclarations(context) {
|
|
|
118767
118858
|
bundle.syntheticFileReferences = getReferencedFiles(outputFilePath2);
|
|
118768
118859
|
bundle.syntheticTypeReferences = getTypeReferences();
|
|
118769
118860
|
bundle.syntheticLibReferences = getLibReferences();
|
|
118770
|
-
bundle.hasNoDefaultLib = hasNoDefaultLib;
|
|
118771
118861
|
return bundle;
|
|
118772
118862
|
}
|
|
118773
118863
|
needsDeclare = true;
|
|
@@ -118808,7 +118898,8 @@ function transformDeclarations(context) {
|
|
|
118808
118898
|
true,
|
|
118809
118899
|
getReferencedFiles(outputFilePath),
|
|
118810
118900
|
getTypeReferences(),
|
|
118811
|
-
|
|
118901
|
+
/*hasNoDefaultLib*/
|
|
118902
|
+
false,
|
|
118812
118903
|
getLibReferences()
|
|
118813
118904
|
);
|
|
118814
118905
|
function collectFileReferences(sourceFile) {
|
|
@@ -120718,7 +120809,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
120718
120809
|
if (options.rootDir) {
|
|
120719
120810
|
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
|
|
120720
120811
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
|
|
120721
|
-
} else if (options.
|
|
120812
|
+
} else if (options.configFilePath) {
|
|
120722
120813
|
commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
|
|
120723
120814
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
|
|
120724
120815
|
} else {
|
|
@@ -120729,6 +120820,13 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
120729
120820
|
}
|
|
120730
120821
|
return commonSourceDirectory;
|
|
120731
120822
|
}
|
|
120823
|
+
function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
|
|
120824
|
+
let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
120825
|
+
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
|
|
120826
|
+
commonSourceDirectory += directorySeparator;
|
|
120827
|
+
}
|
|
120828
|
+
return commonSourceDirectory;
|
|
120829
|
+
}
|
|
120732
120830
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
120733
120831
|
return getCommonSourceDirectory(
|
|
120734
120832
|
options,
|
|
@@ -123978,16 +124076,12 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
123978
124076
|
emitSourceFileWorker(node);
|
|
123979
124077
|
}
|
|
123980
124078
|
function emitSyntheticTripleSlashReferencesIfNeeded(node) {
|
|
123981
|
-
emitTripleSlashDirectives(
|
|
124079
|
+
emitTripleSlashDirectives(node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
|
|
123982
124080
|
}
|
|
123983
124081
|
function emitTripleSlashDirectivesIfNeeded(node) {
|
|
123984
|
-
if (node.isDeclarationFile) emitTripleSlashDirectives(node.
|
|
124082
|
+
if (node.isDeclarationFile) emitTripleSlashDirectives(node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
|
|
123985
124083
|
}
|
|
123986
|
-
function emitTripleSlashDirectives(
|
|
123987
|
-
if (hasNoDefaultLib) {
|
|
123988
|
-
writeComment(`/// <reference no-default-lib="true"/>`);
|
|
123989
|
-
writeLine();
|
|
123990
|
-
}
|
|
124084
|
+
function emitTripleSlashDirectives(files, types, libs2) {
|
|
123991
124085
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
123992
124086
|
writeComment(`/// <amd-module name="${currentSourceFile.moduleName}" />`);
|
|
123993
124087
|
writeLine();
|
|
@@ -126980,7 +127074,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
126980
127074
|
mark("beforeProgram");
|
|
126981
127075
|
const host = createProgramOptionsHost || createCompilerHost(options);
|
|
126982
127076
|
const configParsingHost = parseConfigHostFromCompilerHostLike(host);
|
|
126983
|
-
let skipDefaultLib = options.noLib;
|
|
126984
127077
|
const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
|
|
126985
127078
|
const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
|
|
126986
127079
|
let skipVerifyCompilerOptions = false;
|
|
@@ -127068,6 +127161,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
127068
127161
|
let redirectTargetsMap = createMultiMap();
|
|
127069
127162
|
let usesUriStyleNodeCoreModules;
|
|
127070
127163
|
const filesByName = /* @__PURE__ */ new Map();
|
|
127164
|
+
const libFiles = /* @__PURE__ */ new Set();
|
|
127071
127165
|
let missingFileNames = /* @__PURE__ */ new Map();
|
|
127072
127166
|
const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;
|
|
127073
127167
|
let resolvedProjectReferences;
|
|
@@ -127129,8 +127223,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
127129
127223
|
name,
|
|
127130
127224
|
/*isDefaultLib*/
|
|
127131
127225
|
false,
|
|
127132
|
-
/*ignoreNoDefaultLib*/
|
|
127133
|
-
false,
|
|
127134
127226
|
{ kind: 0 /* RootFile */, index }
|
|
127135
127227
|
));
|
|
127136
127228
|
(_j = tracing) == null ? void 0 : _j.pop();
|
|
@@ -127162,15 +127254,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
127162
127254
|
}
|
|
127163
127255
|
(_n = tracing) == null ? void 0 : _n.pop();
|
|
127164
127256
|
}
|
|
127165
|
-
if (rootNames.length && !
|
|
127257
|
+
if (rootNames.length && !options.noLib) {
|
|
127166
127258
|
const defaultLibraryFileName = getDefaultLibraryFileName();
|
|
127167
127259
|
if (!options.lib && defaultLibraryFileName) {
|
|
127260
|
+
libFiles.add(toPath3(defaultLibraryFileName));
|
|
127168
127261
|
processRootFile(
|
|
127169
127262
|
defaultLibraryFileName,
|
|
127170
127263
|
/*isDefaultLib*/
|
|
127171
127264
|
true,
|
|
127172
|
-
/*ignoreNoDefaultLib*/
|
|
127173
|
-
false,
|
|
127174
127265
|
{ kind: 6 /* LibFile */ }
|
|
127175
127266
|
);
|
|
127176
127267
|
} else {
|
|
@@ -127179,8 +127270,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
127179
127270
|
pathForLibFile(libFileName),
|
|
127180
127271
|
/*isDefaultLib*/
|
|
127181
127272
|
true,
|
|
127182
|
-
/*ignoreNoDefaultLib*/
|
|
127183
|
-
false,
|
|
127184
127273
|
{ kind: 6 /* LibFile */, index }
|
|
127185
127274
|
);
|
|
127186
127275
|
});
|
|
@@ -127691,8 +127780,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
127691
127780
|
structureIsReused = 1 /* SafeModules */;
|
|
127692
127781
|
} else if (!arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) {
|
|
127693
127782
|
structureIsReused = 1 /* SafeModules */;
|
|
127694
|
-
} else if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
|
|
127695
|
-
structureIsReused = 1 /* SafeModules */;
|
|
127696
127783
|
} else if (!arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
|
|
127697
127784
|
structureIsReused = 1 /* SafeModules */;
|
|
127698
127785
|
} else {
|
|
@@ -127874,24 +127961,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
127874
127961
|
return !!sourceFilesFoundSearchingNodeModules.get(file.path);
|
|
127875
127962
|
}
|
|
127876
127963
|
function isSourceFileDefaultLibrary(file) {
|
|
127877
|
-
|
|
127878
|
-
return false;
|
|
127879
|
-
}
|
|
127880
|
-
if (file.hasNoDefaultLib) {
|
|
127881
|
-
return true;
|
|
127882
|
-
}
|
|
127883
|
-
if (options.noLib) {
|
|
127884
|
-
return false;
|
|
127885
|
-
}
|
|
127886
|
-
const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;
|
|
127887
|
-
if (!options.lib) {
|
|
127888
|
-
return equalityComparer(file.fileName, getDefaultLibraryFileName());
|
|
127889
|
-
} else {
|
|
127890
|
-
return some(options.lib, (libFileName) => {
|
|
127891
|
-
const resolvedLib = resolvedLibReferences.get(libFileName);
|
|
127892
|
-
return !!resolvedLib && equalityComparer(file.fileName, resolvedLib.actual);
|
|
127893
|
-
});
|
|
127894
|
-
}
|
|
127964
|
+
return libFiles.has(file.path);
|
|
127895
127965
|
}
|
|
127896
127966
|
function getTypeChecker() {
|
|
127897
127967
|
return typeChecker || (typeChecker = createTypeChecker(program));
|
|
@@ -128372,11 +128442,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128372
128442
|
function getConfigFileParsingDiagnostics2() {
|
|
128373
128443
|
return configFileParsingDiagnostics || emptyArray;
|
|
128374
128444
|
}
|
|
128375
|
-
function processRootFile(fileName, isDefaultLib,
|
|
128445
|
+
function processRootFile(fileName, isDefaultLib, reason) {
|
|
128376
128446
|
processSourceFile(
|
|
128377
128447
|
normalizePath(fileName),
|
|
128378
128448
|
isDefaultLib,
|
|
128379
|
-
ignoreNoDefaultLib,
|
|
128380
128449
|
/*packageId*/
|
|
128381
128450
|
void 0,
|
|
128382
128451
|
reason
|
|
@@ -128541,10 +128610,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128541
128610
|
return sourceFileWithAddedExtension;
|
|
128542
128611
|
}
|
|
128543
128612
|
}
|
|
128544
|
-
function processSourceFile(fileName, isDefaultLib,
|
|
128613
|
+
function processSourceFile(fileName, isDefaultLib, packageId, reason) {
|
|
128545
128614
|
getSourceFileFromReferenceWorker(
|
|
128546
128615
|
fileName,
|
|
128547
|
-
(fileName2) => findSourceFile(fileName2, isDefaultLib,
|
|
128616
|
+
(fileName2) => findSourceFile(fileName2, isDefaultLib, reason, packageId),
|
|
128548
128617
|
// TODO: GH#18217
|
|
128549
128618
|
(diagnostic, ...args) => addFilePreprocessingFileExplainingDiagnostic(
|
|
128550
128619
|
/*file*/
|
|
@@ -128561,8 +128630,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128561
128630
|
fileName,
|
|
128562
128631
|
/*isDefaultLib*/
|
|
128563
128632
|
false,
|
|
128564
|
-
/*ignoreNoDefaultLib*/
|
|
128565
|
-
false,
|
|
128566
128633
|
/*packageId*/
|
|
128567
128634
|
void 0,
|
|
128568
128635
|
reason
|
|
@@ -128588,14 +128655,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128588
128655
|
sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
|
|
128589
128656
|
return redirect;
|
|
128590
128657
|
}
|
|
128591
|
-
function findSourceFile(fileName, isDefaultLib,
|
|
128658
|
+
function findSourceFile(fileName, isDefaultLib, reason, packageId) {
|
|
128592
128659
|
var _a2, _b2;
|
|
128593
128660
|
(_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "findSourceFile", {
|
|
128594
128661
|
fileName,
|
|
128595
128662
|
isDefaultLib: isDefaultLib || void 0,
|
|
128596
128663
|
fileIncludeKind: FileIncludeKind[reason.kind]
|
|
128597
128664
|
});
|
|
128598
|
-
const result = findSourceFileWorker(fileName, isDefaultLib,
|
|
128665
|
+
const result = findSourceFileWorker(fileName, isDefaultLib, reason, packageId);
|
|
128599
128666
|
(_b2 = tracing) == null ? void 0 : _b2.pop();
|
|
128600
128667
|
return result;
|
|
128601
128668
|
}
|
|
@@ -128605,7 +128672,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128605
128672
|
const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
|
|
128606
128673
|
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
|
|
128607
128674
|
}
|
|
128608
|
-
function findSourceFileWorker(fileName, isDefaultLib,
|
|
128675
|
+
function findSourceFileWorker(fileName, isDefaultLib, reason, packageId) {
|
|
128609
128676
|
var _a2, _b2;
|
|
128610
128677
|
const path = toPath3(fileName);
|
|
128611
128678
|
if (useSourceOfProjectReferenceRedirect) {
|
|
@@ -128615,7 +128682,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128615
128682
|
if (realPath2 !== path) source = getRedirectFromOutput(realPath2);
|
|
128616
128683
|
}
|
|
128617
128684
|
if (source == null ? void 0 : source.source) {
|
|
128618
|
-
const file2 = findSourceFile(source.source, isDefaultLib,
|
|
128685
|
+
const file2 = findSourceFile(source.source, isDefaultLib, reason, packageId);
|
|
128619
128686
|
if (file2) addFileToFilesByName(
|
|
128620
128687
|
file2,
|
|
128621
128688
|
path,
|
|
@@ -128735,7 +128802,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128735
128802
|
filesByNameIgnoreCase.set(pathLowerCase, file);
|
|
128736
128803
|
}
|
|
128737
128804
|
}
|
|
128738
|
-
skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib && !ignoreNoDefaultLib;
|
|
128739
128805
|
if (!options.noResolve) {
|
|
128740
128806
|
processReferencedFiles(file, isDefaultLib);
|
|
128741
128807
|
processTypeReferenceDirectives(file);
|
|
@@ -128796,8 +128862,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128796
128862
|
processSourceFile(
|
|
128797
128863
|
resolveTripleslashReference(ref.fileName, file.fileName),
|
|
128798
128864
|
isDefaultLib,
|
|
128799
|
-
/*ignoreNoDefaultLib*/
|
|
128800
|
-
false,
|
|
128801
128865
|
/*packageId*/
|
|
128802
128866
|
void 0,
|
|
128803
128867
|
{ kind: 4 /* ReferenceFile */, file: file.path, index }
|
|
@@ -128838,8 +128902,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128838
128902
|
resolvedTypeReferenceDirective.resolvedFileName,
|
|
128839
128903
|
/*isDefaultLib*/
|
|
128840
128904
|
false,
|
|
128841
|
-
/*ignoreNoDefaultLib*/
|
|
128842
|
-
false,
|
|
128843
128905
|
resolvedTypeReferenceDirective.packageId,
|
|
128844
128906
|
reason
|
|
128845
128907
|
);
|
|
@@ -128859,13 +128921,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128859
128921
|
if (existing) return existing.actual;
|
|
128860
128922
|
const result = pathForLibFileWorker(libFileName);
|
|
128861
128923
|
(resolvedLibReferences ?? (resolvedLibReferences = /* @__PURE__ */ new Map())).set(libFileName, result);
|
|
128924
|
+
libFiles.add(toPath3(result.actual));
|
|
128862
128925
|
return result.actual;
|
|
128863
128926
|
}
|
|
128864
128927
|
function pathForLibFileWorker(libFileName) {
|
|
128865
128928
|
var _a2, _b2, _c2, _d2, _e2;
|
|
128866
128929
|
const existing = resolvedLibProcessing == null ? void 0 : resolvedLibProcessing.get(libFileName);
|
|
128867
128930
|
if (existing) return existing;
|
|
128868
|
-
if (options.libReplacement
|
|
128931
|
+
if (!options.libReplacement) {
|
|
128869
128932
|
const result2 = {
|
|
128870
128933
|
resolution: {
|
|
128871
128934
|
resolvedModule: void 0
|
|
@@ -128917,8 +128980,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128917
128980
|
pathForLibFile(libFileName),
|
|
128918
128981
|
/*isDefaultLib*/
|
|
128919
128982
|
true,
|
|
128920
|
-
/*ignoreNoDefaultLib*/
|
|
128921
|
-
true,
|
|
128922
128983
|
{ kind: 7 /* LibReferenceDirective */, file: file.path, index }
|
|
128923
128984
|
);
|
|
128924
128985
|
} else {
|
|
@@ -128966,8 +129027,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
128966
129027
|
resolvedFileName,
|
|
128967
129028
|
/*isDefaultLib*/
|
|
128968
129029
|
false,
|
|
128969
|
-
/*ignoreNoDefaultLib*/
|
|
128970
|
-
false,
|
|
128971
129030
|
{ kind: 3 /* Import */, file: file.path, index },
|
|
128972
129031
|
resolution.packageId
|
|
128973
129032
|
);
|
|
@@ -129071,10 +129130,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129071
129130
|
}
|
|
129072
129131
|
const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
|
|
129073
129132
|
commandLine.fileNames.forEach((fileName) => {
|
|
129074
|
-
if (isDeclarationFileName(fileName)) return;
|
|
129075
129133
|
const path = toPath3(fileName);
|
|
129076
129134
|
let outputDts;
|
|
129077
|
-
if (!fileExtensionIs(fileName, ".json" /* Json */)) {
|
|
129135
|
+
if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) {
|
|
129078
129136
|
if (!commandLine.options.outFile) {
|
|
129079
129137
|
outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
|
|
129080
129138
|
mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName });
|
|
@@ -129258,6 +129316,31 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129258
129316
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
129259
129317
|
}
|
|
129260
129318
|
}
|
|
129319
|
+
if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
|
|
129320
|
+
getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
|
|
129321
|
+
options.outFile)) {
|
|
129322
|
+
const dir = getCommonSourceDirectory2();
|
|
129323
|
+
const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
|
|
129324
|
+
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
129325
|
+
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
|
|
129326
|
+
createDiagnosticForOption(
|
|
129327
|
+
/*onKey*/
|
|
129328
|
+
true,
|
|
129329
|
+
options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
|
|
129330
|
+
!options.outFile && options.outDir ? "declarationDir" : void 0,
|
|
129331
|
+
chainDiagnosticMessages(
|
|
129332
|
+
chainDiagnosticMessages(
|
|
129333
|
+
/*details*/
|
|
129334
|
+
void 0,
|
|
129335
|
+
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
129336
|
+
),
|
|
129337
|
+
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,
|
|
129338
|
+
getBaseFileName(options.configFilePath),
|
|
129339
|
+
getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
|
|
129340
|
+
)
|
|
129341
|
+
);
|
|
129342
|
+
}
|
|
129343
|
+
}
|
|
129261
129344
|
if (options.checkJs && !getAllowJSCompilerOption(options)) {
|
|
129262
129345
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
|
|
129263
129346
|
}
|
|
@@ -129385,32 +129468,35 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129385
129468
|
const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */);
|
|
129386
129469
|
const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */;
|
|
129387
129470
|
if (mustBeRemoved || canBeSilenced) {
|
|
129388
|
-
fn((name, value, useInstead) => {
|
|
129471
|
+
fn((name, value, useInstead, related) => {
|
|
129389
129472
|
if (mustBeRemoved) {
|
|
129390
129473
|
if (value === void 0) {
|
|
129391
|
-
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name);
|
|
129474
|
+
createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name);
|
|
129392
129475
|
} else {
|
|
129393
|
-
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value);
|
|
129476
|
+
createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value);
|
|
129394
129477
|
}
|
|
129395
129478
|
} else {
|
|
129396
129479
|
if (value === void 0) {
|
|
129397
|
-
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);
|
|
129480
|
+
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);
|
|
129398
129481
|
} else {
|
|
129399
|
-
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);
|
|
129482
|
+
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);
|
|
129400
129483
|
}
|
|
129401
129484
|
}
|
|
129402
129485
|
});
|
|
129403
129486
|
}
|
|
129404
129487
|
}
|
|
129405
129488
|
function verifyDeprecatedCompilerOptions() {
|
|
129406
|
-
function createDiagnostic(name, value, useInstead, message, ...args) {
|
|
129489
|
+
function createDiagnostic(name, value, useInstead, related, message, ...args) {
|
|
129407
129490
|
if (useInstead) {
|
|
129408
|
-
|
|
129491
|
+
let details = chainDiagnosticMessages(
|
|
129409
129492
|
/*details*/
|
|
129410
129493
|
void 0,
|
|
129411
129494
|
Diagnostics.Use_0_instead,
|
|
129412
129495
|
useInstead
|
|
129413
129496
|
);
|
|
129497
|
+
if (related) {
|
|
129498
|
+
details = chainDiagnosticMessages(details, related);
|
|
129499
|
+
}
|
|
129414
129500
|
const chain = chainDiagnosticMessages(details, message, ...args);
|
|
129415
129501
|
createDiagnosticForOption(
|
|
129416
129502
|
/*onKey*/
|
|
@@ -129421,14 +129507,22 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129421
129507
|
chain
|
|
129422
129508
|
);
|
|
129423
129509
|
} else {
|
|
129510
|
+
let details;
|
|
129511
|
+
if (related) {
|
|
129512
|
+
details = chainDiagnosticMessages(
|
|
129513
|
+
/*details*/
|
|
129514
|
+
void 0,
|
|
129515
|
+
related
|
|
129516
|
+
);
|
|
129517
|
+
}
|
|
129518
|
+
const chain = chainDiagnosticMessages(details, message, ...args);
|
|
129424
129519
|
createDiagnosticForOption(
|
|
129425
129520
|
/*onKey*/
|
|
129426
129521
|
!value,
|
|
129427
129522
|
name,
|
|
129428
129523
|
/*option2*/
|
|
129429
129524
|
void 0,
|
|
129430
|
-
|
|
129431
|
-
...args
|
|
129525
|
+
chain
|
|
129432
129526
|
);
|
|
129433
129527
|
}
|
|
129434
129528
|
}
|
|
@@ -129481,12 +129575,28 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129481
129575
|
});
|
|
129482
129576
|
checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
|
|
129483
129577
|
if (options.moduleResolution === 2 /* Node10 */) {
|
|
129484
|
-
createDeprecatedDiagnostic(
|
|
129578
|
+
createDeprecatedDiagnostic(
|
|
129579
|
+
"moduleResolution",
|
|
129580
|
+
"node10",
|
|
129581
|
+
/*useInstead*/
|
|
129582
|
+
void 0,
|
|
129583
|
+
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
129584
|
+
);
|
|
129585
|
+
}
|
|
129586
|
+
if (options.baseUrl !== void 0) {
|
|
129587
|
+
createDeprecatedDiagnostic(
|
|
129588
|
+
"baseUrl",
|
|
129589
|
+
/*value*/
|
|
129590
|
+
void 0,
|
|
129591
|
+
/*useInstead*/
|
|
129592
|
+
void 0,
|
|
129593
|
+
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
129594
|
+
);
|
|
129485
129595
|
}
|
|
129486
129596
|
});
|
|
129487
129597
|
}
|
|
129488
129598
|
function verifyDeprecatedProjectReference(ref, parentFile, index) {
|
|
129489
|
-
function createDiagnostic(_name, _value, _useInstead, message, ...args) {
|
|
129599
|
+
function createDiagnostic(_name, _value, _useInstead, _related, message, ...args) {
|
|
129490
129600
|
createDiagnosticForReference(parentFile, index, message, ...args);
|
|
129491
129601
|
}
|
|
129492
129602
|
checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => {
|
|
@@ -130750,7 +130860,7 @@ function createBuilderProgramState(newProgram, oldState) {
|
|
|
130750
130860
|
}
|
|
130751
130861
|
if (canCopySemanticDiagnostics) {
|
|
130752
130862
|
if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) return;
|
|
130753
|
-
if (sourceFile
|
|
130863
|
+
if (newProgram.isSourceFileDefaultLibrary(sourceFile) && !copyLibFileDiagnostics) return;
|
|
130754
130864
|
const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
|
|
130755
130865
|
if (diagnostics) {
|
|
130756
130866
|
state.semanticDiagnosticsPerFile.set(
|
|
@@ -140441,7 +140551,7 @@ function isInsideJsxElementOrAttribute(sourceFile, position) {
|
|
|
140441
140551
|
if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 295 /* JsxExpression */) {
|
|
140442
140552
|
return true;
|
|
140443
140553
|
}
|
|
140444
|
-
if (token.kind ===
|
|
140554
|
+
if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 288 /* JsxClosingElement */) {
|
|
140445
140555
|
return true;
|
|
140446
140556
|
}
|
|
140447
140557
|
return false;
|
|
@@ -140469,7 +140579,7 @@ function isInJSXText(sourceFile, position) {
|
|
|
140469
140579
|
function isInsideJsxElement(sourceFile, position) {
|
|
140470
140580
|
function isInsideJsxElementTraversal(node) {
|
|
140471
140581
|
while (node) {
|
|
140472
|
-
if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */
|
|
140582
|
+
if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) {
|
|
140473
140583
|
node = node.parent;
|
|
140474
140584
|
} else if (node.kind === 285 /* JsxElement */) {
|
|
140475
140585
|
if (position > node.getStart(sourceFile)) return true;
|
|
@@ -144641,7 +144751,6 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
|
|
|
144641
144751
|
typeReferenceDirectives: [],
|
|
144642
144752
|
libReferenceDirectives: [],
|
|
144643
144753
|
amdDependencies: [],
|
|
144644
|
-
hasNoDefaultLib: void 0,
|
|
144645
144754
|
moduleName: void 0
|
|
144646
144755
|
};
|
|
144647
144756
|
const importedFiles = [];
|
|
@@ -144950,7 +145059,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
|
|
|
144950
145059
|
importedFiles.push(decl.ref);
|
|
144951
145060
|
}
|
|
144952
145061
|
}
|
|
144953
|
-
return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile:
|
|
145062
|
+
return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: false, ambientExternalModules: void 0 };
|
|
144954
145063
|
} else {
|
|
144955
145064
|
let ambientModuleNames;
|
|
144956
145065
|
if (ambientExternalModules) {
|
|
@@ -144965,7 +145074,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
|
|
|
144965
145074
|
}
|
|
144966
145075
|
}
|
|
144967
145076
|
}
|
|
144968
|
-
return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile:
|
|
145077
|
+
return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: false, ambientExternalModules: ambientModuleNames };
|
|
144969
145078
|
}
|
|
144970
145079
|
}
|
|
144971
145080
|
|
|
@@ -145339,8 +145448,7 @@ function transpileDeclaration(input, transpileOptions) {
|
|
|
145339
145448
|
true
|
|
145340
145449
|
);
|
|
145341
145450
|
}
|
|
145342
|
-
var barebonesLibContent =
|
|
145343
|
-
interface Boolean {}
|
|
145451
|
+
var barebonesLibContent = `interface Boolean {}
|
|
145344
145452
|
interface Function {}
|
|
145345
145453
|
interface CallableFunction {}
|
|
145346
145454
|
interface NewableFunction {}
|
|
@@ -145387,6 +145495,7 @@ function transpileWorker(input, transpileOptions, declaration) {
|
|
|
145387
145495
|
options.declaration = false;
|
|
145388
145496
|
options.declarationMap = false;
|
|
145389
145497
|
}
|
|
145498
|
+
options.noLib = !declaration;
|
|
145390
145499
|
const newLine = getNewLineCharacter(options);
|
|
145391
145500
|
const compilerHost = {
|
|
145392
145501
|
getSourceFile: (fileName) => fileName === normalizePath(inputFileName) ? sourceFile : fileName === normalizePath(barebonesLibName) ? barebonesLibSourceFile : void 0,
|
|
@@ -145434,8 +145543,7 @@ function transpileWorker(input, transpileOptions, declaration) {
|
|
|
145434
145543
|
}
|
|
145435
145544
|
let outputText;
|
|
145436
145545
|
let sourceMapText;
|
|
145437
|
-
const
|
|
145438
|
-
const program = createProgram(inputs, options, compilerHost);
|
|
145546
|
+
const program = createProgram([inputFileName], options, compilerHost);
|
|
145439
145547
|
if (transpileOptions.reportDiagnostics) {
|
|
145440
145548
|
addRange(
|
|
145441
145549
|
/*to*/
|
|
@@ -145504,7 +145612,7 @@ __export(ts_NavigateTo_exports, {
|
|
|
145504
145612
|
});
|
|
145505
145613
|
|
|
145506
145614
|
// src/services/navigateTo.ts
|
|
145507
|
-
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles) {
|
|
145615
|
+
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles, program) {
|
|
145508
145616
|
const patternMatcher = createPatternMatcher(searchValue);
|
|
145509
145617
|
if (!patternMatcher) return emptyArray;
|
|
145510
145618
|
const rawItems = [];
|
|
@@ -145514,26 +145622,26 @@ function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue
|
|
|
145514
145622
|
if (excludeDtsFiles && sourceFile.isDeclarationFile) {
|
|
145515
145623
|
continue;
|
|
145516
145624
|
}
|
|
145517
|
-
if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile)) {
|
|
145625
|
+
if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile, program)) {
|
|
145518
145626
|
continue;
|
|
145519
145627
|
}
|
|
145520
145628
|
sourceFile.getNamedDeclarations().forEach((declarations, name) => {
|
|
145521
|
-
getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems);
|
|
145629
|
+
getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems, program);
|
|
145522
145630
|
});
|
|
145523
145631
|
}
|
|
145524
145632
|
rawItems.sort(compareNavigateToItems);
|
|
145525
145633
|
return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem);
|
|
145526
145634
|
}
|
|
145527
|
-
function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile) {
|
|
145528
|
-
return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || file
|
|
145635
|
+
function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile, program) {
|
|
145636
|
+
return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || program.isSourceFileDefaultLibrary(file));
|
|
145529
145637
|
}
|
|
145530
|
-
function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems) {
|
|
145638
|
+
function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems, program) {
|
|
145531
145639
|
const match = patternMatcher.getMatchForLastSegmentOfPattern(name);
|
|
145532
145640
|
if (!match) {
|
|
145533
145641
|
return;
|
|
145534
145642
|
}
|
|
145535
145643
|
for (const declaration of declarations) {
|
|
145536
|
-
if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile)) continue;
|
|
145644
|
+
if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile, program)) continue;
|
|
145537
145645
|
if (patternMatcher.patternContainsDots) {
|
|
145538
145646
|
const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name);
|
|
145539
145647
|
if (fullMatch) {
|
|
@@ -145544,7 +145652,7 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke
|
|
|
145544
145652
|
}
|
|
145545
145653
|
}
|
|
145546
145654
|
}
|
|
145547
|
-
function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) {
|
|
145655
|
+
function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile, program) {
|
|
145548
145656
|
var _a;
|
|
145549
145657
|
switch (declaration.kind) {
|
|
145550
145658
|
case 274 /* ImportClause */:
|
|
@@ -145552,7 +145660,7 @@ function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile
|
|
|
145552
145660
|
case 272 /* ImportEqualsDeclaration */:
|
|
145553
145661
|
const importer = checker.getSymbolAtLocation(declaration.name);
|
|
145554
145662
|
const imported = checker.getAliasedSymbol(importer);
|
|
145555
|
-
return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile)));
|
|
145663
|
+
return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile, program)));
|
|
145556
145664
|
default:
|
|
145557
145665
|
return true;
|
|
145558
145666
|
}
|
|
@@ -151911,9 +152019,7 @@ function createChildren(node, sourceFile) {
|
|
|
151911
152019
|
});
|
|
151912
152020
|
return children;
|
|
151913
152021
|
}
|
|
151914
|
-
const languageVariant = (sourceFile == null ? void 0 : sourceFile.languageVariant) ?? 0 /* Standard */;
|
|
151915
152022
|
scanner.setText((sourceFile || node.getSourceFile()).text);
|
|
151916
|
-
scanner.setLanguageVariant(languageVariant);
|
|
151917
152023
|
let pos = node.pos;
|
|
151918
152024
|
const processNode = (child) => {
|
|
151919
152025
|
addSyntheticNodes(children, pos, child.pos, node);
|
|
@@ -151930,7 +152036,6 @@ function createChildren(node, sourceFile) {
|
|
|
151930
152036
|
node.forEachChild(processNode, processNodes);
|
|
151931
152037
|
addSyntheticNodes(children, pos, node.end, node);
|
|
151932
152038
|
scanner.setText(void 0);
|
|
151933
|
-
scanner.setLanguageVariant(0 /* Standard */);
|
|
151934
152039
|
return children;
|
|
151935
152040
|
}
|
|
151936
152041
|
function addSyntheticNodes(nodes, pos, end, parent2) {
|
|
@@ -153360,7 +153465,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
153360
153465
|
function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false, excludeLibFiles = false) {
|
|
153361
153466
|
synchronizeHostData();
|
|
153362
153467
|
const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles();
|
|
153363
|
-
return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles);
|
|
153468
|
+
return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles, program);
|
|
153364
153469
|
}
|
|
153365
153470
|
function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) {
|
|
153366
153471
|
synchronizeHostData();
|
|
@@ -166743,6 +166848,7 @@ __export(ts_Completions_exports, {
|
|
|
166743
166848
|
getCompletionEntryDetails: () => getCompletionEntryDetails,
|
|
166744
166849
|
getCompletionEntrySymbol: () => getCompletionEntrySymbol,
|
|
166745
166850
|
getCompletionsAtPosition: () => getCompletionsAtPosition,
|
|
166851
|
+
getConstraintOfTypeArgumentProperty: () => getConstraintOfTypeArgumentProperty,
|
|
166746
166852
|
getDefaultCommitCharacters: () => getDefaultCommitCharacters,
|
|
166747
166853
|
getPropertiesForObjectExpression: () => getPropertiesForObjectExpression,
|
|
166748
166854
|
moduleSpecifierResolutionCacheAttemptLimit: () => moduleSpecifierResolutionCacheAttemptLimit,
|
|
@@ -167644,7 +167750,7 @@ function getJsxClosingTagCompletion(location, sourceFile) {
|
|
|
167644
167750
|
switch (node.kind) {
|
|
167645
167751
|
case 288 /* JsxClosingElement */:
|
|
167646
167752
|
return true;
|
|
167647
|
-
case
|
|
167753
|
+
case 44 /* SlashToken */:
|
|
167648
167754
|
case 32 /* GreaterThanToken */:
|
|
167649
167755
|
case 80 /* Identifier */:
|
|
167650
167756
|
case 212 /* PropertyAccessExpression */:
|
|
@@ -168980,7 +169086,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
168980
169086
|
location = currentToken;
|
|
168981
169087
|
}
|
|
168982
169088
|
break;
|
|
168983
|
-
case
|
|
169089
|
+
case 44 /* SlashToken */:
|
|
168984
169090
|
if (currentToken.parent.kind === 286 /* JsxSelfClosingElement */) {
|
|
168985
169091
|
location = currentToken;
|
|
168986
169092
|
}
|
|
@@ -168989,7 +169095,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
168989
169095
|
}
|
|
168990
169096
|
switch (parent2.kind) {
|
|
168991
169097
|
case 288 /* JsxClosingElement */:
|
|
168992
|
-
if (contextToken.kind ===
|
|
169098
|
+
if (contextToken.kind === 44 /* SlashToken */) {
|
|
168993
169099
|
isStartingCloseTag = true;
|
|
168994
169100
|
location = contextToken;
|
|
168995
169101
|
}
|
|
@@ -169067,13 +169173,13 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
169067
169173
|
}
|
|
169068
169174
|
}
|
|
169069
169175
|
log("getCompletionData: Semantic work: " + (timestamp() - semanticStart));
|
|
169070
|
-
const
|
|
169176
|
+
const contextualTypeOrConstraint = previousToken && (getContextualType(previousToken, position, sourceFile, typeChecker) ?? getConstraintOfTypeArgumentProperty(previousToken, typeChecker));
|
|
169071
169177
|
const isLiteralExpected = !tryCast(previousToken, isStringLiteralLike) && !isJsxIdentifierExpected;
|
|
169072
169178
|
const literals = !isLiteralExpected ? [] : mapDefined(
|
|
169073
|
-
|
|
169179
|
+
contextualTypeOrConstraint && (contextualTypeOrConstraint.isUnion() ? contextualTypeOrConstraint.types : [contextualTypeOrConstraint]),
|
|
169074
169180
|
(t) => t.isLiteral() && !(t.flags & 1024 /* EnumLiteral */) ? t.value : void 0
|
|
169075
169181
|
);
|
|
169076
|
-
const recommendedCompletion = previousToken &&
|
|
169182
|
+
const recommendedCompletion = previousToken && contextualTypeOrConstraint && getRecommendedCompletion(previousToken, contextualTypeOrConstraint, typeChecker);
|
|
169077
169183
|
return {
|
|
169078
169184
|
kind: 0 /* Data */,
|
|
169079
169185
|
symbols,
|
|
@@ -170579,18 +170685,26 @@ function tryGetTypeLiteralNode(node) {
|
|
|
170579
170685
|
}
|
|
170580
170686
|
function getConstraintOfTypeArgumentProperty(node, checker) {
|
|
170581
170687
|
if (!node) return void 0;
|
|
170582
|
-
if (isTypeNode(node)
|
|
170583
|
-
|
|
170688
|
+
if (isTypeNode(node)) {
|
|
170689
|
+
const constraint = checker.getTypeArgumentConstraint(node);
|
|
170690
|
+
if (constraint) return constraint;
|
|
170584
170691
|
}
|
|
170585
170692
|
const t = getConstraintOfTypeArgumentProperty(node.parent, checker);
|
|
170586
170693
|
if (!t) return void 0;
|
|
170587
170694
|
switch (node.kind) {
|
|
170588
170695
|
case 172 /* PropertySignature */:
|
|
170589
170696
|
return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName);
|
|
170697
|
+
case 59 /* ColonToken */:
|
|
170698
|
+
if (node.parent.kind === 172 /* PropertySignature */) {
|
|
170699
|
+
return t;
|
|
170700
|
+
}
|
|
170701
|
+
break;
|
|
170590
170702
|
case 194 /* IntersectionType */:
|
|
170591
170703
|
case 188 /* TypeLiteral */:
|
|
170592
170704
|
case 193 /* UnionType */:
|
|
170593
170705
|
return t;
|
|
170706
|
+
case 23 /* OpenBracketToken */:
|
|
170707
|
+
return checker.getElementTypeOfArrayType(t);
|
|
170594
170708
|
}
|
|
170595
170709
|
}
|
|
170596
170710
|
function isFromObjectTypeDeclaration(node) {
|
|
@@ -170610,7 +170724,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) {
|
|
|
170610
170724
|
case "<":
|
|
170611
170725
|
return !!contextToken && contextToken.kind === 30 /* LessThanToken */ && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent));
|
|
170612
170726
|
case "/":
|
|
170613
|
-
return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind ===
|
|
170727
|
+
return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent));
|
|
170614
170728
|
case " ":
|
|
170615
170729
|
return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */;
|
|
170616
170730
|
default:
|
|
@@ -171112,7 +171226,12 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, program,
|
|
|
171112
171226
|
}
|
|
171113
171227
|
function fromUnionableLiteralType(grandParent) {
|
|
171114
171228
|
switch (grandParent.kind) {
|
|
171229
|
+
case 214 /* CallExpression */:
|
|
171115
171230
|
case 234 /* ExpressionWithTypeArguments */:
|
|
171231
|
+
case 287 /* JsxOpeningElement */:
|
|
171232
|
+
case 286 /* JsxSelfClosingElement */:
|
|
171233
|
+
case 215 /* NewExpression */:
|
|
171234
|
+
case 216 /* TaggedTemplateExpression */:
|
|
171116
171235
|
case 184 /* TypeReference */: {
|
|
171117
171236
|
const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);
|
|
171118
171237
|
if (typeArgument) {
|
|
@@ -171126,6 +171245,8 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, program,
|
|
|
171126
171245
|
return void 0;
|
|
171127
171246
|
}
|
|
171128
171247
|
return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
|
|
171248
|
+
case 172 /* PropertySignature */:
|
|
171249
|
+
return { kind: 2 /* Types */, types: getStringLiteralTypes(getConstraintOfTypeArgumentProperty(grandParent, typeChecker)), isNewIdentifier: false };
|
|
171129
171250
|
case 193 /* UnionType */: {
|
|
171130
171251
|
const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent));
|
|
171131
171252
|
if (!result) {
|
|
@@ -183919,6 +184040,7 @@ __export(ts_exports2, {
|
|
|
183919
184040
|
getCommonSourceDirectory: () => getCommonSourceDirectory,
|
|
183920
184041
|
getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
|
|
183921
184042
|
getCompilerOptionValue: () => getCompilerOptionValue,
|
|
184043
|
+
getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
|
|
183922
184044
|
getConditions: () => getConditions,
|
|
183923
184045
|
getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
|
|
183924
184046
|
getConstantValue: () => getConstantValue,
|
|
@@ -189772,8 +189894,8 @@ function forEachAnyProjectReferenceKind(project, cb, cbProjectRef, cbPotentialPr
|
|
|
189772
189894
|
return project.getCurrentProgram() ? project.forEachResolvedProjectReference(cb) : project.initialLoadPending ? forEachPotentialProjectReference(project, cbPotentialProjectRef) : forEach(project.getProjectReferences(), cbProjectRef);
|
|
189773
189895
|
}
|
|
189774
189896
|
function callbackRefProject(project, cb, refPath) {
|
|
189775
|
-
const refProject = refPath
|
|
189776
|
-
return refProject
|
|
189897
|
+
const refProject = refPath && project.projectService.configuredProjects.get(refPath);
|
|
189898
|
+
return refProject && cb(refProject);
|
|
189777
189899
|
}
|
|
189778
189900
|
function forEachReferencedProject(project, cb) {
|
|
189779
189901
|
return forEachAnyProjectReferenceKind(
|
|
@@ -198681,6 +198803,7 @@ if (typeof console !== "undefined") {
|
|
|
198681
198803
|
getCommonSourceDirectory,
|
|
198682
198804
|
getCommonSourceDirectoryOfConfig,
|
|
198683
198805
|
getCompilerOptionValue,
|
|
198806
|
+
getComputedCommonSourceDirectory,
|
|
198684
198807
|
getConditions,
|
|
198685
198808
|
getConfigFileParsingDiagnostics,
|
|
198686
198809
|
getConstantValue,
|