@typescript-deploys/pr-build 4.5.0-pr-46250-2 → 4.5.0-pr-46464-7

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 CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.5";
72
- ts.version = ts.versionMajorMinor + ".0-insiders.20211007";
72
+ ts.version = ts.versionMajorMinor + ".0-insiders.20211022";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  function tryGetNativeMap() {
@@ -80,19 +80,19 @@ var ts;
80
80
  return typeof Set !== "undefined" && "entries" in Set.prototype && new Set([0]).size === 1 ? Set : undefined;
81
81
  }
82
82
  NativeCollections.tryGetNativeSet = tryGetNativeSet;
83
- })(NativeCollections = ts.NativeCollections || (ts.NativeCollections = {}));
84
- })(ts || (ts = {}));
85
- var ts;
86
- (function (ts) {
83
+ })(NativeCollections || (NativeCollections = {}));
84
+ ts.Map = getCollectionImplementation("Map", "tryGetNativeMap", "createMapShim");
85
+ ts.Set = getCollectionImplementation("Set", "tryGetNativeSet", "createSetShim");
87
86
  function getCollectionImplementation(name, nativeFactory, shimFactory) {
88
87
  var _a;
89
- var constructor = (_a = ts.NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](getIterator);
88
+ var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
90
89
  if (constructor)
91
90
  return constructor;
92
91
  throw new Error("TypeScript requires an environment that provides a compatible native " + name + " implementation.");
93
92
  }
94
- ts.Map = getCollectionImplementation("Map", "tryGetNativeMap", "createMapShim");
95
- ts.Set = getCollectionImplementation("Set", "tryGetNativeSet", "createSetShim");
93
+ })(ts || (ts = {}));
94
+ var ts;
95
+ (function (ts) {
96
96
  function getIterator(iterable) {
97
97
  if (iterable) {
98
98
  if (isArray(iterable))
@@ -5052,6 +5052,10 @@ var ts;
5052
5052
  }
5053
5053
  return sys;
5054
5054
  })();
5055
+ function setSys(s) {
5056
+ ts.sys = s;
5057
+ }
5058
+ ts.setSys = setSys;
5055
5059
  if (ts.sys && ts.sys.getEnvironmentVariable) {
5056
5060
  setCustomPollingValues(ts.sys);
5057
5061
  ts.Debug.setAssertionLevel(/^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV"))
@@ -6559,6 +6563,7 @@ var ts;
6559
6563
  If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, ts.DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),
6560
6564
  This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),
6561
6565
  This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),
6566
+ A_mapped_type_may_not_declare_properties_or_methods: diag(7061, ts.DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."),
6562
6567
  You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
6563
6568
  You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."),
6564
6569
  import_can_only_be_used_in_TypeScript_files: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."),
@@ -6614,7 +6619,7 @@ var ts;
6614
6619
  Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, ts.DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"),
6615
6620
  The_files_list_in_config_file_0_is_empty: diag(18002, ts.DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."),
6616
6621
  No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: diag(18003, ts.DiagnosticCategory.Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),
6617
- File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module: diag(80001, ts.DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001", "File is a CommonJS module; it may be converted to an ES6 module."),
6622
+ File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: diag(80001, ts.DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."),
6618
6623
  This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, ts.DiagnosticCategory.Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."),
6619
6624
  Import_may_be_converted_to_a_default_import: diag(80003, ts.DiagnosticCategory.Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."),
6620
6625
  JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, ts.DiagnosticCategory.Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."),
@@ -6676,7 +6681,7 @@ var ts;
6676
6681
  Install_0: diag(95014, ts.DiagnosticCategory.Message, "Install_0_95014", "Install '{0}'"),
6677
6682
  Replace_import_with_0: diag(95015, ts.DiagnosticCategory.Message, "Replace_import_with_0_95015", "Replace import with '{0}'."),
6678
6683
  Use_synthetic_default_member: diag(95016, ts.DiagnosticCategory.Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."),
6679
- Convert_to_ES6_module: diag(95017, ts.DiagnosticCategory.Message, "Convert_to_ES6_module_95017", "Convert to ES6 module"),
6684
+ Convert_to_ES_module: diag(95017, ts.DiagnosticCategory.Message, "Convert_to_ES_module_95017", "Convert to ES module"),
6680
6685
  Add_undefined_type_to_property_0: diag(95018, ts.DiagnosticCategory.Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"),
6681
6686
  Add_initializer_to_property_0: diag(95019, ts.DiagnosticCategory.Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"),
6682
6687
  Add_definite_assignment_assertion_to_property_0: diag(95020, ts.DiagnosticCategory.Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"),
@@ -15841,7 +15846,7 @@ var ts;
15841
15846
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
15842
15847
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
15843
15848
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
15844
- basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
15849
+ basePaths: getBasePaths(absolutePath, includes, useCaseSensitiveFileNames)
15845
15850
  };
15846
15851
  }
15847
15852
  ts.getFileMatcherPatterns = getFileMatcherPatterns;
@@ -15860,20 +15865,20 @@ var ts;
15860
15865
  var visited = new ts.Map();
15861
15866
  var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
15862
15867
  for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
15863
- var basePath = _a[_i];
15864
- if (directoryExists(basePath)) {
15865
- visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth);
15868
+ var absoluteBasePath = _a[_i];
15869
+ if (directoryExists(absoluteBasePath)) {
15870
+ visitDirectory(absoluteBasePath, depth);
15866
15871
  }
15867
15872
  }
15868
15873
  return ts.flatten(results);
15869
- function visitDirectory(path, absolutePath, depth) {
15874
+ function visitDirectory(absolutePath, depth) {
15870
15875
  var canonicalPath = toCanonical(realpath(absolutePath));
15871
15876
  if (visited.has(canonicalPath))
15872
15877
  return;
15873
15878
  visited.set(canonicalPath, true);
15874
- var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
15879
+ var _a = getFileSystemEntries(absolutePath), files = _a.files, directories = _a.directories;
15875
15880
  var _loop_1 = function (current) {
15876
- var name = ts.combinePaths(path, current);
15881
+ var name = ts.combinePaths(absolutePath, current);
15877
15882
  var absoluteName = ts.combinePaths(absolutePath, current);
15878
15883
  if (extensions && !ts.fileExtensionIsOneOf(name, extensions))
15879
15884
  return "continue";
@@ -15901,28 +15906,27 @@ var ts;
15901
15906
  }
15902
15907
  for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) {
15903
15908
  var current = _d[_c];
15904
- var name = ts.combinePaths(path, current);
15905
15909
  var absoluteName = ts.combinePaths(absolutePath, current);
15906
15910
  if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
15907
15911
  (!excludeRegex || !excludeRegex.test(absoluteName))) {
15908
- visitDirectory(name, absoluteName, depth);
15912
+ visitDirectory(absoluteName, depth);
15909
15913
  }
15910
15914
  }
15911
15915
  }
15912
15916
  }
15913
15917
  ts.matchFiles = matchFiles;
15914
- function getBasePaths(path, includes, useCaseSensitiveFileNames) {
15915
- var basePaths = [path];
15918
+ function getBasePaths(absoluteTsconfigPath, includes, useCaseSensitiveFileNames) {
15919
+ var basePaths = [absoluteTsconfigPath];
15916
15920
  if (includes) {
15917
15921
  var includeBasePaths = [];
15918
15922
  for (var _i = 0, includes_1 = includes; _i < includes_1.length; _i++) {
15919
15923
  var include = includes_1[_i];
15920
- var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include));
15921
- includeBasePaths.push(getIncludeBasePath(absolute));
15924
+ var absoluteIncludePath = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(absoluteTsconfigPath, include));
15925
+ includeBasePaths.push(getIncludeBasePath(absoluteIncludePath));
15922
15926
  }
15923
15927
  includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames));
15924
15928
  var _loop_2 = function (includeBasePath) {
15925
- if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
15929
+ if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, absoluteTsconfigPath, !useCaseSensitiveFileNames); })) {
15926
15930
  basePaths.push(includeBasePath);
15927
15931
  }
