@typescript-deploys/pr-build 5.9.0-pr-58378-3 → 5.9.0-pr-62111-2

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
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.9";
21
- var version = `${versionMajorMinor}.0-insiders.20250623`;
21
+ var version = `${versionMajorMinor}.0-insiders.20250723`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6344,6 +6344,7 @@ var Diagnostics = {
6344
6344
  This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* Error */, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),
6345
6345
  Type_0_does_not_satisfy_the_constraint_1: diag(2344, 1 /* Error */, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."),
6346
6346
  Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."),
6347
+ Call_target_does_not_contain_any_signatures: diag(2346, 1 /* Error */, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."),
6347
6348
  Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* Error */, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."),
6348
6349
  Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, 1 /* Error */, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"),
6349
6350
  This_expression_is_not_callable: diag(2349, 1 /* Error */, "This_expression_is_not_callable_2349", "This expression is not callable."),
@@ -6685,7 +6686,7 @@ var Diagnostics = {
6685
6686
  Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, 1 /* Error */, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."),
6686
6687
  Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, 1 /* Error */, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."),
6687
6688
  _0_has_no_exported_member_named_1_Did_you_mean_2: diag(2724, 1 /* Error */, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),
6688
- Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, 1 /* Error */, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."),
6689
+ Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0: diag(2725, 1 /* Error */, "Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 and above with module {0}."),
6689
6690
  Cannot_find_lib_definition_for_0: diag(2726, 1 /* Error */, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."),
6690
6691
  Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, 1 /* Error */, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"),
6691
6692
  _0_is_declared_here: diag(2728, 3 /* Message */, "_0_is_declared_here_2728", "'{0}' is declared here."),
@@ -7405,7 +7406,7 @@ var Diagnostics = {
7405
7406
  File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, 1 /* Error */, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),
7406
7407
  Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, 3 /* Message */, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."),
7407
7408
  Consider_adding_a_declare_modifier_to_this_class: diag(6506, 3 /* Message */, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."),
7408
- Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, 3 /* Message */, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),
7409
+ Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files: diag(6600, 3 /* Message */, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files."),
7409
7410
  Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, 3 /* Message */, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."),
7410
7411
  Allow_accessing_UMD_globals_from_modules: diag(6602, 3 /* Message */, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."),
7411
7412
  Disable_error_reporting_for_unreachable_code: diag(6603, 3 /* Message */, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."),
@@ -16080,7 +16081,7 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
16080
16081
  function getBinaryOperatorPrecedence(kind) {
16081
16082
  switch (kind) {
16082
16083
  case 61 /* QuestionQuestionToken */:
16083
- return 4 /* Coalesce */;
16084
+ return 5 /* Coalesce */;
16084
16085
  case 57 /* BarBarToken */:
16085
16086
  return 5 /* LogicalOR */;
16086
16087
  case 56 /* AmpersandAmpersandToken */:
@@ -17198,8 +17199,14 @@ function base64encode(host, input) {
17198
17199
  function readJsonOrUndefined(path, hostOrText) {
17199
17200
  const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path);
17200
17201
  if (!jsonText) return void 0;
17201
- const result = parseConfigFileTextToJson(path, jsonText);
17202
- return !result.error ? result.config : void 0;
17202
+ let result = tryParseJson(jsonText);
17203
+ if (result === void 0) {
17204
+ const looseResult = parseConfigFileTextToJson(path, jsonText);
17205
+ if (!looseResult.error) {
17206
+ result = looseResult.config;
17207
+ }
17208
+ }
17209
+ return result;
17203
17210
  }
17204
17211
  function readJson(path, host) {
17205
17212
  return readJsonOrUndefined(path, host) || {};
@@ -18327,7 +18334,7 @@ function isNodeModulesOrScopedPackageDirectory(s, getCanonicalFileName) {
18327
18334
  var reservedCharacterPattern = /[^\w\s/]/g;
18328
18335
  var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
18329
18336
  var commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
18330
- var implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`;
18337
+ var implicitExcludePathRegexPattern = `(?!(?:${commonPackageFolders.join("|")})(?:/|$))`;
18331
18338
  var filesMatcher = {
18332
18339
  /**
18333
18340
  * Matches any single directory segment unless it is the last segment and a .min.js file
@@ -18335,12 +18342,12 @@ var filesMatcher = {
18335
18342
  * [^./] # matches everything up to the first . character (excluding directory separators)
18336
18343
  * (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension
18337
18344
  */
18338
- singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*",
18345
+ singleAsteriskRegexFragment: "(?:[^./]|(?:\\.(?!min\\.js$))?)*",
18339
18346
  /**
18340
18347
  * Regex for the ** wildcard. Matches any number of subdirectories. When used for including
18341
18348
  * files or directories, does not match subdirectories that start with a . character
18342
18349
  */
18343
- doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`,
18350
+ doubleAsteriskRegexFragment: `(?:/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`,
18344
18351
  replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment)
18345
18352
  };
18346
18353
  var directoriesMatcher = {
@@ -18349,12 +18356,12 @@ var directoriesMatcher = {
18349
18356
  * Regex for the ** wildcard. Matches any number of subdirectories. When used for including
18350
18357
  * files or directories, does not match subdirectories that start with a . character
18351
18358
  */
18352
- doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`,
18359
+ doubleAsteriskRegexFragment: `(?:/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`,
18353
18360
  replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment)
18354
18361
  };
18355
18362
  var excludeMatcher = {
18356
18363
  singleAsteriskRegexFragment: "[^/]*",
18357
- doubleAsteriskRegexFragment: "(/.+?)?",
18364
+ doubleAsteriskRegexFragment: "(?:/.+?)?",
18358
18365
  replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment)
18359
18366
  };
18360
18367
  var wildcardMatchers = {
@@ -18367,9 +18374,9 @@ function getRegularExpressionForWildcard(specs, basePath, usage) {
18367
18374
  if (!patterns || !patterns.length) {
18368
18375
  return void 0;
18369
18376
  }
18370
- const pattern = patterns.map((pattern2) => `(${pattern2})`).join("|");
18371
- const terminator = usage === "exclude" ? "($|/)" : "$";
18372
- return `^(${pattern})${terminator}`;
18377
+ const pattern = patterns.map((pattern2) => `(?:${pattern2})`).join("|");
18378
+ const terminator = usage === "exclude" ? "(?:$|/)" : "$";
18379
+ return `^(?:${pattern})${terminator}`;
18373
18380
  }
18374
18381
  function getRegularExpressionsForWildcards(specs, basePath, usage) {
18375
18382
  if (specs === void 0 || specs.length === 0) {
@@ -18382,7 +18389,7 @@ function isImplicitGlob(lastPathComponent) {
18382
18389
  }
18383
18390
  function getPatternFromSpec(spec, basePath, usage) {
18384
18391
  const pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
18385
- return pattern && `^(${pattern})${usage === "exclude" ? "($|/)" : "$"}`;
18392
+ return pattern && `^(?:${pattern})${usage === "exclude" ? "(?:$|/)" : "$"}`;
18386
18393
  }
18387
18394
  function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage]) {
18388
18395
  let subpattern = "";
@@ -18402,7 +18409,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
18402
18409
  subpattern += doubleAsteriskRegexFragment;
18403
18410
  } else {
18404
18411
  if (usage === "directories") {
18405
- subpattern += "(";
18412
+ subpattern += "(?:";
18406
18413
  optionalCount++;
18407
18414
  }
18408
18415
  if (hasWrittenComponent) {
@@ -18411,7 +18418,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
18411
18418
  if (usage !== "exclude") {
18412
18419
  let componentPattern = "";
18413
18420
  if (component.charCodeAt(0) === 42 /* asterisk */) {
18414
- componentPattern += "([^./]" + singleAsteriskRegexFragment + ")?";
18421
+ componentPattern += "(?:[^./]" + singleAsteriskRegexFragment + ")?";
18415
18422
  component = component.substr(1);
18416
18423
  } else if (component.charCodeAt(0) === 63 /* question */) {
18417
18424
  componentPattern += "[^./]";
@@ -31211,6 +31218,7 @@ var Parser;
31211
31218
  /*skipKeyword*/
31212
31219
  true
31213
31220
  );
31221
+ parseOptional(28 /* CommaToken */);
31214
31222
  if (!parseExpected(20 /* CloseBraceToken */)) {
31215
31223
  const lastError = lastOrUndefined(parseDiagnostics);
31216
31224
  if (lastError && lastError.code === Diagnostics._0_expected.code) {
@@ -31968,10 +31976,13 @@ var Parser;
31968
31976
  if (token() !== 27 /* SemicolonToken */ && token() !== 100 /* FunctionKeyword */ && token() !== 86 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) {
31969
31977
  return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */));
31970
31978
  }
31979
+ const savedYieldContext = inYieldContext();
31980
+ setYieldContext(false);
31971
31981
  const savedTopLevel = topLevel;
31972
31982
  topLevel = false;
31973
31983
  const node = isAsync ? doInAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)) : doOutsideOfAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction));
31974
31984
  topLevel = savedTopLevel;
31985
+ setYieldContext(savedYieldContext);
31975
31986
  return node;
31976
31987
  }
31977
31988
  function parseConditionalExpressionRest(leftOperand, pos, allowReturnTypeInArrowFunction) {
@@ -36837,7 +36848,7 @@ var commandOptionsWithoutBuild = [
36837
36848
  affectsBuildInfo: true,
36838
36849
  showInSimplifiedHelpView: true,
36839
36850
  category: Diagnostics.JavaScript_Support,
36840
- description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
36851
+ description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files,
36841
36852
  defaultValueDescription: false
36842
36853
  },
36843
36854
  {
@@ -46848,40 +46859,32 @@ function createTypeChecker(host) {
46848
46859
  return arrayFrom(candidatesSet);
46849
46860
  }
46850
46861
  function runWithoutResolvedSignatureCaching(node, fn) {
46851
- const cachedResolvedSignatures = [];
46852
- const cachedTypes2 = [];
46853
46862
  node = findAncestor(node, isCallLikeOrFunctionLikeExpression);
46854
- if (!node) {
46855
- return fn();
46856
- }
46857
- while (node) {
46858
- const nodeLinks2 = getNodeLinks(node);
46859
- cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature, nodeLinks2.flags]);
46860
- nodeLinks2.resolvedSignature = void 0;
46861
- nodeLinks2.flags = 0 /* None */;
46862
- if (isFunctionExpressionOrArrowFunction(node)) {
46863
- resetCachedSymbolTypes(node);
46864
- for (const parameter of node.parameters) {
46865
- resetCachedSymbolTypes(parameter);
46863
+ if (node) {
46864
+ const cachedResolvedSignatures = [];
46865
+ const cachedTypes2 = [];
46866
+ while (node) {
46867
+ const nodeLinks2 = getNodeLinks(node);
46868
+ cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
46869
+ nodeLinks2.resolvedSignature = void 0;
46870
+ if (isFunctionExpressionOrArrowFunction(node)) {
46871
+ const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
46872
+ const type = symbolLinks2.type;
46873
+ cachedTypes2.push([symbolLinks2, type]);
46874
+ symbolLinks2.type = void 0;
46866
46875
  }
46876
+ node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
46867
46877
  }
46868
- node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
46869
- }
46870
- const result = fn();
46871
- for (const [nodeLinks2, resolvedSignature, nodeCheckFlags] of cachedResolvedSignatures) {
46872
- nodeLinks2.resolvedSignature = resolvedSignature;
46873
- nodeLinks2.flags = nodeCheckFlags;
46874
- }
46875
- for (const [symbolLinks2, type] of cachedTypes2) {
46876
- symbolLinks2.type = type;
46877
- }
46878
- return result;
46879
- function resetCachedSymbolTypes(declaration) {
46880
- const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(declaration));
46881
- const type = symbolLinks2.type;
46882
- cachedTypes2.push([symbolLinks2, type]);
46883
- symbolLinks2.type = void 0;
46878
+ const result = fn();
46879
+ for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
46880
+ nodeLinks2.resolvedSignature = resolvedSignature;
46881
+ }
46882
+ for (const [symbolLinks2, type] of cachedTypes2) {
46883
+ symbolLinks2.type = type;
46884
+ }
46885
+ return result;
46884
46886
  }
46887
+ return fn();
46885
46888
  }
46886
46889
  function runWithInferenceBlockedFromSourceNode(node, fn) {
46887
46890
  const containingCall = findAncestor(node, isCallLikeExpression);
@@ -47224,6 +47227,7 @@ function createTypeChecker(host) {
47224
47227
  }
47225
47228
  };
47226
47229
  var anyIterationTypes = createIterationTypes(anyType, anyType, anyType);
47230
+ var silentNeverIterationTypes = createIterationTypes(silentNeverType, silentNeverType, silentNeverType);
47227
47231
  var asyncIterationTypesResolver = {
47228
47232
  iterableCacheKey: "iterationTypesOfAsyncIterable",
47229
47233
  iteratorCacheKey: "iterationTypesOfAsyncIterator",
@@ -50437,7 +50441,14 @@ function createTypeChecker(host) {
50437
50441
  if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) {
50438
50442
  return addVisibleAlias(declaration, declaration.parent.parent.parent.parent);
50439
50443
  } else if (symbol.flags & 2 /* BlockScopedVariable */) {
50440
- const variableStatement = findAncestor(declaration, isVariableStatement);
50444
+ const rootDeclaration = walkUpBindingElementsAndPatterns(declaration);
50445
+ if (rootDeclaration.kind === 170 /* Parameter */) {
50446
+ return false;
50447
+ }
50448
+ const variableStatement = rootDeclaration.parent.parent;
50449
+ if (variableStatement.kind !== 244 /* VariableStatement */) {
50450
+ return false;
50451
+ }
50441
50452
  if (hasSyntacticModifier(variableStatement, 32 /* Export */)) {
50442
50453
  return true;
50443
50454
  }
@@ -50582,7 +50593,7 @@ function createTypeChecker(host) {
50582
50593
  }
50583
50594
  }
50584
50595
  function typeToString(type, enclosingDeclaration, flags = 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer = createTextWriter(""), maximumLength, verbosityLevel, out) {
50585
- const noTruncation = compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;
50596
+ const noTruncation = !maximumLength && compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;
50586
50597
  const typeNode = nodeBuilder.typeToTypeNode(
50587
50598
  type,
50588
50599
  enclosingDeclaration,
@@ -52131,27 +52142,77 @@ function createTypeChecker(host) {
52131
52142
  context.approximateLength += symbolName(propertySymbol).length + 1;
52132
52143
  if (propertySymbol.flags & 98304 /* Accessor */) {
52133
52144
  const writeType = getWriteTypeOfSymbol(propertySymbol);
52134
- if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
52145
+ if (!isErrorType(propertyType) && !isErrorType(writeType)) {
52135
52146
  const symbolMapper = getSymbolLinks(propertySymbol).mapper;
52136
- const getterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* GetAccessor */);
52137
- const getterSignature = getSignatureFromDeclaration(getterDeclaration);
52138
- typeElements.push(
52139
- setCommentRange2(
52140
- context,
52141
- signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(getterSignature, symbolMapper) : getterSignature, 178 /* GetAccessor */, context, { name: propertyName }),
52142
- getterDeclaration
52143
- )
52144
- );
52145
- const setterDeclaration = getDeclarationOfKind(propertySymbol, 179 /* SetAccessor */);
52146
- const setterSignature = getSignatureFromDeclaration(setterDeclaration);
52147
- typeElements.push(
52148
- setCommentRange2(
52149
- context,
52150
- signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(setterSignature, symbolMapper) : setterSignature, 179 /* SetAccessor */, context, { name: propertyName }),
52151
- setterDeclaration
52152
- )
52153
- );
52154
- return;
52147
+ const propDeclaration = getDeclarationOfKind(propertySymbol, 173 /* PropertyDeclaration */);
52148
+ if (propertyType !== writeType || propertySymbol.parent.flags & 32 /* Class */ && !propDeclaration) {
52149
+ const getterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* GetAccessor */);
52150
+ if (getterDeclaration) {
52151
+ const getterSignature = getSignatureFromDeclaration(getterDeclaration);
52152
+ typeElements.push(
52153
+ setCommentRange2(
52154
+ context,
52155
+ signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(getterSignature, symbolMapper) : getterSignature, 178 /* GetAccessor */, context, { name: propertyName }),
52156
+ getterDeclaration
52157
+ )
52158
+ );
52159
+ }
52160
+ const setterDeclaration = getDeclarationOfKind(propertySymbol, 179 /* SetAccessor */);
52161
+ if (setterDeclaration) {
52162
+ const setterSignature = getSignatureFromDeclaration(setterDeclaration);
52163
+ typeElements.push(
52164
+ setCommentRange2(
52165
+ context,
52166
+ signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(setterSignature, symbolMapper) : setterSignature, 179 /* SetAccessor */, context, { name: propertyName }),
52167
+ setterDeclaration
52168
+ )
52169
+ );
52170
+ }
52171
+ return;
52172
+ }
52173
+ if (propertySymbol.parent.flags & 32 /* Class */ && propDeclaration && find(propDeclaration.modifiers, isAccessorModifier)) {
52174
+ const fakeGetterSignature = createSignature(
52175
+ /*declaration*/
52176
+ void 0,
52177
+ /*typeParameters*/
52178
+ void 0,
52179
+ /*thisParameter*/
52180
+ void 0,
52181
+ emptyArray,
52182
+ propertyType,
52183
+ /*resolvedTypePredicate*/
52184
+ void 0,
52185
+ 0,
52186
+ 0 /* None */
52187
+ );
52188
+ typeElements.push(
52189
+ setCommentRange2(
52190
+ context,
52191
+ signatureToSignatureDeclarationHelper(fakeGetterSignature, 178 /* GetAccessor */, context, { name: propertyName }),
52192
+ propDeclaration
52193
+ )
52194
+ );
52195
+ const setterParam = createSymbol(1 /* FunctionScopedVariable */, "arg");
52196
+ setterParam.links.type = writeType;
52197
+ const fakeSetterSignature = createSignature(
52198
+ /*declaration*/
52199
+ void 0,
52200
+ /*typeParameters*/
52201
+ void 0,
52202
+ /*thisParameter*/
52203
+ void 0,
52204
+ [setterParam],
52205
+ voidType,
52206
+ /*resolvedTypePredicate*/
52207
+ void 0,
52208
+ 0,
52209
+ 0 /* None */
52210
+ );
52211
+ typeElements.push(
52212
+ signatureToSignatureDeclarationHelper(fakeSetterSignature, 179 /* SetAccessor */, context, { name: propertyName })
52213
+ );
52214
+ return;
52215
+ }
52155
52216
  }
52156
52217
  }
52157
52218
  const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;
@@ -56742,11 +56803,14 @@ function createTypeChecker(host) {
56742
56803
  }
56743
56804
  function getWriteTypeOfSymbol(symbol) {
56744
56805
  const checkFlags = getCheckFlags(symbol);
56745
- if (symbol.flags & 4 /* Property */) {
56746
- return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : (
56806
+ if (checkFlags & 2 /* SyntheticProperty */) {
56807
+ return checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : (
56747
56808
  // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty
56748
56809
  symbol.links.writeType || symbol.links.type
56749
- ) : removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */));
56810
+ );
56811
+ }
56812
+ if (symbol.flags & 4 /* Property */) {
56813
+ return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */));
56750
56814
  }
56751
56815
  if (symbol.flags & 98304 /* Accessor */) {
56752
56816
  return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol);
@@ -58902,6 +58966,7 @@ function createTypeChecker(host) {
58902
58966
  }
58903
58967
  function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) {
58904
58968
  var _a, _b, _c;
58969
+ let propFlags = 0 /* None */;
58905
58970
  let singleProp;
58906
58971
  let propSet;
58907
58972
  let indexTypes;
@@ -58926,6 +58991,7 @@ function createTypeChecker(host) {
58926
58991
  }
58927
58992
  if (!singleProp) {
58928
58993
  singleProp = prop;
58994
+ propFlags = prop.flags & 98304 /* Accessor */ || 4 /* Property */;
58929
58995
  } else if (prop !== singleProp) {
58930
58996
  const isInstantiation = (getTargetSymbol(prop) || prop) === (getTargetSymbol(singleProp) || singleProp);
58931
58997
  if (isInstantiation && compareProperties(singleProp, prop, (a, b) => a === b ? -1 /* True */ : 0 /* False */) === -1 /* True */) {
@@ -58940,6 +59006,9 @@ function createTypeChecker(host) {
58940
59006
  propSet.set(id, prop);
58941
59007
  }
58942
59008
  }
59009
+ if (propFlags & 98304 /* Accessor */ && (prop.flags & 98304 /* Accessor */) !== (propFlags & 98304 /* Accessor */)) {
59010
+ propFlags = propFlags & ~98304 /* Accessor */ | 4 /* Property */;
59011
+ }
58943
59012
  }
58944
59013
  if (isUnion && isReadonlySymbol(prop)) {
58945
59014
  checkFlags |= 8 /* Readonly */;
@@ -58953,6 +59022,7 @@ function createTypeChecker(host) {
58953
59022
  } else if (isUnion) {
58954
59023
  const indexInfo = !isLateBoundName(name) && getApplicableIndexInfoForName(type, name);
58955
59024
  if (indexInfo) {
59025
+ propFlags = propFlags & ~98304 /* Accessor */ | 4 /* Property */;
58956
59026
  checkFlags |= 32 /* WritePartial */ | (indexInfo.isReadonly ? 8 /* Readonly */ : 0);
58957
59027
  indexTypes = append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type);
58958
59028
  } else if (isObjectLiteralType(type) && !(getObjectFlags(type) & 2097152 /* ContainsSpread */)) {
@@ -59016,7 +59086,7 @@ function createTypeChecker(host) {
59016
59086
  propTypes.push(type);
59017
59087
  }
59018
59088
  addRange(propTypes, indexTypes);
59019
- const result = createSymbol(4 /* Property */ | (optionalFlag ?? 0), name, syntheticFlag | checkFlags);
59089
+ const result = createSymbol(propFlags | (optionalFlag ?? 0), name, syntheticFlag | checkFlags);
59020
59090
  result.links.containingType = containingType;
59021
59091
  if (!hasNonUniformValueDeclaration && firstValueDeclaration) {
59022
59092
  result.valueDeclaration = firstValueDeclaration;
@@ -67440,9 +67510,13 @@ function createTypeChecker(host) {
67440
67510
  return types[0];
67441
67511
  }
67442
67512
  const primaryTypes = strictNullChecks ? sameMap(types, (t) => filterType(t, (u) => !(u.flags & 98304 /* Nullable */))) : types;
67443
- const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) : reduceLeft(primaryTypes, (s, t) => isTypeSubtypeOf(s, t) ? t : s);
67513
+ const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) : getSingleCommonSupertype(primaryTypes);
67444
67514
  return primaryTypes === types ? superTypeOrUnion : getNullableType(superTypeOrUnion, getCombinedTypeFlags(types) & 98304 /* Nullable */);
67445
67515
  }
67516
+ function getSingleCommonSupertype(types) {
67517
+ const candidate = reduceLeft(types, (s, t) => isTypeStrictSubtypeOf(s, t) ? t : s);
67518
+ return every(types, (t) => t === candidate || isTypeStrictSubtypeOf(t, candidate)) ? candidate : reduceLeft(types, (s, t) => isTypeSubtypeOf(s, t) ? t : s);
67519
+ }
67446
67520
  function getCommonSubtype(types) {
67447
67521
  return reduceLeft(types, (s, t) => isTypeSubtypeOf(t, s) ? t : s);
67448
67522
  }
@@ -73325,6 +73399,9 @@ function createTypeChecker(host) {
73325
73399
  }
73326
73400
  function popContextualType() {
73327
73401
  contextualTypeCount--;
73402
+ contextualTypeNodes[contextualTypeCount] = void 0;
73403
+ contextualTypes[contextualTypeCount] = void 0;
73404
+ contextualIsCache[contextualTypeCount] = void 0;
73328
73405
  }
73329
73406
  function findContextualNode(node, includeCaches) {
73330
73407
  for (let i = contextualTypeCount - 1; i >= 0; i--) {
@@ -73341,6 +73418,8 @@ function createTypeChecker(host) {
73341
73418
  }
73342
73419
  function popInferenceContext() {
73343
73420
  inferenceContextCount--;
73421
+ inferenceContextNodes[inferenceContextCount] = void 0;
73422
+ inferenceContexts[inferenceContextCount] = void 0;
73344
73423
  }
73345
73424
  function getInferenceContext(node) {
73346
73425
  for (let i = inferenceContextCount - 1; i >= 0; i--) {
@@ -73351,11 +73430,13 @@ function createTypeChecker(host) {
73351
73430
  }
73352
73431
  function pushActiveMapper(mapper) {
73353
73432
  activeTypeMappers[activeTypeMappersCount] = mapper;
73354
- activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map();
73433
+ activeTypeMappersCaches[activeTypeMappersCount] ?? (activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map());
73355
73434
  activeTypeMappersCount++;
73356
73435
  }
73357
73436
  function popActiveMapper() {
73358
73437
  activeTypeMappersCount--;
73438
+ activeTypeMappers[activeTypeMappersCount] = void 0;
73439
+ activeTypeMappersCaches[activeTypeMappersCount].clear();
73359
73440
  }
73360
73441
  function findActiveMapper(mapper) {
73361
73442
  for (let i = activeTypeMappersCount - 1; i >= 0; i--) {
@@ -76357,7 +76438,12 @@ function createTypeChecker(host) {
76357
76438
  candidates = candidatesOutArray || [];
76358
76439
  reorderCandidates(signatures, candidates, callChainFlags);
76359
76440
  if (!isJsxOpenFragment) {
76360
- Debug.assert(candidates.length, "Revert #54442 and add a testcase with whatever triggered this");
76441
+ if (!candidates.length) {
76442
+ if (reportErrors2) {
76443
+ diagnostics.add(getDiagnosticForCallNode(node, Diagnostics.Call_target_does_not_contain_any_signatures));
76444
+ }
76445
+ return resolveErrorCall(node);
76446
+ }
76361
76447
  }
76362
76448
  const args = getEffectiveCallArguments(node);
76363
76449
  const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
@@ -78640,6 +78726,9 @@ function createTypeChecker(host) {
78640
78726
  return { yieldTypes, nextTypes };
78641
78727
  }
78642
78728
  function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) {
78729
+ if (expressionType === silentNeverType) {
78730
+ return silentNeverType;
78731
+ }
78643
78732
  const errorNode = node.expression || node;
78644
78733
  const yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType;
78645
78734
  return !isAsync ? yieldedType : getAwaitedType(
@@ -79673,17 +79762,27 @@ function createTypeChecker(host) {
79673
79762
  }
79674
79763
  }
79675
79764
  function checkNullishCoalesceOperands(node) {
79676
- const { left, operatorToken, right } = node;
79677
- if (operatorToken.kind === 61 /* QuestionQuestionToken */) {
79678
- if (isBinaryExpression(left) && (left.operatorToken.kind === 57 /* BarBarToken */ || left.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) {
79679
- grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(left.operatorToken.kind), tokenToString(operatorToken.kind));
79765
+ if (node.operatorToken.kind !== 61 /* QuestionQuestionToken */) {
79766
+ return;
79767
+ }
79768
+ if (isBinaryExpression(node.parent)) {
79769
+ const { left, operatorToken } = node.parent;
79770
+ if (isBinaryExpression(left) && operatorToken.kind === 57 /* BarBarToken */) {
79771
+ grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(61 /* QuestionQuestionToken */), tokenToString(operatorToken.kind));
79680
79772
  }
79681
- if (isBinaryExpression(right) && (right.operatorToken.kind === 57 /* BarBarToken */ || right.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) {
79682
- grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind));
79773
+ } else if (isBinaryExpression(node.left)) {
79774
+ const { operatorToken } = node.left;
79775
+ if (operatorToken.kind === 57 /* BarBarToken */ || operatorToken.kind === 56 /* AmpersandAmpersandToken */) {
79776
+ grammarErrorOnNode(node.left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(operatorToken.kind), tokenToString(61 /* QuestionQuestionToken */));
79777
+ }
79778
+ } else if (isBinaryExpression(node.right)) {
79779
+ const { operatorToken } = node.right;
79780
+ if (operatorToken.kind === 56 /* AmpersandAmpersandToken */) {
79781
+ grammarErrorOnNode(node.right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(61 /* QuestionQuestionToken */), tokenToString(operatorToken.kind));
79683
79782
  }
79684
- checkNullishCoalesceOperandLeft(node);
79685
- checkNullishCoalesceOperandRight(node);
79686
79783
  }
79784
+ checkNullishCoalesceOperandLeft(node);
79785
+ checkNullishCoalesceOperandRight(node);
79687
79786
  }
79688
79787
  function checkNullishCoalesceOperandLeft(node) {
79689
79788
  const leftTarget = skipOuterExpressions(node.left, 63 /* All */);
@@ -83722,6 +83821,9 @@ function createTypeChecker(host) {
83722
83821
  }
83723
83822
  function getIterationTypesOfIterable(type, use, errorNode) {
83724
83823
  var _a, _b;
83824
+ if (type === silentNeverType) {
83825
+ return silentNeverIterationTypes;
83826
+ }
83725
83827
  if (isTypeAny(type)) {
83726
83828
  return anyIterationTypes;
83727
83829
  }
@@ -84447,7 +84549,7 @@ function createTypeChecker(host) {
84447
84549
  }
84448
84550
  function checkClassNameCollisionWithObject(name) {
84449
84551
  if (languageVersion >= 1 /* ES5 */ && name.escapedText === "Object" && host.getEmitModuleFormatOfFile(getSourceFileOfNode(name)) < 5 /* ES2015 */) {
84450
- error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]);
84552
+ error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0, ModuleKind[moduleKind]);
84451
84553
  }
84452
84554
  }
84453
84555
  function checkUnmatchedJSDocParameters(node) {
@@ -89856,7 +89958,7 @@ function createTypeChecker(host) {
89856
89958
  if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) {
89857
89959
  return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);
89858
89960
  }
89859
- if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node)) {
89961
+ if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) {
89860
89962
  return grammarErrorOnNode(node.name, Diagnostics.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);
89861
89963
  }
89862
89964
  if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) {
@@ -89941,7 +90043,7 @@ function createTypeChecker(host) {
89941
90043
  function checkGrammarBigIntLiteral(node) {
89942
90044
  const literalType = isLiteralTypeNode(node.parent) || isPrefixUnaryExpression(node.parent) && isLiteralTypeNode(node.parent.parent);
89943
90045
  if (!literalType) {
89944
- if (languageVersion < 7 /* ES2020 */) {
90046
+ if (!(node.flags & 33554432 /* Ambient */) && languageVersion < 7 /* ES2020 */) {
89945
90047
  if (grammarErrorOnNode(node, Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)) {
89946
90048
  return true;
89947
90049
  }
@@ -128520,7 +128622,7 @@ function getMatchedIncludeSpec(program, fileName) {
128520
128622
  const index = findIndex((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {
128521
128623
  if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */)) return false;
128522
128624
  const pattern = getPatternFromSpec(includeSpec, basePath, "files");
128523
- return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
128625
+ return !!pattern && getRegexFromPattern(`(?:${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
128524
128626
  });
128525
128627
  return index !== -1 ? configFile.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[index] : void 0;
128526
128628
  }
@@ -133455,7 +133557,8 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
133455
133557
  function ensureParameter(p, context) {
133456
133558
  return factory.updateParameterDeclaration(
133457
133559
  p,
133458
- [],
133560
+ /*modifiers*/
133561
+ void 0,
133459
133562
  reuseNode(context, p.dotDotDotToken),
133460
133563
  resolver.serializeNameOfParameter(context, p),
133461
133564
  resolver.isOptionalParameter(p) ? factory.createToken(58 /* QuestionToken */) : void 0,
@@ -203,7 +203,7 @@
203
203
  "All_imports_in_import_declaration_are_unused_6192": "Žádné importy z deklarace importu se nepoužívají.",
204
204
  "All_type_parameters_are_unused_6205": "Všechny parametry typů jsou nevyužité.",
205
205
  "All_variables_are_unused_6199": "Žádná z proměnných se nepoužívá.",
206
- "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600": "Povolte, aby se soubory JavaScriptu staly součástí programu. K získání informací o chybách v těchto souborech použít možnost checkJS.",
206
+ "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these__6600": "Povolte, aby se soubory JavaScriptu staly součástí programu. K získání informací o chybách v těchto souborech použít možnost checkJs.",
207
207
  "Allow_accessing_UMD_globals_from_modules_6602": "Povolit přístup ke globálním proměnným UMD z modulů",
208
208
  "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Povolte výchozí importy z modulů bez výchozího exportu. Nebude to mít vliv na generování kódu, jenom na kontrolu typů.",
209
209
  "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601": "Pokud modul nemá výchozí export, povolte import X z Y.",
@@ -329,6 +329,7 @@
329
329
  "Call_signature_return_types_0_and_1_are_incompatible_2202": "Návratové typy signatury volání {0} a {1} nejsou kompatibilní.",
330
330
  "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "Signatura volání s chybějící anotací návratového typu má implicitně návratový typ any.",
331
331
  "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Signatury volání bez argumentů mají nekompatibilní návratové typy {0} a {1}.",
332
+ "Call_target_does_not_contain_any_signatures_2346": "Cíl volání neobsahuje žádné signatury.",
332
333
  "Can_only_convert_logical_AND_access_chains_95142": "Převést se dají jen logické řetězy přístupu AND.",
333
334
  "Can_only_convert_named_export_95164": "Lze převést pouze pojmenovaný export ",
334
335
  "Can_only_convert_property_with_modifier_95137": "Převést se dá jenom vlastnost s modifikátorem.",
@@ -438,7 +439,7 @@
438
439
  "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036": "Dekorátory tříd se nedají použít se statickým privátním identifikátorem. Zvažte možnost odebrat experimentální dekorátor.",
439
440
  "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855": "Pole třídy „{0}“ definované nadřazenou třídou není v podřízené třídě přístupné přes třídu typu super.",
440
441
  "Class_name_cannot_be_0_2414": "Třída nemůže mít název {0}.",
441
- "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725": "Když se cílí na ES5 s modulem {0}, název třídy nemůže být Object.",
442
+ "Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0_2725": "Když se cílí na ES5 a výše s modulem {0}, název třídy nemůže být Object.",
442
443
  "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "Statická strana třídy {0} nesprávně rozšiřuje statickou stranu základní třídy {1}.",
443
444
  "Classes_can_only_extend_a_single_class_1174": "Třídy můžou rozšířit jenom jednu třídu.",
444
445
  "Classes_may_not_have_a_field_named_constructor_18006": "Třídy nemůžou mít pole s názvem constructor.",