typescript 5.0.0-dev.20221214 → 5.0.0-dev.20221216
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 +262 -173
- package/lib/tsserver.js +309 -208
- package/lib/tsserverlibrary.d.ts +2 -3
- package/lib/tsserverlibrary.js +310 -210
- package/lib/typescript.d.ts +2 -3
- package/lib/typescript.js +308 -209
- package/lib/typingsInstaller.js +58 -40
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
26
|
+
var version = `${versionMajorMinor}.0-dev.20221216`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -3714,7 +3714,7 @@ function diagnosticCategoryName(d, lowerCase = true) {
|
|
|
3714
3714
|
}
|
|
3715
3715
|
var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => {
|
|
3716
3716
|
ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic";
|
|
3717
|
-
ModuleResolutionKind2[ModuleResolutionKind2["
|
|
3717
|
+
ModuleResolutionKind2[ModuleResolutionKind2["Node10"] = 2] = "Node10";
|
|
3718
3718
|
ModuleResolutionKind2[ModuleResolutionKind2["Node16"] = 3] = "Node16";
|
|
3719
3719
|
ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext";
|
|
3720
3720
|
ModuleResolutionKind2[ModuleResolutionKind2["Bundler"] = 100] = "Bundler";
|
|
@@ -6425,7 +6425,7 @@ var Diagnostics = {
|
|
|
6425
6425
|
Its_element_type_0_is_not_a_valid_JSX_element: diag(2789, 1 /* Error */, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."),
|
|
6426
6426
|
The_operand_of_a_delete_operator_must_be_optional: diag(2790, 1 /* Error */, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."),
|
|
6427
6427
|
Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: diag(2791, 1 /* Error */, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),
|
|
6428
|
-
|
|
6428
|
+
Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option: diag(2792, 1 /* Error */, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),
|
|
6429
6429
|
The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: diag(2793, 1 /* Error */, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),
|
|
6430
6430
|
Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: diag(2794, 1 /* Error */, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),
|
|
6431
6431
|
The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, 1 /* Error */, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),
|
|
@@ -6607,7 +6607,7 @@ var Diagnostics = {
|
|
|
6607
6607
|
Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(5067, 1 /* Error */, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),
|
|
6608
6608
|
Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, 1 /* Error */, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),
|
|
6609
6609
|
Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, 1 /* Error */, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),
|
|
6610
|
-
|
|
6610
|
+
Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic: diag(5070, 1 /* Error */, "Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070", "Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),
|
|
6611
6611
|
Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext: diag(5071, 1 /* Error */, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."),
|
|
6612
6612
|
Unknown_build_option_0: diag(5072, 1 /* Error */, "Unknown_build_option_0_5072", "Unknown build option '{0}'."),
|
|
6613
6613
|
Build_option_0_requires_a_value_of_type_1: diag(5073, 1 /* Error */, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."),
|
|
@@ -6638,6 +6638,9 @@ var Diagnostics = {
|
|
|
6638
6638
|
Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
|
|
6639
6639
|
Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(5099, 1 /* Error */, "Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Aster_5099", `Import assignment is not allowed when 'moduleResolution' is set to 'bundler'. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),
|
|
6640
6640
|
Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_bundler_Consider_using_export_default_or_another_module_format_instead: diag(5100, 1 /* Error */, "Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_bundler_Consider_using_export_defau_5100", "Export assignment cannot be used when 'moduleResolution' is set to 'bundler'. Consider using 'export default' or another module format instead."),
|
|
6641
|
+
Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify 'ignoreDeprecations: "{2}"' to silence this error.`),
|
|
6642
|
+
Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."),
|
|
6643
|
+
Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."),
|
|
6641
6644
|
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."),
|
|
6642
6645
|
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."),
|
|
6643
6646
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -10103,10 +10106,10 @@ function isAssertionKey(node) {
|
|
|
10103
10106
|
return isStringLiteral(node) || isIdentifier(node);
|
|
10104
10107
|
}
|
|
10105
10108
|
function isGeneratedIdentifier(node) {
|
|
10106
|
-
return isIdentifier(node) &&
|
|
10109
|
+
return isIdentifier(node) && node.autoGenerate !== void 0;
|
|
10107
10110
|
}
|
|
10108
10111
|
function isGeneratedPrivateIdentifier(node) {
|
|
10109
|
-
return isPrivateIdentifier(node) &&
|
|
10112
|
+
return isPrivateIdentifier(node) && node.autoGenerate !== void 0;
|
|
10110
10113
|
}
|
|
10111
10114
|
function isPrivateIdentifierClassElementDeclaration(node) {
|
|
10112
10115
|
return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name);
|
|
@@ -11355,7 +11358,7 @@ function tryGetTextOfPropertyName(name) {
|
|
|
11355
11358
|
switch (name.kind) {
|
|
11356
11359
|
case 79 /* Identifier */:
|
|
11357
11360
|
case 80 /* PrivateIdentifier */:
|
|
11358
|
-
return name.
|
|
11361
|
+
return name.autoGenerate ? void 0 : name.escapedText;
|
|
11359
11362
|
case 10 /* StringLiteral */:
|
|
11360
11363
|
case 8 /* NumericLiteral */:
|
|
11361
11364
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
@@ -14412,7 +14415,7 @@ function closeFileWatcher(watcher) {
|
|
|
14412
14415
|
watcher.close();
|
|
14413
14416
|
}
|
|
14414
14417
|
function getCheckFlags(symbol) {
|
|
14415
|
-
return symbol.flags & 33554432 /* Transient */ ? symbol.checkFlags : 0;
|
|
14418
|
+
return symbol.flags & 33554432 /* Transient */ ? symbol.links.checkFlags : 0;
|
|
14416
14419
|
}
|
|
14417
14420
|
function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) {
|
|
14418
14421
|
if (s.valueDeclaration) {
|
|
@@ -14421,7 +14424,7 @@ function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) {
|
|
|
14421
14424
|
return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */;
|
|
14422
14425
|
}
|
|
14423
14426
|
if (getCheckFlags(s) & 6 /* Synthetic */) {
|
|
14424
|
-
const checkFlags = s.checkFlags;
|
|
14427
|
+
const checkFlags = s.links.checkFlags;
|
|
14425
14428
|
const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 8 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 4 /* Public */ : 16 /* Protected */;
|
|
14426
14429
|
const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 32 /* Static */ : 0;
|
|
14427
14430
|
return accessModifier | staticModifier;
|
|
@@ -14620,9 +14623,16 @@ function Symbol4(flags, name) {
|
|
|
14620
14623
|
this.escapedName = name;
|
|
14621
14624
|
this.declarations = void 0;
|
|
14622
14625
|
this.valueDeclaration = void 0;
|
|
14623
|
-
this.id =
|
|
14624
|
-
this.mergeId =
|
|
14626
|
+
this.id = 0;
|
|
14627
|
+
this.mergeId = 0;
|
|
14625
14628
|
this.parent = void 0;
|
|
14629
|
+
this.members = void 0;
|
|
14630
|
+
this.exports = void 0;
|
|
14631
|
+
this.exportSymbol = void 0;
|
|
14632
|
+
this.constEnumOnlyModule = void 0;
|
|
14633
|
+
this.isReferenced = void 0;
|
|
14634
|
+
this.isAssigned = void 0;
|
|
14635
|
+
this.links = void 0;
|
|
14626
14636
|
}
|
|
14627
14637
|
function Type3(checker, flags) {
|
|
14628
14638
|
this.flags = flags;
|
|
@@ -14928,7 +14938,7 @@ function getEmitModuleResolutionKind(compilerOptions) {
|
|
|
14928
14938
|
if (moduleResolution === void 0) {
|
|
14929
14939
|
switch (getEmitModuleKind(compilerOptions)) {
|
|
14930
14940
|
case 1 /* CommonJS */:
|
|
14931
|
-
moduleResolution = 2 /*
|
|
14941
|
+
moduleResolution = 2 /* Node10 */;
|
|
14932
14942
|
break;
|
|
14933
14943
|
case 100 /* Node16 */:
|
|
14934
14944
|
moduleResolution = 3 /* Node16 */;
|
|
@@ -17225,15 +17235,23 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
17225
17235
|
const node = baseFactory2.createBaseIdentifierNode(79 /* Identifier */);
|
|
17226
17236
|
node.originalKeywordKind = originalKeywordKind;
|
|
17227
17237
|
node.escapedText = escapedText;
|
|
17228
|
-
node.
|
|
17238
|
+
node.autoGenerate = void 0;
|
|
17239
|
+
node.typeArguments = void 0;
|
|
17240
|
+
node.hasExtendedUnicodeEscape = void 0;
|
|
17241
|
+
node.jsDoc = void 0;
|
|
17242
|
+
node.jsDocCache = void 0;
|
|
17243
|
+
node.flowNode = void 0;
|
|
17244
|
+
node.symbol = void 0;
|
|
17229
17245
|
return node;
|
|
17230
17246
|
}
|
|
17231
17247
|
function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
17232
17248
|
const node = createBaseIdentifier(escapeLeadingUnderscores(text), void 0);
|
|
17233
|
-
node.
|
|
17234
|
-
|
|
17235
|
-
|
|
17236
|
-
|
|
17249
|
+
node.autoGenerate = {
|
|
17250
|
+
flags: autoGenerateFlags,
|
|
17251
|
+
id: nextAutoGenerateId,
|
|
17252
|
+
prefix,
|
|
17253
|
+
suffix
|
|
17254
|
+
};
|
|
17237
17255
|
nextAutoGenerateId++;
|
|
17238
17256
|
return node;
|
|
17239
17257
|
}
|
|
@@ -17247,10 +17265,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
17247
17265
|
const node = createBaseIdentifier(escapeLeadingUnderscores(text), originalKeywordKind);
|
|
17248
17266
|
node.typeArguments = asNodeArray(typeArguments);
|
|
17249
17267
|
node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
|
|
17250
|
-
node.jsDoc = void 0;
|
|
17251
|
-
node.jsDocCache = void 0;
|
|
17252
|
-
node.flowNode = void 0;
|
|
17253
|
-
node.symbol = void 0;
|
|
17254
17268
|
if (node.originalKeywordKind === 133 /* AwaitKeyword */) {
|
|
17255
17269
|
node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */;
|
|
17256
17270
|
}
|
|
@@ -17295,7 +17309,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
17295
17309
|
function createBasePrivateIdentifier(escapedText) {
|
|
17296
17310
|
const node = baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */);
|
|
17297
17311
|
node.escapedText = escapedText;
|
|
17298
|
-
node.
|
|
17312
|
+
node.autoGenerate = void 0;
|
|
17299
17313
|
node.transformFlags |= 16777216 /* ContainsClassFields */;
|
|
17300
17314
|
return node;
|
|
17301
17315
|
}
|
|
@@ -17306,10 +17320,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
17306
17320
|
}
|
|
17307
17321
|
function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
17308
17322
|
const node = createBasePrivateIdentifier(escapeLeadingUnderscores(text));
|
|
17309
|
-
node.
|
|
17310
|
-
|
|
17311
|
-
|
|
17312
|
-
|
|
17323
|
+
node.autoGenerate = {
|
|
17324
|
+
flags: autoGenerateFlags,
|
|
17325
|
+
id: nextAutoGenerateId,
|
|
17326
|
+
prefix,
|
|
17327
|
+
suffix
|
|
17328
|
+
};
|
|
17313
17329
|
nextAutoGenerateId++;
|
|
17314
17330
|
return node;
|
|
17315
17331
|
}
|
|
@@ -20102,10 +20118,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20102
20118
|
function cloneGeneratedIdentifier(node) {
|
|
20103
20119
|
const clone2 = createBaseIdentifier(node.escapedText, void 0);
|
|
20104
20120
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
20105
|
-
clone2.
|
|
20106
|
-
clone2.autoGenerateId = node.autoGenerateId;
|
|
20107
|
-
clone2.autoGeneratePrefix = node.autoGeneratePrefix;
|
|
20108
|
-
clone2.autoGenerateSuffix = node.autoGenerateSuffix;
|
|
20121
|
+
clone2.autoGenerate = { ...node.autoGenerate };
|
|
20109
20122
|
clone2.transformFlags = node.transformFlags;
|
|
20110
20123
|
setOriginalNode(clone2, node);
|
|
20111
20124
|
return clone2;
|
|
@@ -20126,10 +20139,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20126
20139
|
function cloneGeneratedPrivateIdentifier(node) {
|
|
20127
20140
|
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
20128
20141
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
20129
|
-
clone2.
|
|
20130
|
-
clone2.autoGenerateId = node.autoGenerateId;
|
|
20131
|
-
clone2.autoGeneratePrefix = node.autoGeneratePrefix;
|
|
20132
|
-
clone2.autoGenerateSuffix = node.autoGenerateSuffix;
|
|
20142
|
+
clone2.autoGenerate = { ...node.autoGenerate };
|
|
20133
20143
|
clone2.transformFlags = node.transformFlags;
|
|
20134
20144
|
setOriginalNode(clone2, node);
|
|
20135
20145
|
return clone2;
|
|
@@ -23328,13 +23338,13 @@ function elideNodes(factory2, nodes) {
|
|
|
23328
23338
|
return setTextRange(factory2.createNodeArray([], nodes.hasTrailingComma), nodes);
|
|
23329
23339
|
}
|
|
23330
23340
|
function getNodeForGeneratedName(name) {
|
|
23331
|
-
if (name.
|
|
23332
|
-
const autoGenerateId = name.
|
|
23341
|
+
if (name.autoGenerate.flags & 4 /* Node */) {
|
|
23342
|
+
const autoGenerateId = name.autoGenerate.id;
|
|
23333
23343
|
let node = name;
|
|
23334
23344
|
let original = node.original;
|
|
23335
23345
|
while (original) {
|
|
23336
23346
|
node = original;
|
|
23337
|
-
if (isMemberName(node) && !!(node.
|
|
23347
|
+
if (isMemberName(node) && (node.autoGenerate === void 0 || !!(node.autoGenerate.flags & 4 /* Node */) && node.autoGenerate.id !== autoGenerateId)) {
|
|
23338
23348
|
break;
|
|
23339
23349
|
}
|
|
23340
23350
|
original = node.original;
|
|
@@ -31133,12 +31143,14 @@ var commandOptionsWithoutBuild = [
|
|
|
31133
31143
|
{
|
|
31134
31144
|
name: "moduleResolution",
|
|
31135
31145
|
type: new Map(getEntries({
|
|
31136
|
-
|
|
31146
|
+
node10: 2 /* Node10 */,
|
|
31147
|
+
node: 2 /* Node10 */,
|
|
31137
31148
|
classic: 1 /* Classic */,
|
|
31138
31149
|
node16: 3 /* Node16 */,
|
|
31139
31150
|
nodenext: 99 /* NodeNext */,
|
|
31140
31151
|
bundler: 100 /* Bundler */
|
|
31141
31152
|
})),
|
|
31153
|
+
deprecatedKeys: /* @__PURE__ */ new Set(["node"]),
|
|
31142
31154
|
affectsModuleResolution: true,
|
|
31143
31155
|
paramType: Diagnostics.STRATEGY,
|
|
31144
31156
|
category: Diagnostics.Modules,
|
|
@@ -31658,6 +31670,11 @@ var commandOptionsWithoutBuild = [
|
|
|
31658
31670
|
description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
|
|
31659
31671
|
category: Diagnostics.Language_and_Environment,
|
|
31660
31672
|
defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules
|
|
31673
|
+
},
|
|
31674
|
+
{
|
|
31675
|
+
name: "ignoreDeprecations",
|
|
31676
|
+
type: "string",
|
|
31677
|
+
defaultValueDescription: void 0
|
|
31661
31678
|
}
|
|
31662
31679
|
];
|
|
31663
31680
|
var optionDeclarations = [
|
|
@@ -31782,8 +31799,9 @@ function createCompilerDiagnosticForInvalidCustomType(opt) {
|
|
|
31782
31799
|
return createDiagnosticForInvalidCustomType(opt, createCompilerDiagnostic);
|
|
31783
31800
|
}
|
|
31784
31801
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
31785
|
-
const namesOfType = arrayFrom(opt.type.keys())
|
|
31786
|
-
|
|
31802
|
+
const namesOfType = arrayFrom(opt.type.keys());
|
|
31803
|
+
const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((key) => `'${key}'`).join(", ");
|
|
31804
|
+
return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);
|
|
31787
31805
|
}
|
|
31788
31806
|
function parseCustomTypeOption(opt, value, errors) {
|
|
31789
31807
|
return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
|
|
@@ -33009,7 +33027,7 @@ function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiag
|
|
|
33009
33027
|
}
|
|
33010
33028
|
return extendedConfigPath;
|
|
33011
33029
|
}
|
|
33012
|
-
const resolved = nodeModuleNameResolver(extendedConfig, combinePaths(basePath, "tsconfig.json"), { moduleResolution: 2 /*
|
|
33030
|
+
const resolved = nodeModuleNameResolver(extendedConfig, combinePaths(basePath, "tsconfig.json"), { moduleResolution: 2 /* Node10 */ }, host, void 0, void 0, true);
|
|
33013
33031
|
if (resolved.resolvedModule) {
|
|
33014
33032
|
return resolved.resolvedModule.resolvedFileName;
|
|
33015
33033
|
}
|
|
@@ -34145,7 +34163,7 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
34145
34163
|
if (moduleResolution === void 0) {
|
|
34146
34164
|
switch (getEmitModuleKind(compilerOptions)) {
|
|
34147
34165
|
case 1 /* CommonJS */:
|
|
34148
|
-
moduleResolution = 2 /*
|
|
34166
|
+
moduleResolution = 2 /* Node10 */;
|
|
34149
34167
|
break;
|
|
34150
34168
|
case 100 /* Node16 */:
|
|
34151
34169
|
moduleResolution = 3 /* Node16 */;
|
|
@@ -34173,7 +34191,7 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
34173
34191
|
case 99 /* NodeNext */:
|
|
34174
34192
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
34175
34193
|
break;
|
|
34176
|
-
case 2 /*
|
|
34194
|
+
case 2 /* Node10 */:
|
|
34177
34195
|
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
34178
34196
|
break;
|
|
34179
34197
|
case 1 /* Classic */:
|
|
@@ -34362,7 +34380,7 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
34362
34380
|
0 /* None */,
|
|
34363
34381
|
moduleName,
|
|
34364
34382
|
initialDir,
|
|
34365
|
-
{ moduleResolution: 2 /*
|
|
34383
|
+
{ moduleResolution: 2 /* Node10 */, allowJs: true },
|
|
34366
34384
|
host,
|
|
34367
34385
|
void 0,
|
|
34368
34386
|
2 /* JavaScript */,
|
|
@@ -34415,7 +34433,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
34415
34433
|
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
|
|
34416
34434
|
}
|
|
34417
34435
|
let result;
|
|
34418
|
-
if (getEmitModuleResolutionKind(compilerOptions) === 2 /*
|
|
34436
|
+
if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) {
|
|
34419
34437
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
34420
34438
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
34421
34439
|
result = priorityExtensions && tryResolve(priorityExtensions) || secondaryExtensions && tryResolve(secondaryExtensions) || void 0;
|
|
@@ -38991,8 +39009,8 @@ var intrinsicTypeKinds = new Map(getEntries({
|
|
|
38991
39009
|
Capitalize: 2 /* Capitalize */,
|
|
38992
39010
|
Uncapitalize: 3 /* Uncapitalize */
|
|
38993
39011
|
}));
|
|
38994
|
-
|
|
38995
|
-
}
|
|
39012
|
+
var SymbolLinks = class {
|
|
39013
|
+
};
|
|
38996
39014
|
function NodeLinks() {
|
|
38997
39015
|
this.flags = 0 /* None */;
|
|
38998
39016
|
}
|
|
@@ -39847,7 +39865,8 @@ function createTypeChecker(host) {
|
|
|
39847
39865
|
function createSymbol(flags, name, checkFlags) {
|
|
39848
39866
|
symbolCount++;
|
|
39849
39867
|
const symbol = new Symbol12(flags | 33554432 /* Transient */, name);
|
|
39850
|
-
symbol.
|
|
39868
|
+
symbol.links = new SymbolLinks();
|
|
39869
|
+
symbol.links.checkFlags = checkFlags || 0 /* None */;
|
|
39851
39870
|
return symbol;
|
|
39852
39871
|
}
|
|
39853
39872
|
function getExcludedSymbolFlags(flags) {
|
|
@@ -40072,10 +40091,11 @@ function createTypeChecker(host) {
|
|
|
40072
40091
|
}
|
|
40073
40092
|
}
|
|
40074
40093
|
function getSymbolLinks(symbol) {
|
|
40094
|
+
var _a2;
|
|
40075
40095
|
if (symbol.flags & 33554432 /* Transient */)
|
|
40076
|
-
return symbol;
|
|
40096
|
+
return symbol.links;
|
|
40077
40097
|
const id = getSymbolId(symbol);
|
|
40078
|
-
return symbolLinks[id]
|
|
40098
|
+
return (_a2 = symbolLinks[id]) != null ? _a2 : symbolLinks[id] = new SymbolLinks();
|
|
40079
40099
|
}
|
|
40080
40100
|
function getNodeLinks(node) {
|
|
40081
40101
|
const nodeId = getNodeId(node);
|
|
@@ -41609,7 +41629,7 @@ function createTypeChecker(host) {
|
|
|
41609
41629
|
}
|
|
41610
41630
|
function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) {
|
|
41611
41631
|
const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
|
|
41612
|
-
const errorMessage = isClassic ? Diagnostics.
|
|
41632
|
+
const 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;
|
|
41613
41633
|
return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage);
|
|
41614
41634
|
}
|
|
41615
41635
|
function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation = false) {
|
|
@@ -41875,8 +41895,8 @@ function createTypeChecker(host) {
|
|
|
41875
41895
|
const result = createSymbol(symbol.flags, symbol.escapedName);
|
|
41876
41896
|
result.declarations = symbol.declarations ? symbol.declarations.slice() : [];
|
|
41877
41897
|
result.parent = symbol.parent;
|
|
41878
|
-
result.target = symbol;
|
|
41879
|
-
result.originatingImport = referenceParent;
|
|
41898
|
+
result.links.target = symbol;
|
|
41899
|
+
result.links.originatingImport = referenceParent;
|
|
41880
41900
|
if (symbol.valueDeclaration)
|
|
41881
41901
|
result.valueDeclaration = symbol.valueDeclaration;
|
|
41882
41902
|
if (symbol.constEnumOnlyModule)
|
|
@@ -41886,7 +41906,7 @@ function createTypeChecker(host) {
|
|
|
41886
41906
|
if (symbol.exports)
|
|
41887
41907
|
result.exports = new Map(symbol.exports);
|
|
41888
41908
|
const resolvedModuleType = resolveStructuredTypeMembers(moduleType);
|
|
41889
|
-
result.type = createAnonymousType(result, resolvedModuleType.members, emptyArray, emptyArray, resolvedModuleType.indexInfos);
|
|
41909
|
+
result.links.type = createAnonymousType(result, resolvedModuleType.members, emptyArray, emptyArray, resolvedModuleType.indexInfos);
|
|
41890
41910
|
return result;
|
|
41891
41911
|
}
|
|
41892
41912
|
function hasExportAssignmentSymbol(moduleSymbol) {
|
|
@@ -43341,7 +43361,7 @@ function createTypeChecker(host) {
|
|
|
43341
43361
|
}
|
|
43342
43362
|
function shouldUsePlaceholderForProperty(propertySymbol, context) {
|
|
43343
43363
|
var _a2;
|
|
43344
|
-
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a2 = context.reverseMappedStack) == null ? void 0 : _a2[0]) && !(getObjectFlags(last(context.reverseMappedStack).propertyType) & 16 /* Anonymous */));
|
|
43364
|
+
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a2 = context.reverseMappedStack) == null ? void 0 : _a2[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
|
|
43345
43365
|
}
|
|
43346
43366
|
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
|
43347
43367
|
var _a2;
|
|
@@ -43717,7 +43737,7 @@ function createTypeChecker(host) {
|
|
|
43717
43737
|
const params = getTypeParametersOfClassOrInterface(
|
|
43718
43738
|
parentSymbol.flags & 2097152 /* Alias */ ? resolveAlias(parentSymbol) : parentSymbol
|
|
43719
43739
|
);
|
|
43720
|
-
typeParameterNodes = mapToTypeNodes(map(params, (t) => getMappedType(t, nextSymbol.mapper)), context);
|
|
43740
|
+
typeParameterNodes = mapToTypeNodes(map(params, (t) => getMappedType(t, nextSymbol.links.mapper)), context);
|
|
43721
43741
|
} else {
|
|
43722
43742
|
typeParameterNodes = typeParametersToTypeParameterDeclarations(symbol, context);
|
|
43723
43743
|
}
|
|
@@ -46194,7 +46214,7 @@ function createTypeChecker(host) {
|
|
|
46194
46214
|
);
|
|
46195
46215
|
}
|
|
46196
46216
|
const union = createSymbol(s.flags | exportedMember.flags, name);
|
|
46197
|
-
union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]);
|
|
46217
|
+
union.links.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]);
|
|
46198
46218
|
union.valueDeclaration = exportedMember.valueDeclaration;
|
|
46199
46219
|
union.declarations = concatenate(exportedMember.declarations, s.declarations);
|
|
46200
46220
|
members.set(name, union);
|
|
@@ -46281,8 +46301,8 @@ function createTypeChecker(host) {
|
|
|
46281
46301
|
const text = getPropertyNameFromType(exprType);
|
|
46282
46302
|
const flags = 4 /* Property */ | (e.initializer ? 16777216 /* Optional */ : 0);
|
|
46283
46303
|
const symbol = createSymbol(flags, text);
|
|
46284
|
-
symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2);
|
|
46285
|
-
symbol.bindingElement = e;
|
|
46304
|
+
symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2);
|
|
46305
|
+
symbol.links.bindingElement = e;
|
|
46286
46306
|
members.set(symbol.escapedName, symbol);
|
|
46287
46307
|
});
|
|
46288
46308
|
const result = createAnonymousType(void 0, members, emptyArray, emptyArray, stringIndexInfo ? [stringIndexInfo] : emptyArray);
|
|
@@ -46390,7 +46410,7 @@ function createTypeChecker(host) {
|
|
|
46390
46410
|
const result = createSymbol(fileSymbol.flags, "exports");
|
|
46391
46411
|
result.declarations = fileSymbol.declarations ? fileSymbol.declarations.slice() : [];
|
|
46392
46412
|
result.parent = symbol;
|
|
46393
|
-
result.target = fileSymbol;
|
|
46413
|
+
result.links.target = fileSymbol;
|
|
46394
46414
|
if (fileSymbol.valueDeclaration)
|
|
46395
46415
|
result.valueDeclaration = fileSymbol.valueDeclaration;
|
|
46396
46416
|
if (fileSymbol.members)
|
|
@@ -46556,7 +46576,8 @@ function createTypeChecker(host) {
|
|
|
46556
46576
|
if (expando) {
|
|
46557
46577
|
const merged = mergeJSSymbols(symbol, expando);
|
|
46558
46578
|
if (merged) {
|
|
46559
|
-
symbol =
|
|
46579
|
+
symbol = merged;
|
|
46580
|
+
links = merged.links;
|
|
46560
46581
|
}
|
|
46561
46582
|
}
|
|
46562
46583
|
originalLinks.type = links.type = getTypeOfFuncClassEnumModuleWorker(symbol);
|
|
@@ -46653,7 +46674,7 @@ function createTypeChecker(host) {
|
|
|
46653
46674
|
function getWriteTypeOfSymbol(symbol) {
|
|
46654
46675
|
const checkFlags = getCheckFlags(symbol);
|
|
46655
46676
|
if (symbol.flags & 4 /* Property */) {
|
|
46656
|
-
return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : symbol.writeType || symbol.type : getTypeOfSymbol(symbol);
|
|
46677
|
+
return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : symbol.links.writeType || symbol.links.type : getTypeOfSymbol(symbol);
|
|
46657
46678
|
}
|
|
46658
46679
|
if (symbol.flags & 98304 /* Accessor */) {
|
|
46659
46680
|
return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol);
|
|
@@ -47055,7 +47076,8 @@ function createTypeChecker(host) {
|
|
|
47055
47076
|
const kind = symbol.flags & 32 /* Class */ ? 1 /* Class */ : 2 /* Interface */;
|
|
47056
47077
|
const merged = mergeJSSymbols(symbol, symbol.valueDeclaration && getAssignedClassSymbol(symbol.valueDeclaration));
|
|
47057
47078
|
if (merged) {
|
|
47058
|
-
symbol =
|
|
47079
|
+
symbol = merged;
|
|
47080
|
+
links = merged.links;
|
|
47059
47081
|
}
|
|
47060
47082
|
const type = originalLinks.declaredType = links.declaredType = createObjectType(kind, symbol);
|
|
47061
47083
|
const outerTypeParameters = getOuterTypeParametersOfClassOrInterface(symbol);
|
|
@@ -47331,7 +47353,7 @@ function createTypeChecker(host) {
|
|
|
47331
47353
|
error(declName || decl, Diagnostics.Duplicate_property_0, name);
|
|
47332
47354
|
lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */);
|
|
47333
47355
|
}
|
|
47334
|
-
lateSymbol.nameType = type;
|
|
47356
|
+
lateSymbol.links.nameType = type;
|
|
47335
47357
|
addDeclarationToLateBoundSymbol(lateSymbol, decl, symbolFlags);
|
|
47336
47358
|
if (lateSymbol.parent) {
|
|
47337
47359
|
Debug.assert(lateSymbol.parent === parent, "Existing symbol parent should match new one");
|
|
@@ -47537,7 +47559,7 @@ function createTypeChecker(host) {
|
|
|
47537
47559
|
const flags = restType.target.elementFlags[i];
|
|
47538
47560
|
const checkFlags = flags & 12 /* Variable */ ? 32768 /* RestParameter */ : flags & 2 /* Optional */ ? 16384 /* OptionalParameter */ : 0;
|
|
47539
47561
|
const symbol = createSymbol(1 /* FunctionScopedVariable */, name, checkFlags);
|
|
47540
|
-
symbol.type = flags & 4 /* Rest */ ? createArrayType(t) : t;
|
|
47562
|
+
symbol.links.type = flags & 4 /* Rest */ ? createArrayType(t) : t;
|
|
47541
47563
|
return symbol;
|
|
47542
47564
|
});
|
|
47543
47565
|
return concatenate(sig.parameters.slice(0, restIndex), restParams);
|
|
@@ -47697,14 +47719,14 @@ function createTypeChecker(host) {
|
|
|
47697
47719
|
1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
|
|
47698
47720
|
paramName || `arg${i}`
|
|
47699
47721
|
);
|
|
47700
|
-
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
47722
|
+
paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
47701
47723
|
params[i] = paramSymbol;
|
|
47702
47724
|
}
|
|
47703
47725
|
if (needsExtraRestElement) {
|
|
47704
47726
|
const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
|
|
47705
|
-
restParamSymbol.type = createArrayType(getTypeAtPosition(shorter, longestCount));
|
|
47727
|
+
restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
|
|
47706
47728
|
if (shorter === right) {
|
|
47707
|
-
restParamSymbol.type = instantiateType(restParamSymbol.type, mapper);
|
|
47729
|
+
restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
|
|
47708
47730
|
}
|
|
47709
47731
|
params[longestCount] = restParamSymbol;
|
|
47710
47732
|
}
|
|
@@ -47924,16 +47946,16 @@ function createTypeChecker(host) {
|
|
|
47924
47946
|
const checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0);
|
|
47925
47947
|
const inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags);
|
|
47926
47948
|
inferredProp.declarations = prop.declarations;
|
|
47927
|
-
inferredProp.nameType = getSymbolLinks(prop).nameType;
|
|
47928
|
-
inferredProp.propertyType = getTypeOfSymbol(prop);
|
|
47949
|
+
inferredProp.links.nameType = getSymbolLinks(prop).nameType;
|
|
47950
|
+
inferredProp.links.propertyType = getTypeOfSymbol(prop);
|
|
47929
47951
|
if (type.constraintType.type.flags & 8388608 /* IndexedAccess */ && type.constraintType.type.objectType.flags & 262144 /* TypeParameter */ && type.constraintType.type.indexType.flags & 262144 /* TypeParameter */) {
|
|
47930
47952
|
const newTypeParam = type.constraintType.type.objectType;
|
|
47931
47953
|
const newMappedType = replaceIndexedAccess(type.mappedType, type.constraintType.type, newTypeParam);
|
|
47932
|
-
inferredProp.mappedType = newMappedType;
|
|
47933
|
-
inferredProp.constraintType = getIndexType(newTypeParam);
|
|
47954
|
+
inferredProp.links.mappedType = newMappedType;
|
|
47955
|
+
inferredProp.links.constraintType = getIndexType(newTypeParam);
|
|
47934
47956
|
} else {
|
|
47935
|
-
inferredProp.mappedType = type.mappedType;
|
|
47936
|
-
inferredProp.constraintType = type.constraintType;
|
|
47957
|
+
inferredProp.links.mappedType = type.mappedType;
|
|
47958
|
+
inferredProp.links.constraintType = type.constraintType;
|
|
47937
47959
|
}
|
|
47938
47960
|
members.set(prop.escapedName, inferredProp);
|
|
47939
47961
|
}
|
|
@@ -48009,8 +48031,8 @@ function createTypeChecker(host) {
|
|
|
48009
48031
|
const propName = getPropertyNameFromType(propNameType);
|
|
48010
48032
|
const existingProp = members.get(propName);
|
|
48011
48033
|
if (existingProp) {
|
|
48012
|
-
existingProp.nameType = getUnionType([existingProp.nameType, propNameType]);
|
|
48013
|
-
existingProp.keyType = getUnionType([existingProp.keyType, keyType]);
|
|
48034
|
+
existingProp.links.nameType = getUnionType([existingProp.links.nameType, propNameType]);
|
|
48035
|
+
existingProp.links.keyType = getUnionType([existingProp.links.keyType, keyType]);
|
|
48014
48036
|
} else {
|
|
48015
48037
|
const modifiersProp = isTypeUsableAsPropertyName(keyType) ? getPropertyOfType(modifiersType, getPropertyNameFromType(keyType)) : void 0;
|
|
48016
48038
|
const isOptional = !!(templateModifiers & 4 /* IncludeOptional */ || !(templateModifiers & 8 /* ExcludeOptional */) && modifiersProp && modifiersProp.flags & 16777216 /* Optional */);
|
|
@@ -48022,11 +48044,11 @@ function createTypeChecker(host) {
|
|
|
48022
48044
|
propName,
|
|
48023
48045
|
lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0)
|
|
48024
48046
|
);
|
|
48025
|
-
prop.mappedType = type;
|
|
48026
|
-
prop.nameType = propNameType;
|
|
48027
|
-
prop.keyType = keyType;
|
|
48047
|
+
prop.links.mappedType = type;
|
|
48048
|
+
prop.links.nameType = propNameType;
|
|
48049
|
+
prop.links.keyType = keyType;
|
|
48028
48050
|
if (modifiersProp) {
|
|
48029
|
-
prop.syntheticOrigin = modifiersProp;
|
|
48051
|
+
prop.links.syntheticOrigin = modifiersProp;
|
|
48030
48052
|
prop.declarations = nameType ? void 0 : modifiersProp.declarations;
|
|
48031
48053
|
}
|
|
48032
48054
|
members.set(propName, prop);
|
|
@@ -48040,23 +48062,23 @@ function createTypeChecker(host) {
|
|
|
48040
48062
|
}
|
|
48041
48063
|
}
|
|
48042
48064
|
function getTypeOfMappedSymbol(symbol) {
|
|
48043
|
-
if (!symbol.type) {
|
|
48044
|
-
const mappedType = symbol.mappedType;
|
|
48065
|
+
if (!symbol.links.type) {
|
|
48066
|
+
const mappedType = symbol.links.mappedType;
|
|
48045
48067
|
if (!pushTypeResolution(symbol, 0 /* Type */)) {
|
|
48046
48068
|
mappedType.containsError = true;
|
|
48047
48069
|
return errorType;
|
|
48048
48070
|
}
|
|
48049
48071
|
const templateType = getTemplateTypeFromMappedType(mappedType.target || mappedType);
|
|
48050
|
-
const mapper = appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), symbol.keyType);
|
|
48072
|
+
const mapper = appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), symbol.links.keyType);
|
|
48051
48073
|
const propType = instantiateType(templateType, mapper);
|
|
48052
|
-
let type = strictNullChecks && symbol.flags & 16777216 /* Optional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType, true) : symbol.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType;
|
|
48074
|
+
let type = strictNullChecks && symbol.flags & 16777216 /* Optional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType, true) : symbol.links.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType;
|
|
48053
48075
|
if (!popTypeResolution()) {
|
|
48054
48076
|
error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));
|
|
48055
48077
|
type = errorType;
|
|
48056
48078
|
}
|
|
48057
|
-
symbol.type = type;
|
|
48079
|
+
symbol.links.type = type;
|
|
48058
48080
|
}
|
|
48059
|
-
return symbol.type;
|
|
48081
|
+
return symbol.links.type;
|
|
48060
48082
|
}
|
|
48061
48083
|
function getTypeParameterFromMappedType(type) {
|
|
48062
48084
|
return type.typeParameter || (type.typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(type.declaration.typeParameter)));
|
|
@@ -48471,7 +48493,7 @@ function createTypeChecker(host) {
|
|
|
48471
48493
|
return getReducedType(getApparentType(getReducedType(type)));
|
|
48472
48494
|
}
|
|
48473
48495
|
function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) {
|
|
48474
|
-
var _a2, _b;
|
|
48496
|
+
var _a2, _b, _c;
|
|
48475
48497
|
let singleProp;
|
|
48476
48498
|
let propSet;
|
|
48477
48499
|
let indexTypes;
|
|
@@ -48539,10 +48561,11 @@ function createTypeChecker(host) {
|
|
|
48539
48561
|
}
|
|
48540
48562
|
if (!propSet && !(checkFlags & 16 /* ReadPartial */) && !indexTypes) {
|
|
48541
48563
|
if (mergedInstantiations) {
|
|
48542
|
-
const
|
|
48543
|
-
clone2
|
|
48544
|
-
clone2.
|
|
48545
|
-
clone2.
|
|
48564
|
+
const links = (_a2 = tryCast(singleProp, isTransientSymbol)) == null ? void 0 : _a2.links;
|
|
48565
|
+
const clone2 = createSymbolWithType(singleProp, links == null ? void 0 : links.type);
|
|
48566
|
+
clone2.parent = (_c = (_b = singleProp.valueDeclaration) == null ? void 0 : _b.symbol) == null ? void 0 : _c.parent;
|
|
48567
|
+
clone2.links.containingType = containingType;
|
|
48568
|
+
clone2.links.mapper = links == null ? void 0 : links.mapper;
|
|
48546
48569
|
return clone2;
|
|
48547
48570
|
} else {
|
|
48548
48571
|
return singleProp;
|
|
@@ -48584,7 +48607,7 @@ function createTypeChecker(host) {
|
|
|
48584
48607
|
}
|
|
48585
48608
|
addRange(propTypes, indexTypes);
|
|
48586
48609
|
const result = createSymbol(4 /* Property */ | (optionalFlag != null ? optionalFlag : 0), name, syntheticFlag | checkFlags);
|
|
48587
|
-
result.containingType = containingType;
|
|
48610
|
+
result.links.containingType = containingType;
|
|
48588
48611
|
if (!hasNonUniformValueDeclaration && firstValueDeclaration) {
|
|
48589
48612
|
result.valueDeclaration = firstValueDeclaration;
|
|
48590
48613
|
if (firstValueDeclaration.symbol.parent) {
|
|
@@ -48592,16 +48615,16 @@ function createTypeChecker(host) {
|
|
|
48592
48615
|
}
|
|
48593
48616
|
}
|
|
48594
48617
|
result.declarations = declarations;
|
|
48595
|
-
result.nameType = nameType;
|
|
48618
|
+
result.links.nameType = nameType;
|
|
48596
48619
|
if (propTypes.length > 2) {
|
|
48597
|
-
result.checkFlags |= 65536 /* DeferredType */;
|
|
48598
|
-
result.deferralParent = containingType;
|
|
48599
|
-
result.deferralConstituents = propTypes;
|
|
48600
|
-
result.deferralWriteConstituents = writeTypes;
|
|
48620
|
+
result.links.checkFlags |= 65536 /* DeferredType */;
|
|
48621
|
+
result.links.deferralParent = containingType;
|
|
48622
|
+
result.links.deferralConstituents = propTypes;
|
|
48623
|
+
result.links.deferralWriteConstituents = writeTypes;
|
|
48601
48624
|
} else {
|
|
48602
|
-
result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
|
|
48625
|
+
result.links.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
|
|
48603
48626
|
if (writeTypes) {
|
|
48604
|
-
result.writeType = isUnion ? getUnionType(writeTypes) : getIntersectionType(writeTypes);
|
|
48627
|
+
result.links.writeType = isUnion ? getUnionType(writeTypes) : getIntersectionType(writeTypes);
|
|
48605
48628
|
}
|
|
48606
48629
|
}
|
|
48607
48630
|
return result;
|
|
@@ -48938,12 +48961,12 @@ function createTypeChecker(host) {
|
|
|
48938
48961
|
const lastParamVariadicType = firstDefined(lastParamTags, (p) => p.typeExpression && isJSDocVariadicType(p.typeExpression.type) ? p.typeExpression.type : void 0);
|
|
48939
48962
|
const syntheticArgsSymbol = createSymbol(3 /* Variable */, "args", 32768 /* RestParameter */);
|
|
48940
48963
|
if (lastParamVariadicType) {
|
|
48941
|
-
syntheticArgsSymbol.type = createArrayType(getTypeFromTypeNode(lastParamVariadicType.type));
|
|
48964
|
+
syntheticArgsSymbol.links.type = createArrayType(getTypeFromTypeNode(lastParamVariadicType.type));
|
|
48942
48965
|
} else {
|
|
48943
|
-
syntheticArgsSymbol.checkFlags |= 65536 /* DeferredType */;
|
|
48944
|
-
syntheticArgsSymbol.deferralParent = neverType;
|
|
48945
|
-
syntheticArgsSymbol.deferralConstituents = [anyArrayType];
|
|
48946
|
-
syntheticArgsSymbol.deferralWriteConstituents = [anyArrayType];
|
|
48966
|
+
syntheticArgsSymbol.links.checkFlags |= 65536 /* DeferredType */;
|
|
48967
|
+
syntheticArgsSymbol.links.deferralParent = neverType;
|
|
48968
|
+
syntheticArgsSymbol.links.deferralConstituents = [anyArrayType];
|
|
48969
|
+
syntheticArgsSymbol.links.deferralWriteConstituents = [anyArrayType];
|
|
48947
48970
|
}
|
|
48948
48971
|
if (lastParamVariadicType) {
|
|
48949
48972
|
parameters.pop();
|
|
@@ -49557,7 +49580,7 @@ function createTypeChecker(host) {
|
|
|
49557
49580
|
if (!result) {
|
|
49558
49581
|
unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
|
|
49559
49582
|
result.parent = parentSymbol;
|
|
49560
|
-
result.declaredType = unresolvedType;
|
|
49583
|
+
result.links.declaredType = unresolvedType;
|
|
49561
49584
|
}
|
|
49562
49585
|
return result;
|
|
49563
49586
|
}
|
|
@@ -49834,7 +49857,7 @@ function createTypeChecker(host) {
|
|
|
49834
49857
|
const importMetaType = getGlobalImportMetaType();
|
|
49835
49858
|
const metaPropertySymbol = createSymbol(4 /* Property */, "meta", 8 /* Readonly */);
|
|
49836
49859
|
metaPropertySymbol.parent = symbol;
|
|
49837
|
-
metaPropertySymbol.type = importMetaType;
|
|
49860
|
+
metaPropertySymbol.links.type = importMetaType;
|
|
49838
49861
|
const members = createSymbolTable([metaPropertySymbol]);
|
|
49839
49862
|
symbol.members = members;
|
|
49840
49863
|
deferredGlobalImportMetaExpressionType = createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);
|
|
@@ -50059,8 +50082,8 @@ function createTypeChecker(host) {
|
|
|
50059
50082
|
"" + i,
|
|
50060
50083
|
readonly ? 8 /* Readonly */ : 0
|
|
50061
50084
|
);
|
|
50062
|
-
property.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i];
|
|
50063
|
-
property.type = typeParameter;
|
|
50085
|
+
property.links.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i];
|
|
50086
|
+
property.links.type = typeParameter;
|
|
50064
50087
|
properties.push(property);
|
|
50065
50088
|
}
|
|
50066
50089
|
}
|
|
@@ -50068,12 +50091,12 @@ function createTypeChecker(host) {
|
|
|
50068
50091
|
const fixedLength = properties.length;
|
|
50069
50092
|
const lengthSymbol = createSymbol(4 /* Property */, "length", readonly ? 8 /* Readonly */ : 0);
|
|
50070
50093
|
if (combinedFlags & 12 /* Variable */) {
|
|
50071
|
-
lengthSymbol.type = numberType;
|
|
50094
|
+
lengthSymbol.links.type = numberType;
|
|
50072
50095
|
} else {
|
|
50073
50096
|
const literalTypes = [];
|
|
50074
50097
|
for (let i = minLength; i <= arity; i++)
|
|
50075
50098
|
literalTypes.push(getNumberLiteralType(i));
|
|
50076
|
-
lengthSymbol.type = getUnionType(literalTypes);
|
|
50099
|
+
lengthSymbol.links.type = getUnionType(literalTypes);
|
|
50077
50100
|
}
|
|
50078
50101
|
properties.push(lengthSymbol);
|
|
50079
50102
|
const type = createObjectType(8 /* Tuple */ | 4 /* Reference */);
|
|
@@ -51599,6 +51622,13 @@ function createTypeChecker(host) {
|
|
|
51599
51622
|
if (meaning === 111551 /* Value */) {
|
|
51600
51623
|
return getTypeOfSymbol(symbol);
|
|
51601
51624
|
} else {
|
|
51625
|
+
const type = tryGetDeclaredTypeOfSymbol(resolvedSymbol);
|
|
51626
|
+
const typeParameters = type && getTypeParametersForTypeAndSymbol(type, resolvedSymbol);
|
|
51627
|
+
if (node.typeArguments && typeParameters) {
|
|
51628
|
+
addLazyDiagnostic(() => {
|
|
51629
|
+
checkTypeArgumentConstraints(node, typeParameters);
|
|
51630
|
+
});
|
|
51631
|
+
}
|
|
51602
51632
|
return getTypeReferenceType(node, resolvedSymbol);
|
|
51603
51633
|
}
|
|
51604
51634
|
}
|
|
@@ -51660,10 +51690,10 @@ function createTypeChecker(host) {
|
|
|
51660
51690
|
const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
|
|
51661
51691
|
const flags = 4 /* Property */ | 16777216 /* Optional */;
|
|
51662
51692
|
const result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* Readonly */ : 0));
|
|
51663
|
-
result.type = isSetonlyAccessor ? undefinedType : addOptionality(getTypeOfSymbol(prop), true);
|
|
51693
|
+
result.links.type = isSetonlyAccessor ? undefinedType : addOptionality(getTypeOfSymbol(prop), true);
|
|
51664
51694
|
result.declarations = prop.declarations;
|
|
51665
|
-
result.nameType = getSymbolLinks(prop).nameType;
|
|
51666
|
-
result.syntheticOrigin = prop;
|
|
51695
|
+
result.links.nameType = getSymbolLinks(prop).nameType;
|
|
51696
|
+
result.links.syntheticOrigin = prop;
|
|
51667
51697
|
members.set(prop.escapedName, result);
|
|
51668
51698
|
}
|
|
51669
51699
|
}
|
|
@@ -51730,11 +51760,11 @@ function createTypeChecker(host) {
|
|
|
51730
51760
|
const declarations = concatenate(leftProp.declarations, rightProp.declarations);
|
|
51731
51761
|
const flags = 4 /* Property */ | leftProp.flags & 16777216 /* Optional */;
|
|
51732
51762
|
const result = createSymbol(flags, leftProp.escapedName);
|
|
51733
|
-
result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
|
|
51734
|
-
result.leftSpread = leftProp;
|
|
51735
|
-
result.rightSpread = rightProp;
|
|
51763
|
+
result.links.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
|
|
51764
|
+
result.links.leftSpread = leftProp;
|
|
51765
|
+
result.links.rightSpread = rightProp;
|
|
51736
51766
|
result.declarations = declarations;
|
|
51737
|
-
result.nameType = getSymbolLinks(leftProp).nameType;
|
|
51767
|
+
result.links.nameType = getSymbolLinks(leftProp).nameType;
|
|
51738
51768
|
members.set(leftProp.escapedName, result);
|
|
51739
51769
|
}
|
|
51740
51770
|
} else {
|
|
@@ -51756,10 +51786,10 @@ function createTypeChecker(host) {
|
|
|
51756
51786
|
}
|
|
51757
51787
|
const flags = 4 /* Property */ | prop.flags & 16777216 /* Optional */;
|
|
51758
51788
|
const result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* Readonly */ : 0));
|
|
51759
|
-
result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop);
|
|
51789
|
+
result.links.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop);
|
|
51760
51790
|
result.declarations = prop.declarations;
|
|
51761
|
-
result.nameType = getSymbolLinks(prop).nameType;
|
|
51762
|
-
result.syntheticOrigin = prop;
|
|
51791
|
+
result.links.nameType = getSymbolLinks(prop).nameType;
|
|
51792
|
+
result.links.syntheticOrigin = prop;
|
|
51763
51793
|
return result;
|
|
51764
51794
|
}
|
|
51765
51795
|
function getIndexInfoWithReadonly(info, readonly) {
|
|
@@ -52124,13 +52154,13 @@ function createTypeChecker(host) {
|
|
|
52124
52154
|
const result = createSymbol(symbol.flags, symbol.escapedName, 1 /* Instantiated */ | getCheckFlags(symbol) & (8 /* Readonly */ | 4096 /* Late */ | 16384 /* OptionalParameter */ | 32768 /* RestParameter */));
|
|
52125
52155
|
result.declarations = symbol.declarations;
|
|
52126
52156
|
result.parent = symbol.parent;
|
|
52127
|
-
result.target = symbol;
|
|
52128
|
-
result.mapper = mapper;
|
|
52157
|
+
result.links.target = symbol;
|
|
52158
|
+
result.links.mapper = mapper;
|
|
52129
52159
|
if (symbol.valueDeclaration) {
|
|
52130
52160
|
result.valueDeclaration = symbol.valueDeclaration;
|
|
52131
52161
|
}
|
|
52132
52162
|
if (links.nameType) {
|
|
52133
|
-
result.nameType = links.nameType;
|
|
52163
|
+
result.links.nameType = links.nameType;
|
|
52134
52164
|
}
|
|
52135
52165
|
return result;
|
|
52136
52166
|
}
|
|
@@ -55168,7 +55198,7 @@ function createTypeChecker(host) {
|
|
|
55168
55198
|
}
|
|
55169
55199
|
function forEachProperty(prop, callback) {
|
|
55170
55200
|
if (getCheckFlags(prop) & 6 /* Synthetic */) {
|
|
55171
|
-
for (const t of prop.containingType.types) {
|
|
55201
|
+
for (const t of prop.links.containingType.types) {
|
|
55172
55202
|
const p = getPropertyOfType(t, prop.escapedName);
|
|
55173
55203
|
const result = p && forEachProperty(p, callback);
|
|
55174
55204
|
if (result) {
|
|
@@ -55582,14 +55612,14 @@ function createTypeChecker(host) {
|
|
|
55582
55612
|
const symbol = createSymbol(source.flags, source.escapedName, getCheckFlags(source) & 8 /* Readonly */);
|
|
55583
55613
|
symbol.declarations = source.declarations;
|
|
55584
55614
|
symbol.parent = source.parent;
|
|
55585
|
-
symbol.type = type;
|
|
55586
|
-
symbol.target = source;
|
|
55615
|
+
symbol.links.type = type;
|
|
55616
|
+
symbol.links.target = source;
|
|
55587
55617
|
if (source.valueDeclaration) {
|
|
55588
55618
|
symbol.valueDeclaration = source.valueDeclaration;
|
|
55589
55619
|
}
|
|
55590
55620
|
const nameType = getSymbolLinks(source).nameType;
|
|
55591
55621
|
if (nameType) {
|
|
55592
|
-
symbol.nameType = nameType;
|
|
55622
|
+
symbol.links.nameType = nameType;
|
|
55593
55623
|
}
|
|
55594
55624
|
return symbol;
|
|
55595
55625
|
}
|
|
@@ -55970,7 +56000,7 @@ function createTypeChecker(host) {
|
|
|
55970
56000
|
}
|
|
55971
56001
|
const name = escapeLeadingUnderscores(t.value);
|
|
55972
56002
|
const literalProp = createSymbol(4 /* Property */, name);
|
|
55973
|
-
literalProp.type = anyType;
|
|
56003
|
+
literalProp.links.type = anyType;
|
|
55974
56004
|
if (t.symbol) {
|
|
55975
56005
|
literalProp.declarations = t.symbol.declarations;
|
|
55976
56006
|
literalProp.valueDeclaration = t.symbol.valueDeclaration;
|
|
@@ -56018,7 +56048,7 @@ function createTypeChecker(host) {
|
|
|
56018
56048
|
function getTypeOfReverseMappedSymbol(symbol) {
|
|
56019
56049
|
const links = getSymbolLinks(symbol);
|
|
56020
56050
|
if (!links.type) {
|
|
56021
|
-
links.type = inferReverseMappedType(symbol.propertyType, symbol.mappedType, symbol.constraintType);
|
|
56051
|
+
links.type = inferReverseMappedType(symbol.links.propertyType, symbol.links.mappedType, symbol.links.constraintType);
|
|
56022
56052
|
}
|
|
56023
56053
|
return links.type;
|
|
56024
56054
|
}
|
|
@@ -57001,10 +57031,10 @@ function createTypeChecker(host) {
|
|
|
57001
57031
|
if (type && type.flags & 1048576 /* Union */) {
|
|
57002
57032
|
const prop = getUnionOrIntersectionProperty(type, name);
|
|
57003
57033
|
if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
|
|
57004
|
-
if (prop.isDiscriminantProperty === void 0) {
|
|
57005
|
-
prop.isDiscriminantProperty = (prop.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ && !isGenericType(getTypeOfSymbol(prop));
|
|
57034
|
+
if (prop.links.isDiscriminantProperty === void 0) {
|
|
57035
|
+
prop.links.isDiscriminantProperty = (prop.links.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ && !isGenericType(getTypeOfSymbol(prop));
|
|
57006
57036
|
}
|
|
57007
|
-
return !!prop.isDiscriminantProperty;
|
|
57037
|
+
return !!prop.links.isDiscriminantProperty;
|
|
57008
57038
|
}
|
|
57009
57039
|
}
|
|
57010
57040
|
return false;
|
|
@@ -57526,7 +57556,7 @@ function createTypeChecker(host) {
|
|
|
57526
57556
|
}
|
|
57527
57557
|
if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
|
|
57528
57558
|
if (getCheckFlags(symbol) & 262144 /* Mapped */) {
|
|
57529
|
-
const origin = symbol.syntheticOrigin;
|
|
57559
|
+
const origin = symbol.links.syntheticOrigin;
|
|
57530
57560
|
if (origin && getExplicitTypeOfSymbol(origin)) {
|
|
57531
57561
|
return getTypeOfSymbol(symbol);
|
|
57532
57562
|
}
|
|
@@ -59607,7 +59637,7 @@ function createTypeChecker(host) {
|
|
|
59607
59637
|
return nameStr !== void 0 && getTypeOfPropertyOfContextualType(thisType, nameStr) || void 0;
|
|
59608
59638
|
}
|
|
59609
59639
|
function isCircularMappedProperty(symbol) {
|
|
59610
|
-
return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.type && findResolutionCycleStartIndex(symbol, 0 /* Type */) >= 0);
|
|
59640
|
+
return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type && findResolutionCycleStartIndex(symbol, 0 /* Type */) >= 0);
|
|
59611
59641
|
}
|
|
59612
59642
|
function getTypeOfPropertyOfContextualType(type, name, nameType) {
|
|
59613
59643
|
return mapType(type, (t) => {
|
|
@@ -60029,14 +60059,14 @@ function createTypeChecker(host) {
|
|
|
60029
60059
|
1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
|
|
60030
60060
|
paramName || `arg${i}`
|
|
60031
60061
|
);
|
|
60032
|
-
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
60062
|
+
paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
60033
60063
|
params[i] = paramSymbol;
|
|
60034
60064
|
}
|
|
60035
60065
|
if (needsExtraRestElement) {
|
|
60036
60066
|
const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
|
|
60037
|
-
restParamSymbol.type = createArrayType(getTypeAtPosition(shorter, longestCount));
|
|
60067
|
+
restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
|
|
60038
60068
|
if (shorter === right) {
|
|
60039
|
-
restParamSymbol.type = instantiateType(restParamSymbol.type, mapper);
|
|
60069
|
+
restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
|
|
60040
60070
|
}
|
|
60041
60071
|
params[longestCount] = restParamSymbol;
|
|
60042
60072
|
}
|
|
@@ -60267,6 +60297,7 @@ function createTypeChecker(host) {
|
|
|
60267
60297
|
return links.immediateTarget;
|
|
60268
60298
|
}
|
|
60269
60299
|
function checkObjectLiteral(node, checkMode) {
|
|
60300
|
+
var _a2;
|
|
60270
60301
|
const inDestructuringPattern = isAssignmentTarget(node);
|
|
60271
60302
|
checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
|
|
60272
60303
|
const allPropertiesTable = strictNullChecks ? createSymbolTable() : void 0;
|
|
@@ -60309,7 +60340,7 @@ function createTypeChecker(host) {
|
|
|
60309
60340
|
const nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : void 0;
|
|
60310
60341
|
const prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : createSymbol(4 /* Property */ | member.flags, member.escapedName, checkFlags);
|
|
60311
60342
|
if (nameType) {
|
|
60312
|
-
prop.nameType = nameType;
|
|
60343
|
+
prop.links.nameType = nameType;
|
|
60313
60344
|
}
|
|
60314
60345
|
if (inDestructuringPattern) {
|
|
60315
60346
|
const isOptional = memberDecl.kind === 299 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer;
|
|
@@ -60334,8 +60365,8 @@ function createTypeChecker(host) {
|
|
|
60334
60365
|
if (member.valueDeclaration) {
|
|
60335
60366
|
prop.valueDeclaration = member.valueDeclaration;
|
|
60336
60367
|
}
|
|
60337
|
-
prop.type = type;
|
|
60338
|
-
prop.target = member;
|
|
60368
|
+
prop.links.type = type;
|
|
60369
|
+
prop.links.target = member;
|
|
60339
60370
|
member = prop;
|
|
60340
60371
|
allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
|
|
60341
60372
|
if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 171 /* MethodDeclaration */) && isContextSensitive(memberDecl)) {
|
|
@@ -60408,7 +60439,7 @@ function createTypeChecker(host) {
|
|
|
60408
60439
|
if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
|
|
60409
60440
|
if (!(prop.flags & 16777216 /* Optional */)) {
|
|
60410
60441
|
error(
|
|
60411
|
-
prop.valueDeclaration || prop.bindingElement,
|
|
60442
|
+
prop.valueDeclaration || ((_a2 = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a2.links.bindingElement),
|
|
60412
60443
|
Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value
|
|
60413
60444
|
);
|
|
60414
60445
|
}
|
|
@@ -60518,8 +60549,8 @@ function createTypeChecker(host) {
|
|
|
60518
60549
|
if (member.valueDeclaration) {
|
|
60519
60550
|
attributeSymbol.valueDeclaration = member.valueDeclaration;
|
|
60520
60551
|
}
|
|
60521
|
-
attributeSymbol.type = exprType;
|
|
60522
|
-
attributeSymbol.target = member;
|
|
60552
|
+
attributeSymbol.links.type = exprType;
|
|
60553
|
+
attributeSymbol.links.target = member;
|
|
60523
60554
|
attributesTable.set(attributeSymbol.escapedName, attributeSymbol);
|
|
60524
60555
|
allAttributesTable == null ? void 0 : allAttributesTable.set(attributeSymbol.escapedName, attributeSymbol);
|
|
60525
60556
|
if (attributeDecl.name.escapedText === jsxChildrenPropertyName) {
|
|
@@ -60567,7 +60598,7 @@ function createTypeChecker(host) {
|
|
|
60567
60598
|
const contextualType = getApparentTypeOfContextualType(openingLikeElement.attributes, void 0);
|
|
60568
60599
|
const childrenContextualType = contextualType && getTypeOfPropertyOfContextualType(contextualType, jsxChildrenPropertyName);
|
|
60569
60600
|
const childrenPropSymbol = createSymbol(4 /* Property */, jsxChildrenPropertyName);
|
|
60570
|
-
childrenPropSymbol.type = childrenTypes.length === 1 ? childrenTypes[0] : childrenContextualType && someType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) : createArrayType(getUnionType(childrenTypes));
|
|
60601
|
+
childrenPropSymbol.links.type = childrenTypes.length === 1 ? childrenTypes[0] : childrenContextualType && someType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) : createArrayType(getUnionType(childrenTypes));
|
|
60571
60602
|
childrenPropSymbol.valueDeclaration = factory.createPropertySignature(void 0, unescapeLeadingUnderscores(jsxChildrenPropertyName), void 0, void 0);
|
|
60572
60603
|
setParent(childrenPropSymbol.valueDeclaration, attributes);
|
|
60573
60604
|
childrenPropSymbol.valueDeclaration.symbol = childrenPropSymbol;
|
|
@@ -60673,7 +60704,7 @@ function createTypeChecker(host) {
|
|
|
60673
60704
|
return void 0;
|
|
60674
60705
|
}
|
|
60675
60706
|
const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
|
|
60676
|
-
const errorMessage = isClassic ? Diagnostics.
|
|
60707
|
+
const 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;
|
|
60677
60708
|
const mod = resolveExternalModule(location, runtimeImportSpecifier, errorMessage, location);
|
|
60678
60709
|
const result = mod && mod !== unknownSymbol ? getMergedSymbol(resolveSymbol(mod)) : void 0;
|
|
60679
60710
|
if (links) {
|
|
@@ -63078,7 +63109,7 @@ function createTypeChecker(host) {
|
|
|
63078
63109
|
returnNode ? factory.createTypeReferenceNode(returnNode, void 0) : factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
63079
63110
|
);
|
|
63080
63111
|
const parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, "props");
|
|
63081
|
-
parameterSymbol.type = result;
|
|
63112
|
+
parameterSymbol.links.type = result;
|
|
63082
63113
|
return createSignature(
|
|
63083
63114
|
declaration,
|
|
63084
63115
|
void 0,
|
|
@@ -63371,8 +63402,8 @@ function createTypeChecker(host) {
|
|
|
63371
63402
|
const memberTable = createSymbolTable();
|
|
63372
63403
|
const newSymbol = createSymbol(2097152 /* Alias */, "default" /* Default */);
|
|
63373
63404
|
newSymbol.parent = originalSymbol;
|
|
63374
|
-
newSymbol.nameType = getStringLiteralType("default");
|
|
63375
|
-
newSymbol.aliasTarget = resolveSymbol(symbol);
|
|
63405
|
+
newSymbol.links.nameType = getStringLiteralType("default");
|
|
63406
|
+
newSymbol.links.aliasTarget = resolveSymbol(symbol);
|
|
63376
63407
|
memberTable.set("default" /* Default */, newSymbol);
|
|
63377
63408
|
return createAnonymousType(anonymousSymbol, memberTable, emptyArray, emptyArray, emptyArray);
|
|
63378
63409
|
}
|
|
@@ -63398,7 +63429,7 @@ function createTypeChecker(host) {
|
|
|
63398
63429
|
if (hasSyntheticDefault) {
|
|
63399
63430
|
const anonymousSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */);
|
|
63400
63431
|
const defaultContainingObject = createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol);
|
|
63401
|
-
anonymousSymbol.type = defaultContainingObject;
|
|
63432
|
+
anonymousSymbol.links.type = defaultContainingObject;
|
|
63402
63433
|
synthType.syntheticType = isValidSpreadType(type) ? getSpreadType(type, defaultContainingObject, anonymousSymbol, 0, false) : defaultContainingObject;
|
|
63403
63434
|
} else {
|
|
63404
63435
|
synthType.syntheticType = type;
|
|
@@ -63933,7 +63964,7 @@ function createTypeChecker(host) {
|
|
|
63933
63964
|
const symbol = createSymbol(0 /* None */, "NewTargetExpression");
|
|
63934
63965
|
const targetPropertySymbol = createSymbol(4 /* Property */, "target", 8 /* Readonly */);
|
|
63935
63966
|
targetPropertySymbol.parent = symbol;
|
|
63936
|
-
targetPropertySymbol.type = targetType;
|
|
63967
|
+
targetPropertySymbol.links.type = targetType;
|
|
63937
63968
|
const members = createSymbolTable([targetPropertySymbol]);
|
|
63938
63969
|
symbol.members = members;
|
|
63939
63970
|
return createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);
|
|
@@ -66381,12 +66412,18 @@ function createTypeChecker(host) {
|
|
|
66381
66412
|
}
|
|
66382
66413
|
return result;
|
|
66383
66414
|
}
|
|
66415
|
+
function getTypeParametersForTypeAndSymbol(type, symbol) {
|
|
66416
|
+
if (!isErrorType(type)) {
|
|
66417
|
+
return symbol.flags & 524288 /* TypeAlias */ && getSymbolLinks(symbol).typeParameters || (getObjectFlags(type) & 4 /* Reference */ ? type.target.localTypeParameters : void 0);
|
|
66418
|
+
}
|
|
66419
|
+
return void 0;
|
|
66420
|
+
}
|
|
66384
66421
|
function getTypeParametersForTypeReference(node) {
|
|
66385
66422
|
const type = getTypeFromTypeReference(node);
|
|
66386
66423
|
if (!isErrorType(type)) {
|
|
66387
66424
|
const symbol = getNodeLinks(node).resolvedSymbol;
|
|
66388
66425
|
if (symbol) {
|
|
66389
|
-
return
|
|
66426
|
+
return getTypeParametersForTypeAndSymbol(type, symbol);
|
|
66390
66427
|
}
|
|
66391
66428
|
}
|
|
66392
66429
|
return void 0;
|
|
@@ -69465,7 +69502,7 @@ function createTypeChecker(host) {
|
|
|
69465
69502
|
);
|
|
69466
69503
|
}
|
|
69467
69504
|
function getTargetSymbol(s) {
|
|
69468
|
-
return getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s;
|
|
69505
|
+
return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s;
|
|
69469
69506
|
}
|
|
69470
69507
|
function getClassOrInterfaceDeclarationsOfSymbol(symbol) {
|
|
69471
69508
|
return filter(symbol.declarations, (d) => d.kind === 260 /* ClassDeclaration */ || d.kind === 261 /* InterfaceDeclaration */);
|
|
@@ -71528,7 +71565,7 @@ function createTypeChecker(host) {
|
|
|
71528
71565
|
if (getCheckFlags(symbol) & 6 /* Synthetic */) {
|
|
71529
71566
|
return mapDefined(getSymbolLinks(symbol).containingType.types, (type) => getPropertyOfType(type, symbol.escapedName));
|
|
71530
71567
|
} else if (symbol.flags & 33554432 /* Transient */) {
|
|
71531
|
-
const { leftSpread, rightSpread, syntheticOrigin } = symbol;
|
|
71568
|
+
const { links: { leftSpread, rightSpread, syntheticOrigin } } = symbol;
|
|
71532
71569
|
return leftSpread ? [leftSpread, rightSpread] : syntheticOrigin ? [syntheticOrigin] : singleElementArray(tryGetTarget(symbol));
|
|
71533
71570
|
}
|
|
71534
71571
|
return void 0;
|
|
@@ -78773,7 +78810,7 @@ function transformClassFields(context) {
|
|
|
78773
78810
|
if (isClassWithConstructorReference) {
|
|
78774
78811
|
enableSubstitutionForClassAliases();
|
|
78775
78812
|
const alias = factory2.cloneNode(temp);
|
|
78776
|
-
alias.
|
|
78813
|
+
alias.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
78777
78814
|
classAliases[getOriginalNodeId(node)] = alias;
|
|
78778
78815
|
}
|
|
78779
78816
|
setEmitFlags(classExpression, 131072 /* Indented */ | getEmitFlags(classExpression));
|
|
@@ -89069,7 +89106,7 @@ function transformModule(context) {
|
|
|
89069
89106
|
return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);
|
|
89070
89107
|
}
|
|
89071
89108
|
return node;
|
|
89072
|
-
} else if (!(isGeneratedIdentifier(node) && !(node.
|
|
89109
|
+
} else if (!(isGeneratedIdentifier(node) && !(node.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
89073
89110
|
const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node));
|
|
89074
89111
|
if (exportContainer && exportContainer.kind === 308 /* SourceFile */) {
|
|
89075
89112
|
return setTextRange(
|
|
@@ -96913,10 +96950,10 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
96913
96950
|
}
|
|
96914
96951
|
}
|
|
96915
96952
|
function generateName(name) {
|
|
96916
|
-
if ((name.
|
|
96917
|
-
return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), name.
|
|
96953
|
+
if ((name.autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {
|
|
96954
|
+
return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), name.autoGenerate.flags, name.autoGenerate.prefix, name.autoGenerate.suffix);
|
|
96918
96955
|
} else {
|
|
96919
|
-
const autoGenerateId = name.
|
|
96956
|
+
const autoGenerateId = name.autoGenerate.id;
|
|
96920
96957
|
return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name));
|
|
96921
96958
|
}
|
|
96922
96959
|
}
|
|
@@ -97099,26 +97136,26 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
97099
97136
|
}
|
|
97100
97137
|
}
|
|
97101
97138
|
function makeName(name) {
|
|
97102
|
-
const prefix = formatGeneratedNamePart(name.
|
|
97103
|
-
const suffix = formatGeneratedNamePart(name.
|
|
97104
|
-
switch (name.
|
|
97139
|
+
const prefix = formatGeneratedNamePart(name.autoGenerate.prefix, generateName);
|
|
97140
|
+
const suffix = formatGeneratedNamePart(name.autoGenerate.suffix);
|
|
97141
|
+
switch (name.autoGenerate.flags & 7 /* KindMask */) {
|
|
97105
97142
|
case 1 /* Auto */:
|
|
97106
|
-
return makeTempVariableName(TempFlags.Auto, !!(name.
|
|
97143
|
+
return makeTempVariableName(TempFlags.Auto, !!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
|
|
97107
97144
|
case 2 /* Loop */:
|
|
97108
97145
|
Debug.assertNode(name, isIdentifier);
|
|
97109
|
-
return makeTempVariableName(TempFlags._i, !!(name.
|
|
97146
|
+
return makeTempVariableName(TempFlags._i, !!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */), false, prefix, suffix);
|
|
97110
97147
|
case 3 /* Unique */:
|
|
97111
97148
|
return makeUniqueName(
|
|
97112
97149
|
idText(name),
|
|
97113
|
-
name.
|
|
97114
|
-
!!(name.
|
|
97115
|
-
!!(name.
|
|
97150
|
+
name.autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
|
|
97151
|
+
!!(name.autoGenerate.flags & 16 /* Optimistic */),
|
|
97152
|
+
!!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
97116
97153
|
isPrivateIdentifier(name),
|
|
97117
97154
|
prefix,
|
|
97118
97155
|
suffix
|
|
97119
97156
|
);
|
|
97120
97157
|
}
|
|
97121
|
-
return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(name.
|
|
97158
|
+
return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(name.autoGenerate.flags & 7 /* KindMask */, GeneratedIdentifierFlags, true)}.`);
|
|
97122
97159
|
}
|
|
97123
97160
|
function pipelineEmitWithComments(hint, node) {
|
|
97124
97161
|
const pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node);
|
|
@@ -98707,19 +98744,20 @@ function shouldProgramCreateNewSourceFiles(program, newOptions) {
|
|
|
98707
98744
|
return false;
|
|
98708
98745
|
return optionsHaveChanges(program.getCompilerOptions(), newOptions, sourceFileAffectingCompilerOptions);
|
|
98709
98746
|
}
|
|
98710
|
-
function createCreateProgramOptions(rootNames, options, host, oldProgram, configFileParsingDiagnostics) {
|
|
98747
|
+
function createCreateProgramOptions(rootNames, options, host, oldProgram, configFileParsingDiagnostics, typeScriptVersion2) {
|
|
98711
98748
|
return {
|
|
98712
98749
|
rootNames,
|
|
98713
98750
|
options,
|
|
98714
98751
|
host,
|
|
98715
98752
|
oldProgram,
|
|
98716
|
-
configFileParsingDiagnostics
|
|
98753
|
+
configFileParsingDiagnostics,
|
|
98754
|
+
typeScriptVersion: typeScriptVersion2
|
|
98717
98755
|
};
|
|
98718
98756
|
}
|
|
98719
98757
|
function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
|
|
98720
98758
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
98721
98759
|
const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
|
|
98722
|
-
const { rootNames, options, configFileParsingDiagnostics, projectReferences } = createProgramOptions;
|
|
98760
|
+
const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion2 } = createProgramOptions;
|
|
98723
98761
|
let { oldProgram } = createProgramOptions;
|
|
98724
98762
|
let processingDefaultLibFiles;
|
|
98725
98763
|
let processingOtherFiles;
|
|
@@ -100478,7 +100516,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
100478
100516
|
i++;
|
|
100479
100517
|
}
|
|
100480
100518
|
const resolveFrom = combinePaths(currentDirectory, `__lib_node_modules_lookup_${libFileName}__.ts`);
|
|
100481
|
-
const localOverrideModuleResult = resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: 2 /*
|
|
100519
|
+
const localOverrideModuleResult = resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: 2 /* Node10 */ }, host, moduleResolutionCache);
|
|
100482
100520
|
if (localOverrideModuleResult == null ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
100483
100521
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
100484
100522
|
}
|
|
@@ -100651,6 +100689,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
100651
100689
|
} else if (options.incremental && !outputFile && !options.configFilePath) {
|
|
100652
100690
|
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
|
|
100653
100691
|
}
|
|
100692
|
+
verifyDeprecatedCompilerOptions();
|
|
100654
100693
|
verifyProjectReferences();
|
|
100655
100694
|
if (options.composite) {
|
|
100656
100695
|
const rootPaths = new Set(rootNames.map(toPath3));
|
|
@@ -100761,8 +100800,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
100761
100800
|
}
|
|
100762
100801
|
}
|
|
100763
100802
|
if (getResolveJsonModule(options)) {
|
|
100764
|
-
if (getEmitModuleResolutionKind(options)
|
|
100765
|
-
createDiagnosticForOptionName(Diagnostics.
|
|
100803
|
+
if (getEmitModuleResolutionKind(options) === 1 /* Classic */) {
|
|
100804
|
+
createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic, "resolveJsonModule");
|
|
100766
100805
|
} else if (!hasJsonModuleEmitEnabled(options)) {
|
|
100767
100806
|
createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext, "resolveJsonModule", "module");
|
|
100768
100807
|
}
|
|
@@ -100870,6 +100909,56 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
100870
100909
|
}
|
|
100871
100910
|
}
|
|
100872
100911
|
}
|
|
100912
|
+
function verifyDeprecatedCompilerOptions() {
|
|
100913
|
+
const version2 = typeScriptVersion2 || versionMajorMinor;
|
|
100914
|
+
const ignoreDeprecations = options.ignoreDeprecations;
|
|
100915
|
+
if (ignoreDeprecations) {
|
|
100916
|
+
if (ignoreDeprecations === "5.0" /* v5_0 */ && (version2 === "5.0" /* v5_0 */ || version2 === "5.5" /* v5_5 */)) {
|
|
100917
|
+
return;
|
|
100918
|
+
} else {
|
|
100919
|
+
createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations);
|
|
100920
|
+
}
|
|
100921
|
+
}
|
|
100922
|
+
if (options.target === 0 /* ES3 */) {
|
|
100923
|
+
createDeprecatedDiagnosticForOption(version2, "target", "ES3");
|
|
100924
|
+
}
|
|
100925
|
+
if (options.noImplicitUseStrict) {
|
|
100926
|
+
createDeprecatedDiagnosticForOption(version2, "noImplicitUseStrict");
|
|
100927
|
+
}
|
|
100928
|
+
if (options.keyofStringsOnly) {
|
|
100929
|
+
createDeprecatedDiagnosticForOption(version2, "keyofStringsOnly");
|
|
100930
|
+
}
|
|
100931
|
+
if (options.suppressExcessPropertyErrors) {
|
|
100932
|
+
createDeprecatedDiagnosticForOption(version2, "suppressExcessPropertyErrors");
|
|
100933
|
+
}
|
|
100934
|
+
if (options.suppressImplicitAnyIndexErrors) {
|
|
100935
|
+
createDeprecatedDiagnosticForOption(version2, "suppressImplicitAnyIndexErrors");
|
|
100936
|
+
}
|
|
100937
|
+
if (options.noStrictGenericChecks) {
|
|
100938
|
+
createDeprecatedDiagnosticForOption(version2, "noStrictGenericChecks");
|
|
100939
|
+
}
|
|
100940
|
+
if (options.charset) {
|
|
100941
|
+
createDeprecatedDiagnosticForOption(version2, "charset");
|
|
100942
|
+
}
|
|
100943
|
+
if (options.out) {
|
|
100944
|
+
createDeprecatedDiagnosticForOption(version2, "out");
|
|
100945
|
+
}
|
|
100946
|
+
}
|
|
100947
|
+
function createDeprecatedDiagnosticForOption(version2, name, value) {
|
|
100948
|
+
if (version2 === "6.0" /* v6_0 */) {
|
|
100949
|
+
createDiagnosticForOption(!value, name, void 0, Diagnostics.Flag_0_is_deprecated_Please_remove_it_from_your_configuration, value || name);
|
|
100950
|
+
} else {
|
|
100951
|
+
createDiagnosticForOption(
|
|
100952
|
+
!value,
|
|
100953
|
+
name,
|
|
100954
|
+
void 0,
|
|
100955
|
+
Diagnostics.Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_silence_this_error,
|
|
100956
|
+
value || name,
|
|
100957
|
+
"5.5" /* v5_5 */,
|
|
100958
|
+
"5.0" /* v5_0 */
|
|
100959
|
+
);
|
|
100960
|
+
}
|
|
100961
|
+
}
|
|
100873
100962
|
function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) {
|
|
100874
100963
|
var _a3;
|
|
100875
100964
|
let fileIncludeReasons;
|