15928
15932
  };
@@ -18329,23 +18333,25 @@ var ts;
18329
18333
  ? update(createIndexedAccessTypeNode(objectType, indexType), node)
18330
18334
  : node;
18331
18335
  }
18332
- function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type) {
18336
+ function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) {
18333
18337
  var node = createBaseNode(194);
18334
18338
  node.readonlyToken = readonlyToken;
18335
18339
  node.typeParameter = typeParameter;
18336
18340
  node.nameType = nameType;
18337
18341
  node.questionToken = questionToken;
18338
18342
  node.type = type;
18343
+ node.members = members && createNodeArray(members);
18339
18344
  node.transformFlags = 1;
18340
18345
  return node;
18341
18346
  }
18342
- function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type) {
18347
+ function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) {
18343
18348
  return node.readonlyToken !== readonlyToken
18344
18349
  || node.typeParameter !== typeParameter
18345
18350
  || node.nameType !== nameType
18346
18351
  || node.questionToken !== questionToken
18347
18352
  || node.type !== type
18348
- ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), node)
18353
+ || node.members !== members
18354
+ ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node)
18349
18355
  : node;
18350
18356
  }
18351
18357
  function createLiteralTypeNode(literal) {
@@ -23979,7 +23985,8 @@ var ts;
23979
23985
  visitNode(cbNode, node.typeParameter) ||
23980
23986
  visitNode(cbNode, node.nameType) ||
23981
23987
  visitNode(cbNode, node.questionToken) ||
23982
- visitNode(cbNode, node.type);
23988
+ visitNode(cbNode, node.type) ||
23989
+ visitNodes(cbNode, cbNodes, node.members);
23983
23990
  case 195:
23984
23991
  return visitNode(cbNode, node.literal);
23985
23992
  case 196:
@@ -26324,8 +26331,9 @@ var ts;
26324
26331
  }
26325
26332
  var type = parseTypeAnnotation();
26326
26333
  parseSemicolon();
26334
+ var members = parseList(4, parseTypeMember);
26327
26335
  parseExpected(19);
26328
- return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), pos);
26336
+ return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);
26329
26337
  }
26330
26338
  function parseTupleElementType() {
26331
26339
  var pos = getNodePos();
@@ -29016,16 +29024,21 @@ var ts;
29016
29024
  var pos = getNodePos();
29017
29025
  parseExpected(129);
29018
29026
  var openBracePosition = scanner.getTokenPos();
29019
- parseExpected(18);
29020
- var multiLine = scanner.hasPrecedingLineBreak();
29021
- var elements = parseDelimitedList(24, parseAssertEntry, true);
29022
- if (!parseExpected(19)) {
29023
- var lastError = ts.lastOrUndefined(parseDiagnostics);
29024
- if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
29025
- ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
29027
+ if (parseExpected(18)) {
29028
+ var multiLine = scanner.hasPrecedingLineBreak();
29029
+ var elements = parseDelimitedList(24, parseAssertEntry, true);
29030
+ if (!parseExpected(19)) {
29031
+ var lastError = ts.lastOrUndefined(parseDiagnostics);
29032
+ if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
29033
+ ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
29034
+ }
29026
29035
  }
29036
+ return finishNode(factory.createAssertClause(elements, multiLine), pos);
29037
+ }
29038
+ else {
29039
+ var elements = createNodeArray([], getNodePos(), undefined, false);
29040
+ return finishNode(factory.createAssertClause(elements, false), pos);
29027
29041
  }
29028
- return finishNode(factory.createAssertClause(elements, multiLine), pos);
29029
29042
  }
29030
29043
  function tokenAfterImportDefinitelyProducesImportDeclaration() {
29031
29044
  return token() === 41 || token() === 18;
@@ -29792,8 +29805,9 @@ var ts;
29792
29805
  return finishNode(factory.createJSDocTypeTag(tagName, typeExpression, comments), start);
29793
29806
  }
29794
29807
  function parseSeeTag(start, tagName, indent, indentText) {
29795
- var isLink = lookAhead(function () { return nextTokenJSDoc() === 59 && ts.tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && scanner.getTokenValue() === "link"; });
29796
- var nameExpression = isLink ? undefined : parseJSDocNameReference();
29808
+ var isMarkdownOrJSDocLink = token() === 22
29809
+ || lookAhead(function () { return nextTokenJSDoc() === 59 && ts.tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && scanner.getTokenValue() === "link"; });
29810
+ var nameExpression = isMarkdownOrJSDocLink ? undefined : parseJSDocNameReference();
29797
29811
  var comments = indent !== undefined && indentText !== undefined ? parseTrailingTagComments(start, getNodePos(), indent, indentText) : undefined;
29798
29812
  return finishNode(factory.createJSDocSeeTag(tagName, nameExpression, comments), start);
29799
29813
  }
@@ -30659,7 +30673,7 @@ var ts;
30659
30673
  })(ts || (ts = {}));
30660
30674
  var ts;
30661
30675
  (function (ts) {
30662
- ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
30676
+ ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean", defaultValueDescription: "false" };
30663
30677
  var jsxOptionMap = new ts.Map(ts.getEntries({
30664
30678
  "preserve": 1,
30665
30679
  "react-native": 3,
@@ -30775,6 +30789,7 @@ var ts;
30775
30789
  type: "boolean",
30776
30790
  category: ts.Diagnostics.Watch_and_Build_Modes,
30777
30791
  description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
30792
+ defaultValueDescription: "false",
30778
30793
  },
30779
30794
  {
30780
30795
  name: "excludeDirectories",
@@ -30809,11 +30824,13 @@ var ts;
30809
30824
  showInSimplifiedHelpView: true,
30810
30825
  category: ts.Diagnostics.Command_line_Options,
30811
30826
  description: ts.Diagnostics.Print_this_message,
30827
+ defaultValueDescription: "false",
30812
30828
  },
30813
30829
  {
30814
30830
  name: "help",
30815
30831
  shortName: "?",
30816
- type: "boolean"
30832
+ type: "boolean",
30833
+ defaultValueDescription: "false",
30817
30834
  },
30818
30835
  {
30819
30836
  name: "watch",
@@ -30823,6 +30840,7 @@ var ts;
30823
30840
  isCommandLineOnly: true,
30824
30841
  category: ts.Diagnostics.Command_line_Options,
30825
30842
  description: ts.Diagnostics.Watch_input_files,
30843
+ defaultValueDescription: "false",
30826
30844
  },
30827
30845
  {
30828
30846
  name: "preserveWatchOutput",
@@ -30830,7 +30848,7 @@ var ts;
30830
30848
  showInSimplifiedHelpView: false,
30831
30849
  category: ts.Diagnostics.Output_Formatting,
30832
30850
  description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
30833
- defaultValueDescription: "n/a"
30851
+ defaultValueDescription: "false",
30834
30852
  },
30835
30853
  {
30836
30854
  name: "listFiles",
@@ -30843,7 +30861,8 @@ var ts;
30843
30861
  name: "explainFiles",
30844
30862
  type: "boolean",
30845
30863
  category: ts.Diagnostics.Compiler_Diagnostics,
30846
- description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included
30864
+ description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
30865
+ defaultValueDescription: "false",
30847
30866
  },
30848
30867
  {
30849
30868
  name: "listEmittedFiles",
@@ -30914,7 +30933,8 @@ var ts;
30914
30933
  affectsSemanticDiagnostics: true,
30915
30934
  affectsEmit: true,
30916
30935
  category: ts.Diagnostics.Watch_and_Build_Modes,
30917
- description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it
30936
+ description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
30937
+ defaultValueDescription: "false",
30918
30938
  },
30919
30939
  {
30920
30940
  name: "locale",
@@ -30957,6 +30977,7 @@ var ts;
30957
30977
  showInSimplifiedHelpView: true,
30958
30978
  category: ts.Diagnostics.Command_line_Options,
30959
30979
  description: ts.Diagnostics.Show_all_compiler_options,
30980
+ defaultValueDescription: "false",
30960
30981
  },
30961
30982
  {
30962
30983
  name: "version",
@@ -30965,6 +30986,7 @@ var ts;
30965
30986
  showInSimplifiedHelpView: true,
30966
30987
  category: ts.Diagnostics.Command_line_Options,
30967
30988
  description: ts.Diagnostics.Print_the_compiler_s_version,
30989
+ defaultValueDescription: "false",
30968
30990
  },
30969
30991
  {
30970
30992
  name: "init",
@@ -30972,6 +30994,7 @@ var ts;
30972
30994
  showInSimplifiedHelpView: true,
30973
30995
  category: ts.Diagnostics.Command_line_Options,
30974
30996
  description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
30997
+ defaultValueDescription: "false",
30975
30998
  },
30976
30999
  {
30977
31000
  name: "project",
@@ -30989,7 +31012,8 @@ var ts;
30989
31012
  shortName: "b",
30990
31013
  showInSimplifiedHelpView: true,
30991
31014
  category: ts.Diagnostics.Command_line_Options,
30992
- description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date
31015
+ description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
31016
+ defaultValueDescription: "false",
30993
31017
  },
30994
31018
  {
30995
31019
  name: "showConfig",
@@ -30997,7 +31021,8 @@ var ts;
30997
31021
  showInSimplifiedHelpView: true,
30998
31022
  category: ts.Diagnostics.Command_line_Options,
30999
31023
  isCommandLineOnly: true,
31000
- description: ts.Diagnostics.Print_the_final_configuration_instead_of_building
31024
+ description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
31025
+ defaultValueDescription: "false",
31001
31026
  },
31002
31027
  {
31003
31028
  name: "listFilesOnly",
@@ -31006,7 +31031,8 @@ var ts;
31006
31031
  affectsSemanticDiagnostics: true,
31007
31032
  affectsEmit: true,
31008
31033
  isCommandLineOnly: true,
31009
- description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing
31034
+ description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
31035
+ defaultValueDescription: "false",
31010
31036
  },
31011
31037
  ts.targetOptionDeclaration,
31012
31038
  {
@@ -31125,7 +31151,6 @@ var ts;
31125
31151
  category: ts.Diagnostics.Emit,
31126
31152
  description: ts.Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,
31127
31153
  transpileOptionValue: undefined,
31128
- defaultValueDescription: "n/a"
31129
31154
  },
31130
31155
  {
31131
31156
  name: "outDir",
@@ -31136,7 +31161,6 @@ var ts;
31136
31161
  showInSimplifiedHelpView: true,
31137
31162
  category: ts.Diagnostics.Emit,
31138
31163
  description: ts.Diagnostics.Specify_an_output_folder_for_all_emitted_files,
31139
- defaultValueDescription: "n/a"
31140
31164
  },
31141
31165
  {
31142
31166
  name: "rootDir",
@@ -31290,6 +31314,7 @@ var ts;
31290
31314
  strictFlag: true,
31291
31315
  category: ts.Diagnostics.Type_Checking,
31292
31316
  description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
31317
+ defaultValueDescription: "false",
31293
31318
  },
31294
31319
  {
31295
31320
  name: "alwaysStrict",
@@ -31321,7 +31346,8 @@ var ts;
31321
31346
  type: "boolean",
31322
31347
  affectsSemanticDiagnostics: true,
31323
31348
  category: ts.Diagnostics.Type_Checking,
31324
- description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined
31349
+ description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
31350
+ defaultValueDescription: "false",
31325
31351
  },
31326
31352
  {
31327
31353
  name: "noImplicitReturns",
@@ -31337,21 +31363,24 @@ var ts;
31337
31363
  affectsBindDiagnostics: true,
31338
31364
  affectsSemanticDiagnostics: true,
31339
31365
  category: ts.Diagnostics.Type_Checking,
31340
- description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements
31366
+ description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
31367
+ defaultValueDescription: "false",
31341
31368
  },
31342
31369
  {
31343
31370
  name: "noUncheckedIndexedAccess",
31344
31371
  type: "boolean",
31345
31372
  affectsSemanticDiagnostics: true,
31346
31373
  category: ts.Diagnostics.Type_Checking,
31347
- description: ts.Diagnostics.Include_undefined_in_index_signature_results
31374
+ description: ts.Diagnostics.Include_undefined_in_index_signature_results,
31375
+ defaultValueDescription: "false",
31348
31376
  },
31349
31377
  {
31350
31378
  name: "noImplicitOverride",
31351
31379
  type: "boolean",
31352
31380
  affectsSemanticDiagnostics: true,
31353
31381
  category: ts.Diagnostics.Type_Checking,
31354
- description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier
31382
+ description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
31383
+ defaultValueDescription: "false",
31355
31384
  },
31356
31385
  {
31357
31386
  name: "noPropertyAccessFromIndexSignature",
@@ -31455,7 +31484,7 @@ var ts;
31455
31484
  type: "boolean",
31456
31485
  category: ts.Diagnostics.Interop_Constraints,
31457
31486
  description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
31458
- defaultValueDescription: "n/a"
31487
+ defaultValueDescription: "false",
31459
31488
  },
31460
31489
  {
31461
31490
  name: "allowUmdGlobalAccess",
@@ -31502,7 +31531,8 @@ var ts;
31502
31531
  type: "boolean",
31503
31532
  affectsSemanticDiagnostics: true,
31504
31533
  category: ts.Diagnostics.Language_and_Environment,
31505
- description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators
31534
+ description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
31535
+ defaultValueDescription: "false",
31506
31536
  },
31507
31537
  {
31508
31538
  name: "emitDecoratorMetadata",
@@ -31510,7 +31540,8 @@ var ts;
31510
31540
  affectsSemanticDiagnostics: true,
31511
31541
  affectsEmit: true,
31512
31542
  category: ts.Diagnostics.Language_and_Environment,
31513
- description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files
31543
+ description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
31544
+ defaultValueDescription: "false",
31514
31545
  },
31515
31546
  {
31516
31547
  name: "jsxFactory",
@@ -31551,7 +31582,6 @@ var ts;
31551
31582
  category: ts.Diagnostics.Backwards_Compatibility,
31552
31583
  paramType: ts.Diagnostics.FILE,
31553
31584
  transpileOptionValue: undefined,
31554
- defaultValueDescription: "n/a",
31555
31585
  description: ts.Diagnostics.Deprecated_setting_Use_outFile_instead,
31556
31586
  },
31557
31587
  {
@@ -31628,6 +31658,7 @@ var ts;
31628
31658
  affectsEmit: true,
31629
31659
  category: ts.Diagnostics.Emit,
31630
31660
  description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
31661
+ defaultValueDescription: "false",
31631
31662
  },
31632
31663
  {
31633
31664
  name: "disableSizeLimit",
@@ -31642,21 +31673,24 @@ var ts;
31642
31673
  type: "boolean",
31643
31674
  isTSConfigOnly: true,
31644
31675
  category: ts.Diagnostics.Projects,
31645
- description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects
31676
+ description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
31677
+ defaultValueDescription: "false",
31646
31678
  },
31647
31679
  {
31648
31680
  name: "disableSolutionSearching",
31649
31681
  type: "boolean",
31650
31682
  isTSConfigOnly: true,
31651
31683
  category: ts.Diagnostics.Projects,
31652
- description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing
31684
+ description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
31685
+ defaultValueDescription: "false",
31653
31686
  },
31654
31687
  {
31655
31688
  name: "disableReferencedProjectLoad",
31656
31689
  type: "boolean",
31657
31690
  isTSConfigOnly: true,
31658
31691
  category: ts.Diagnostics.Projects,
31659
- description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript
31692
+ description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
31693
+ defaultValueDescription: "false",
31660
31694
  },
31661
31695
  {
31662
31696
  name: "noImplicitUseStrict",
@@ -31689,7 +31723,7 @@ var ts;
31689
31723
  affectsEmit: true,
31690
31724
  category: ts.Diagnostics.Emit,
31691
31725
  description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
31692
- defaultValueDescription: "n/a"
31726
+ defaultValueDescription: "false",
31693
31727
  },
31694
31728
  {
31695
31729
  name: "declarationDir",
@@ -31700,7 +31734,6 @@ var ts;
31700
31734
  category: ts.Diagnostics.Emit,
31701
31735
  transpileOptionValue: undefined,
31702
31736
  description: ts.Diagnostics.Specify_the_output_directory_for_generated_declaration_files,
31703
- defaultValueDescription: "n/a"
31704
31737
  },
31705
31738
  {
31706
31739
  name: "skipLibCheck",
@@ -31782,6 +31815,7 @@ var ts;
31782
31815
  affectsEmit: true,
31783
31816
  category: ts.Diagnostics.Emit,
31784
31817
  description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
31818
+ defaultValueDescription: "false",
31785
31819
  },
31786
31820
  {
31787
31821
  name: "keyofStringsOnly",
@@ -31819,27 +31853,31 @@ var ts;
31819
31853
  shortName: "v",
31820
31854
  category: ts.Diagnostics.Command_line_Options,
31821
31855
  description: ts.Diagnostics.Enable_verbose_logging,
31822
- type: "boolean"
31856
+ type: "boolean",
31857
+ defaultValueDescription: "false",
31823
31858
  },
31824
31859
  {
31825
31860
  name: "dry",
31826
31861
  shortName: "d",
31827
31862
  category: ts.Diagnostics.Command_line_Options,
31828
31863
  description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
31829
- type: "boolean"
31864
+ type: "boolean",
31865
+ defaultValueDescription: "false",
31830
31866
  },
31831
31867
  {
31832
31868
  name: "force",
31833
31869
  shortName: "f",
31834
31870
  category: ts.Diagnostics.Command_line_Options,
31835
31871
  description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
31836
- type: "boolean"
31872
+ type: "boolean",
31873
+ defaultValueDescription: "false",
31837
31874
  },
31838
31875
  {
31839
31876
  name: "clean",
31840
31877
  category: ts.Diagnostics.Command_line_Options,
31841
31878
  description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
31842
- type: "boolean"
31879
+ type: "boolean",
31880
+ defaultValueDescription: "false",
31843
31881
  }
31844
31882
  ];
31845
31883
  ts.buildOpts = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), ts.optionsForBuild, true);
@@ -31847,10 +31885,12 @@ var ts;
31847
31885
  {
31848
31886
  name: "enableAutoDiscovery",
31849
31887
  type: "boolean",
31888
+ defaultValueDescription: "false",
31850
31889
  },
31851
31890
  {
31852
31891
  name: "enable",
31853
31892
  type: "boolean",
31893
+ defaultValueDescription: "false",
31854
31894
  },
31855
31895
  {
31856
31896
  name: "include",
@@ -31871,6 +31911,7 @@ var ts;
31871
31911
  {
31872
31912
  name: "disableFilenameBasedTypeAcquisition",
31873
31913
  type: "boolean",
31914
+ defaultValueDescription: "false",
31874
31915
  },
31875
31916
  ];
31876
31917
  function createOptionNameMap(optionDeclarations) {
@@ -40633,7 +40674,8 @@ var ts;
40633
40674
  ((_d = ts.findAncestor(location, ts.isExportDeclaration)) === null || _d === void 0 ? void 0 : _d.moduleSpecifier) ||
40634
40675
  ((_e = (ts.isModuleDeclaration(location) ? location : location.parent && ts.isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : undefined)) === null || _e === void 0 ? void 0 : _e.name) ||
40635
40676
  ((_f = (ts.isLiteralImportTypeNode(location) ? location : undefined)) === null || _f === void 0 ? void 0 : _f.argument.literal);
40636
- var resolvedModule = ts.getResolvedModule(currentSourceFile, moduleReference, contextSpecifier && ts.isStringLiteralLike(contextSpecifier) ? ts.getModeForUsageLocation(currentSourceFile, contextSpecifier) : undefined);
40677
+ var mode = contextSpecifier && ts.isStringLiteralLike(contextSpecifier) ? ts.getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat;
40678
+ var resolvedModule = ts.getResolvedModule(currentSourceFile, moduleReference, mode);
40637
40679
  var resolutionDiagnostic = resolvedModule && ts.getResolutionDiagnostic(compilerOptions, resolvedModule);
40638
40680
  var sourceFile = resolvedModule && !resolutionDiagnostic && host.getSourceFile(resolvedModule.resolvedFileName);
40639
40681
  if (sourceFile) {
@@ -41918,7 +41960,7 @@ var ts;
41918
41960
  var typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type), context, appropriateConstraintTypeNode);
41919
41961
  var nameTypeNode = type.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type), context) : undefined;
41920
41962
  var templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type), !!(getMappedTypeModifiers(type) & 4)), context);
41921
- var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode);
41963
+ var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode, undefined);
41922
41964
  context.approximateLength += 10;
41923
41965
  return ts.setEmitFlags(mappedTypeNode, 1);
41924
41966
  }
@@ -47846,7 +47888,7 @@ var ts;
47846
47888
  return false;
47847
47889
  switch (node.kind) {
47848
47890
  case 79:
47849
- return node.escapedText === argumentsSymbol.escapedName && getResolvedSymbol(node) === argumentsSymbol;
47891
+ return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol;
47850
47892
  case 166:
47851
47893
  case 168:
47852
47894
  case 171:
@@ -50128,12 +50170,6 @@ var ts;
50128
50170
  }
50129
50171
  return type[cache] = type;
50130
50172
  }
50131
- function isConditionalTypeAlwaysTrueDisregardingInferTypes(type) {
50132
- var extendsInferParamMapper = type.root.inferTypeParameters && createTypeMapper(type.root.inferTypeParameters, ts.map(type.root.inferTypeParameters, function () { return wildcardType; }));
50133
- var checkType = type.checkType;
50134
- var extendsType = type.extendsType;
50135
- return isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(instantiateType(extendsType, extendsInferParamMapper)));
50136
- }
50137
50173
  function getSimplifiedConditionalType(type, writing) {
50138
50174
  var checkType = type.checkType;
50139
50175
  var extendsType = type.extendsType;
@@ -50385,6 +50421,10 @@ var ts;
50385
50421
  }
50386
50422
  return result;
50387
50423
  }
50424
+ function isDistributionDependent(root) {
50425
+ return root.isDistributive && (isTypeParameterPossiblyReferenced(root.checkType, root.node.trueType) ||
50426
+ isTypeParameterPossiblyReferenced(root.checkType, root.node.falseType));
50427
+ }
50388
50428
  function getTypeFromConditionalTypeNode(node) {
50389
50429
  var links = getNodeLinks(node);
50390
50430
  if (!links.resolvedType) {
@@ -53149,26 +53189,21 @@ var ts;
53149
53189
  }
53150
53190
  }
53151
53191
  else if (target.flags & 16777216) {
53152
- var c = target;
53153
- var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
53154
- var skipFalse = !skipTrue && isConditionalTypeAlwaysTrueDisregardingInferTypes(c);
53155
- var distributionMapper = void 0;
53156
- var checkVar = getActualTypeVariable(c.root.checkType);
53157
- if (c.root.isDistributive && checkVar.flags & 262144) {
53158
- var newParam = cloneTypeParameter(checkVar);
53159
- distributionMapper = prependTypeMapping(checkVar, newParam, c.mapper);
53160
- newParam.mapper = distributionMapper;
53161
- }
53162
- var expanding = isDeeplyNestedType(target, targetStack, targetDepth);
53163
- var localResult = expanding ? 3 : undefined;
53164
- if (skipTrue || expanding || (localResult = isRelatedTo(source, distributionMapper ? instantiateType(getTypeFromTypeNode(c.root.node.trueType), distributionMapper) : getTrueTypeFromConditionalType(c), 2, false))) {
53165
- if (!skipFalse && !expanding) {
53166
- localResult = (localResult || 3) & isRelatedTo(source, distributionMapper ? instantiateType(getTypeFromTypeNode(c.root.node.falseType), distributionMapper) : getFalseTypeFromConditionalType(c), 2, false);
53167
- }
53168
- }
53169
- if (localResult) {
53192
+ if (isDeeplyNestedType(target, targetStack, targetDepth, 10)) {
53170
53193
  resetErrorInfo(saveErrorInfo);
53171
- return localResult;
53194
+ return 3;
53195
+ }
53196
+ var c = target;
53197
+ if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
53198
+ var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
53199
+ var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
53200
+ if (result = skipTrue ? -1 : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2, false)) {
53201
+ result &= skipFalse ? -1 : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2, false);
53202
+ if (result) {
53203
+ resetErrorInfo(saveErrorInfo);
53204
+ return result;
53205
+ }
53206
+ }
53172
53207
  }
53173
53208
  }
53174
53209
  else if (target.flags & 134217728) {
@@ -53233,26 +53268,28 @@ var ts;
53233
53268
  }
53234
53269
  }
53235
53270
  else if (source.flags & 16777216) {
53271
+ if (isDeeplyNestedType(source, sourceStack, sourceDepth, 10)) {
53272
+ resetErrorInfo(saveErrorInfo);
53273
+ return 3;
53274
+ }
53236
53275
  if (target.flags & 16777216) {
53237
- if (!isDeeplyNestedType(source, sourceStack, sourceDepth) && !isDeeplyNestedType(target, targetStack, targetDepth)) {
53238
- var sourceParams = source.root.inferTypeParameters;
53239
- var sourceExtends = source.extendsType;
53240
- var mapper = void 0;
53241
- if (sourceParams) {
53242
- var ctx = createInferenceContext(sourceParams, undefined, 0, isRelatedToWorker);
53243
- inferTypes(ctx.inferences, target.extendsType, sourceExtends, 512 | 1024);
53244
- sourceExtends = instantiateType(sourceExtends, ctx.mapper);
53245
- mapper = ctx.mapper;
53276
+ var sourceParams = source.root.inferTypeParameters;
53277
+ var sourceExtends = source.extendsType;
53278
+ var mapper = void 0;
53279
+ if (sourceParams) {
53280
+ var ctx = createInferenceContext(sourceParams, undefined, 0, isRelatedToWorker);
53281
+ inferTypes(ctx.inferences, target.extendsType, sourceExtends, 512 | 1024);
53282
+ sourceExtends = instantiateType(sourceExtends, ctx.mapper);
53283
+ mapper = ctx.mapper;
53284
+ }
53285
+ if (isTypeIdenticalTo(sourceExtends, target.extendsType) &&
53286
+ (isRelatedTo(source.checkType, target.checkType, 3) || isRelatedTo(target.checkType, source.checkType, 3))) {
53287
+ if (result = isRelatedTo(instantiateType(getTrueTypeFromConditionalType(source), mapper), getTrueTypeFromConditionalType(target), 3, reportErrors)) {
53288
+ result &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), 3, reportErrors);
53246
53289
  }
53247
- if (isTypeIdenticalTo(sourceExtends, target.extendsType) &&
53248
- (isRelatedTo(source.checkType, target.checkType, 3) || isRelatedTo(target.checkType, source.checkType, 3))) {
53249
- if (result = isRelatedTo(instantiateType(getTrueTypeFromConditionalType(source), mapper), getTrueTypeFromConditionalType(target), 3, reportErrors)) {
53250
- result &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), 3, reportErrors);
53251
- }
53252
- if (result) {
53253
- resetErrorInfo(saveErrorInfo);
53254
- return result;
53255
- }
53290
+ if (result) {
53291
+ resetErrorInfo(saveErrorInfo);
53292
+ return result;
53256
53293
  }
53257
53294
  }
53258
53295
  }
@@ -53265,13 +53302,11 @@ var ts;
53265
53302
  }
53266
53303
  }
53267
53304
  }
53268
- if (!isDeeplyNestedType(source, sourceStack, sourceDepth)) {
53269
- var defaultConstraint = getDefaultConstraintOfConditionalType(source);
53270
- if (defaultConstraint) {
53271
- if (result = isRelatedTo(defaultConstraint, target, 1, reportErrors)) {
53272
- resetErrorInfo(saveErrorInfo);
53273
- return result;
53274
- }
53305
+ var defaultConstraint = getDefaultConstraintOfConditionalType(source);
53306
+ if (defaultConstraint) {
53307
+ if (result = isRelatedTo(defaultConstraint, target, 1, reportErrors)) {
53308
+ resetErrorInfo(saveErrorInfo);
53309
+ return result;
53275
53310
  }
53276
53311
  }
53277
53312
  }
@@ -54215,14 +54250,15 @@ var ts;
54215
54250
  return forEachProperty(prop, function (p) { return ts.getDeclarationModifierFlagsFromSymbol(p, writing) & 16 ?
54216
54251
  !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
54217
54252
  }
54218
- function isDeeplyNestedType(type, stack, depth) {
54219
- if (depth >= 5) {
54253
+ function isDeeplyNestedType(type, stack, depth, maxDepth) {
54254
+ if (maxDepth === void 0) { maxDepth = 5; }
54255
+ if (depth >= maxDepth) {
54220
54256
  var identity_1 = getRecursionIdentity(type);
54221
54257
  var count = 0;
54222
54258
  for (var i = 0; i < depth; i++) {
54223
54259
  if (getRecursionIdentity(stack[i]) === identity_1) {
54224
54260
  count++;
54225
- if (count >= 5) {
54261
+ if (count >= maxDepth) {
54226
54262
  return true;
54227
54263
  }
54228
54264
  }
@@ -55872,15 +55908,14 @@ var ts;
55872
55908
  var inferredType = void 0;
55873
55909
  var signature = context.signature;
55874
55910
  if (signature) {
55875
- var inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : undefined;
55911
+ var inferredCovariantType_1 = inference.candidates ? getCovariantInference(inference, signature) : undefined;
55876
55912
  if (inference.contraCandidates) {
55877
- var inferredContravariantType = getContravariantInference(inference);
55878
- inferredType = inferredCovariantType && !(inferredCovariantType.flags & 131072) &&
55879
- isTypeSubtypeOf(inferredCovariantType, inferredContravariantType) ?
55880
- inferredCovariantType : inferredContravariantType;
55913
+ inferredType = inferredCovariantType_1 && !(inferredCovariantType_1.flags & 131072) &&
55914
+ ts.some(inference.contraCandidates, function (t) { return isTypeSubtypeOf(inferredCovariantType_1, t); }) ?
55915
+ inferredCovariantType_1 : getContravariantInference(inference);
55881
55916
  }
55882
- else if (inferredCovariantType) {
55883
- inferredType = inferredCovariantType;
55917
+ else if (inferredCovariantType_1) {
55918
+ inferredType = inferredCovariantType_1;
55884
55919
  }
55885
55920
  else if (context.flags & 1) {
55886
55921
  inferredType = silentNeverType;
@@ -56154,7 +56189,8 @@ var ts;
56154
56189
  }
56155
56190
  function getKeyPropertyName(unionType) {
56156
56191
  var types = unionType.types;
56157
- if (types.length < 10 || ts.getObjectFlags(unionType) & 65536) {
56192
+ if (types.length < 10 || ts.getObjectFlags(unionType) & 65536 ||
56193
+ ts.countWhere(types, function (t) { return !!(t.flags & (524288 | 58982400)); }) < 10) {
56158
56194
  return undefined;
56159
56195
  }
56160
56196
  if (unionType.keyPropertyName === undefined) {
@@ -56183,7 +56219,7 @@ var ts;
56183
56219
  var keyPropertyName = getKeyPropertyName(unionType);
56184
56220
  var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind === 294 &&
56185
56221
  p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer); });
56186
- var propType = propNode && getTypeOfExpression(propNode.initializer);
56222
+ var propType = propNode && getContextFreeTypeOfExpression(propNode.initializer);
56187
56223
  return propType && getConstituentTypeForKeyType(unionType, propType);
56188
56224
  }
56189
56225
  function isOrContainsMatchingReference(source, target) {
@@ -58959,7 +58995,7 @@ var ts;
58959
58995
  return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 294 && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); }), function (prop) { return [function () { return getContextFreeTypeOfExpression(prop.initializer); }, prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
58960
58996
  }
58961
58997
  function discriminateContextualTypeByJSXAttributes(node, contextualType) {
58962
- return discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 284 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer)); }), function (prop) { return [!prop.initializer ? (function () { return trueType; }) : (function () { return checkExpression(prop.initializer); }), prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
58998
+ return discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 284 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer)); }), function (prop) { return [!prop.initializer ? (function () { return trueType; }) : (function () { return getContextFreeTypeOfExpression(prop.initializer); }), prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
58963
58999
  }
58964
59000
  function getApparentTypeOfContextualType(node, contextFlags) {
58965
59001
  var contextualType = ts.isObjectLiteralMethod(node) ?
@@ -59414,6 +59450,10 @@ var ts;
59414
59450
  function checkComputedPropertyName(node) {
59415
59451
  var links = getNodeLinks(node.expression);
59416
59452
  if (!links.resolvedType) {
59453
+ if ((ts.isTypeLiteralNode(node.parent.parent) || ts.isClassLike(node.parent.parent) || ts.isInterfaceDeclaration(node.parent.parent))
59454
+ && ts.isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 101) {
59455
+ return links.resolvedType = errorType;
59456
+ }
59417
59457
  links.resolvedType = checkExpression(node.expression);
59418
59458
  if (ts.isPropertyDeclaration(node.parent) && !ts.hasStaticModifier(node.parent) && ts.isClassExpression(node.parent.parent)) {
59419
59459
  var container = ts.getEnclosingBlockScopeContainer(node.parent.parent);
@@ -60671,7 +60711,7 @@ var ts;
60671
60711
  if (relatedInfo) {
60672
60712
  ts.addRelatedInfo(resultDiagnostic, relatedInfo);
60673
60713
  }
60674
- addErrorOrSuggestion(!isUncheckedJS, resultDiagnostic);
60714
+ addErrorOrSuggestion(!isUncheckedJS || errorInfo.code !== ts.Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, resultDiagnostic);
60675
60715
  }
60676
60716
  function containerSeemsToBeEmptyDomElement(containingType) {
60677
60717
  return (compilerOptions.lib && !compilerOptions.lib.includes("dom")) &&
@@ -64610,6 +64650,7 @@ var ts;
64610
64650
  var parent = node.parent;
64611
64651
  return ts.isAssertionExpression(parent) && ts.isConstTypeReference(parent.type) ||
64612
64652
  ts.isJSDocTypeAssertion(parent) && ts.isConstTypeReference(ts.getJSDocTypeAssertionType(parent)) ||
64653
+ ts.isComputedPropertyName(parent) ||
64613
64654
  (ts.isParenthesizedExpression(parent) || ts.isArrayLiteralExpression(parent) || ts.isSpreadElement(parent)) && isConstContext(parent) ||
64614
64655
  (ts.isPropertyAssignment(parent) || ts.isShorthandPropertyAssignment(parent) || ts.isTemplateSpan(parent)) && isConstContext(parent.parent);
64615
64656
  }
@@ -65543,7 +65584,7 @@ var ts;
65543
65584
  ts.forEach(node.members, checkSourceElement);
65544
65585
  if (produceDiagnostics) {
65545
65586
  var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
65546
- checkIndexConstraints(type);
65587
+ checkIndexConstraints(type, type.symbol);
65547
65588
  checkTypeForDuplicateIndexSignatures(node);
65548
65589
  checkObjectTypeForDuplicateDeclarations(node);
65549
65590
  }
@@ -65635,6 +65676,7 @@ var ts;
65635
65676
  checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
65636
65677
  }
65637
65678
  function checkMappedType(node) {
65679
+ checkGrammarMappedType(node);
65638
65680
  checkSourceElement(node.typeParameter);
65639
65681
  checkSourceElement(node.nameType);
65640
65682
  checkSourceElement(node.type);
@@ -65651,6 +65693,12 @@ var ts;
65651
65693
  checkTypeAssignableTo(constraintType, keyofConstraintType, ts.getEffectiveConstraintOfTypeParameter(node.typeParameter));
65652
65694
  }
65653
65695
  }
65696
+ function checkGrammarMappedType(node) {
65697
+ var _a;
65698
+ if ((_a = node.members) === null || _a === void 0 ? void 0 : _a.length) {
65699
+ return grammarErrorOnNode(node.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
65700
+ }
65701
+ }
65654
65702
  function checkThisType(node) {
65655
65703
  getTypeFromThisTypeNode(node);
65656
65704
  }
@@ -67987,7 +68035,7 @@ var ts;
67987
68035
  checkBlock(node.finallyBlock);
67988
68036
  }
67989
68037
  }
67990
- function checkIndexConstraints(type, isStaticIndex) {
68038
+ function checkIndexConstraints(type, symbol, isStaticIndex) {
67991
68039
  var indexInfos = getIndexInfosOfType(type);
67992
68040
  if (indexInfos.length === 0) {
67993
68041
  return;
@@ -67998,13 +68046,13 @@ var ts;
67998
68046
  checkIndexConstraintForProperty(type, prop, getLiteralTypeFromProperty(prop, 8576, true), getNonMissingTypeOfSymbol(prop));
67999
68047
  }
68000
68048
  }
68001
- var typeDeclaration = type.symbol.valueDeclaration;
68049
+ var typeDeclaration = symbol.valueDeclaration;
68002
68050
  if (typeDeclaration && ts.isClassLike(typeDeclaration)) {
68003
68051
  for (var _b = 0, _c = typeDeclaration.members; _b < _c.length; _b++) {
68004
68052
  var member = _c[_b];
68005
68053
  if (!ts.isStatic(member) && !hasBindableName(member)) {
68006
- var symbol = getSymbolOfNode(member);
68007
- checkIndexConstraintForProperty(type, symbol, getTypeOfExpression(member.name.expression), getNonMissingTypeOfSymbol(symbol));
68054
+ var symbol_3 = getSymbolOfNode(member);
68055
+ checkIndexConstraintForProperty(type, symbol_3, getTypeOfExpression(member.name.expression), getNonMissingTypeOfSymbol(symbol_3));
68008
68056
  }
68009
68057
  }
68010
68058
  }
@@ -68289,8 +68337,8 @@ var ts;
68289
68337
  }
68290
68338
  }
68291
68339
  if (produceDiagnostics) {
68292
- checkIndexConstraints(type);
68293
- checkIndexConstraints(staticType, true);
68340
+ checkIndexConstraints(type, symbol);
68341
+ checkIndexConstraints(staticType, symbol, true);
68294
68342
  checkTypeForDuplicateIndexSignatures(node);
68295
68343
  checkPropertyInitialization(node);
68296
68344
  }
@@ -68641,7 +68689,7 @@ var ts;
68641
68689
  var baseType = _a[_i];
68642
68690
  checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType, type.thisType), node.name, ts.Diagnostics.Interface_0_incorrectly_extends_interface_1);
68643
68691
  }
68644
- checkIndexConstraints(type);
68692
+ checkIndexConstraints(type, symbol);
68645
68693
  }
68646
68694
  }
68647
68695
  checkObjectTypeForDuplicateDeclarations(node);
@@ -72467,6 +72515,9 @@ var ts;
72467
72515
  }
72468
72516
  }
72469
72517
  function checkGrammarProperty(node) {
72518
+ if (ts.isComputedPropertyName(node.name) && ts.isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101) {
72519
+ return grammarErrorOnNode(node.parent.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
72520
+ }
72470
72521
  if (ts.isClassLike(node.parent)) {
72471
72522
  if (ts.isStringLiteral(node.name) && node.name.text === "constructor") {
72472
72523
  return grammarErrorOnNode(node.name, ts.Diagnostics.Classes_may_not_have_a_field_named_constructor);
@@ -72486,7 +72537,7 @@ var ts;
72486
72537
  return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
72487
72538
  }
72488
72539
  }
72489
- else if (node.parent.kind === 181) {
72540
+ else if (ts.isTypeLiteralNode(node.parent)) {
72490
72541
  if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {
72491
72542
  return true;
72492
72543
  }
@@ -73077,7 +73128,7 @@ var ts;
73077
73128
  return factory.updateIndexedAccessTypeNode(node, nodeVisitor(node.objectType, visitor, ts.isTypeNode), nodeVisitor(node.indexType, visitor, ts.isTypeNode));
73078
73129
  case 194:
73079
73130
  ts.Debug.type(node);
73080
- return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
73131
+ return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodesVisitor(node.members, visitor, ts.isTypeElement));
73081
73132
  case 195:
73082
73133
  ts.Debug.type(node);
73083
73134
  return factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));
@@ -79220,44 +79271,25 @@ var ts;
79220
79271
  return tagTransform(node.openingFragment, node.children, isChild, node);
79221
79272
  }
79222
79273
  function convertJsxChildrenToChildrenPropObject(children) {
79274
+ var prop = convertJsxChildrenToChildrenPropAssignment(children);
79275
+ return prop && factory.createObjectLiteralExpression([prop]);
79276
+ }
79277
+ function convertJsxChildrenToChildrenPropAssignment(children) {
79223
79278
  var nonWhitespaceChildren = ts.getSemanticJsxChildren(children);
79224
79279
  if (ts.length(nonWhitespaceChildren) === 1) {
79225
79280
  var result_13 = transformJsxChildToExpression(nonWhitespaceChildren[0]);
79226
- return result_13 && factory.createObjectLiteralExpression([
79227
- factory.createPropertyAssignment("children", result_13)
79228
- ]);
79281
+ return result_13 && factory.createPropertyAssignment("children", result_13);
79229
79282
  }
79230
79283
  var result = ts.mapDefined(children, transformJsxChildToExpression);
79231
- return !result.length ? undefined : factory.createObjectLiteralExpression([
79232
- factory.createPropertyAssignment("children", factory.createArrayLiteralExpression(result))
79233
- ]);
79284
+ return ts.length(result) ? factory.createPropertyAssignment("children", factory.createArrayLiteralExpression(result)) : undefined;
79234
79285
  }
79235
79286
  function visitJsxOpeningLikeElementJSX(node, children, isChild, location) {
79236
79287
  var tagName = getTagName(node);
79237
- var objectProperties;
79288
+ var childrenProp = children && children.length ? convertJsxChildrenToChildrenPropAssignment(children) : undefined;
79238
79289
  var keyAttr = ts.find(node.attributes.properties, function (p) { return !!p.name && ts.isIdentifier(p.name) && p.name.escapedText === "key"; });
79239
79290
  var attrs = keyAttr ? ts.filter(node.attributes.properties, function (p) { return p !== keyAttr; }) : node.attributes.properties;
79240
- var segments = [];
79241
- if (attrs.length) {
79242
- segments = ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) { return isSpread
79243
- ? ts.map(attrs, transformJsxSpreadAttributeToExpression)
79244
- : factory.createObjectLiteralExpression(ts.map(attrs, transformJsxAttributeToObjectLiteralElement)); }));
79245
- if (ts.isJsxSpreadAttribute(attrs[0])) {
79246
- segments.unshift(factory.createObjectLiteralExpression());
79247
- }
79248
- }
79249
- if (children && children.length) {
79250
- var result = convertJsxChildrenToChildrenPropObject(children);
79251
- if (result) {
79252
- segments.push(result);
79253
- }
79254
- }
79255
- if (segments.length === 0) {
79256
- objectProperties = factory.createObjectLiteralExpression([]);
79257
- }
79258
- else {
79259
- objectProperties = ts.singleOrUndefined(segments) || emitHelpers().createAssignHelper(segments);
79260
- }
79291
+ var objectProperties = ts.length(attrs) ? transformJsxAttributesToObjectProps(attrs, childrenProp) :
79292
+ factory.createObjectLiteralExpression(childrenProp ? [childrenProp] : ts.emptyArray);
79261
79293
  return visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, ts.length(ts.getSemanticJsxChildren(children || ts.emptyArray)), isChild, location);
79262
79294
  }
79263
79295
  function visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, childrenLength, isChild, location) {
@@ -79283,31 +79315,9 @@ var ts;
79283
79315
  }
79284
79316
  function visitJsxOpeningLikeElementCreateElement(node, children, isChild, location) {
79285
79317
  var tagName = getTagName(node);
79286
- var objectProperties;
79287
79318
  var attrs = node.attributes.properties;
79288
- if (attrs.length === 0) {
79289
- objectProperties = factory.createNull();
79290
- }
79291
- else {
79292
- var target = ts.getEmitScriptTarget(compilerOptions);
79293
- if (target && target >= 5) {
79294
- objectProperties = factory.createObjectLiteralExpression(ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) {
79295
- return isSpread ? ts.map(attrs, transformJsxSpreadAttributeToSpreadAssignment) : ts.map(attrs, transformJsxAttributeToObjectLiteralElement);
79296
- })));
79297
- }
79298
- else {
79299
- var segments = ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) { return isSpread
79300
- ? ts.map(attrs, transformJsxSpreadAttributeToExpression)
79301
- : factory.createObjectLiteralExpression(ts.map(attrs, transformJsxAttributeToObjectLiteralElement)); }));
79302
- if (ts.isJsxSpreadAttribute(attrs[0])) {
79303
- segments.unshift(factory.createObjectLiteralExpression());
79304
- }
79305
- objectProperties = ts.singleOrUndefined(segments);
79306
- if (!objectProperties) {
79307
- objectProperties = emitHelpers().createAssignHelper(segments);
79308
- }
79309
- }
79310
- }
79319
+ var objectProperties = ts.length(attrs) ? transformJsxAttributesToObjectProps(attrs) :
79320
+ factory.createNull();
79311
79321
  var callee = currentFileState.importSpecifier === undefined
79312
79322
  ? ts.createJsxFactoryExpression(factory, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), compilerOptions.reactNamespace, node)
79313
79323
  : getImplicitImportForName("createElement");
@@ -79337,6 +79347,32 @@ var ts;
79337
79347
  function transformJsxSpreadAttributeToSpreadAssignment(node) {
79338
79348
  return factory.createSpreadAssignment(ts.visitNode(node.expression, visitor, ts.isExpression));
79339
79349
  }
79350
+ function transformJsxAttributesToObjectProps(attrs, children) {
79351
+ var target = ts.getEmitScriptTarget(compilerOptions);
79352
+ return target && target >= 5 ? factory.createObjectLiteralExpression(transformJsxAttributesToProps(attrs, children)) :
79353
+ transformJsxAttributesToExpression(attrs, children);
79354
+ }
79355
+ function transformJsxAttributesToProps(attrs, children) {
79356
+ var props = ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) {
79357
+ return ts.map(attrs, function (attr) { return isSpread ? transformJsxSpreadAttributeToSpreadAssignment(attr) : transformJsxAttributeToObjectLiteralElement(attr); });
79358
+ }));
79359
+ if (children) {
79360
+ props.push(children);
79361
+ }
79362
+ return props;
79363
+ }
79364
+ function transformJsxAttributesToExpression(attrs, children) {
79365
+ var expressions = ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) { return isSpread
79366
+ ? ts.map(attrs, transformJsxSpreadAttributeToExpression)
79367
+ : factory.createObjectLiteralExpression(ts.map(attrs, transformJsxAttributeToObjectLiteralElement)); }));
79368
+ if (ts.isJsxSpreadAttribute(attrs[0])) {
79369
+ expressions.unshift(factory.createObjectLiteralExpression());
79370
+ }
79371
+ if (children) {
79372
+ expressions.push(factory.createObjectLiteralExpression([children]));
79373
+ }
79374
+ return ts.singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
79375
+ }
79340
79376
  function transformJsxSpreadAttributeToExpression(node) {
79341
79377
  return ts.visitNode(node.expression, visitor, ts.isExpression);
79342
79378
  }
@@ -81594,33 +81630,16 @@ var ts;
81594
81630
  return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.All);
81595
81631
  }
81596
81632
  function visitTemplateExpression(node) {
81597
- var expressions = [];
81598
- addTemplateHead(expressions, node);
81599
- addTemplateSpans(expressions, node);
81600
- var expression = ts.reduceLeft(expressions, factory.createAdd);
81601
- if (ts.nodeIsSynthesized(expression)) {
81602
- ts.setTextRange(expression, node);
81603
- }
81604
- return expression;
81605
- }
81606
- function shouldAddTemplateHead(node) {
81607
- ts.Debug.assert(node.templateSpans.length !== 0);
81608
- return node.head.text.length !== 0 || node.templateSpans[0].literal.text.length === 0;
81609
- }
81610
- function addTemplateHead(expressions, node) {
81611
- if (!shouldAddTemplateHead(node)) {
81612
- return;
81613
- }
81614
- expressions.push(factory.createStringLiteral(node.head.text));
81615
- }
81616
- function addTemplateSpans(expressions, node) {
81633
+ var expression = factory.createStringLiteral(node.head.text);
81617
81634
  for (var _i = 0, _a = node.templateSpans; _i < _a.length; _i++) {
81618
81635
  var span = _a[_i];
81619
- expressions.push(ts.visitNode(span.expression, visitor, ts.isExpression));
81620
- if (span.literal.text.length !== 0) {
81621
- expressions.push(factory.createStringLiteral(span.literal.text));
81636
+ var args = [ts.visitNode(span.expression, visitor, ts.isExpression)];
81637
+ if (span.literal.text.length > 0) {
81638
+ args.push(factory.createStringLiteral(span.literal.text));
81622
81639
  }
81640
+ expression = factory.createCallExpression(factory.createPropertyAccessExpression(expression, "concat"), undefined, args);
81623
81641
  }
81642
+ return ts.setTextRange(expression, node);
81624
81643
  }
81625
81644
  function visitSuperKeyword(isExpressionOfCall) {
81626
81645
  return hierarchyFacts & 8
@@ -93296,7 +93315,7 @@ var ts;
93296
93315
  break;
93297
93316
  case ts.FileIncludeKind.TypeReferenceDirective:
93298
93317
  (_b = file.typeReferenceDirectives[index], pos = _b.pos, end = _b.end);
93299
- packageId = (_g = (_f = file.resolvedTypeReferenceDirectiveNames) === null || _f === void 0 ? void 0 : _f.get(ts.toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), getModeForResolutionAtIndex(file, index))) === null || _g === void 0 ? void 0 : _g.packageId;
93318
+ packageId = (_g = (_f = file.resolvedTypeReferenceDirectiveNames) === null || _f === void 0 ? void 0 : _f.get(ts.toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), file.impliedNodeFormat)) === null || _g === void 0 ? void 0 : _g.packageId;
93300
93319
  break;
93301
93320
  case ts.FileIncludeKind.LibReferenceDirective:
93302
93321
  (_c = file.libReferenceDirectives[index], pos = _c.pos, end = _c.end);
@@ -99341,6 +99360,9 @@ var ts;
99341
99360
  sourceFilesCache.set(path, false);
99342
99361
  }
99343
99362
  }
99363
+ if (sourceFile) {
99364
+ sourceFile.impliedNodeFormat = ts.getImpliedNodeFormatForFile(path, resolutionCache.getModuleResolutionCache().getPackageJsonInfoCache(), compilerHost, compilerHost.getCompilationSettings());
99365
+ }
99344
99366
  return sourceFile;
99345
99367
  }
99346
99368
  return hostSourceFile.sourceFile;