typescript 4.8.0-dev.20220531 → 4.8.0-dev.20220603

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.8";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220531";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220603";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -5381,6 +5381,7 @@ var ts;
5381
5381
  Decorators_are_not_valid_here: diag(1206, ts.DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."),
5382
5382
  Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, ts.DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."),
5383
5383
  _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, ts.DiagnosticCategory.Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."),
5384
+ Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: diag(1209, ts.DiagnosticCategory.Error, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"),
5384
5385
  Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, ts.DiagnosticCategory.Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),
5385
5386
  A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, ts.DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."),
5386
5387
  Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."),
@@ -5577,7 +5578,7 @@ var ts;
5577
5578
  Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, ts.DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."),
5578
5579
  Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, ts.DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"),
5579
5580
  Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, ts.DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
5580
- Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`."),
5581
+ resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."),
5581
5582
  resolution_mode_should_be_either_require_or_import: diag(1453, ts.DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
5582
5583
  resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
5583
5584
  resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
@@ -6084,6 +6085,8 @@ var ts;
6084
6085
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
6085
6086
  All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
6086
6087
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
6088
+ An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, ts.DiagnosticCategory.Error, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
6089
+ The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, ts.DiagnosticCategory.Error, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
6087
6090
  Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
6088
6091
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
6089
6092
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -6191,7 +6194,7 @@ var ts;
6191
6194
  This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
6192
6195
  This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
6193
6196
  Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, ts.DiagnosticCategory.Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
6194
- Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, ts.DiagnosticCategory.Error, "Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
6197
+ resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, ts.DiagnosticCategory.Error, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
6195
6198
  The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
6196
6199
  Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
6197
6200
  File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
@@ -12437,6 +12440,8 @@ var ts;
12437
12440
  case 218:
12438
12441
  case 231:
12439
12442
  return true;
12443
+ case 228:
12444
+ return !ts.isHeritageClause(node.parent);
12440
12445
  case 161:
12441
12446
  while (node.parent.kind === 161) {
12442
12447
  node = node.parent;
@@ -23358,6 +23363,10 @@ var ts;
23358
23363
  return node.kind === 267;
23359
23364
  }
23360
23365
  ts.isImportClause = isImportClause;
23366
+ function isImportTypeAssertionContainer(node) {
23367
+ return node.kind === 295;
23368
+ }
23369
+ ts.isImportTypeAssertionContainer = isImportTypeAssertionContainer;
23361
23370
  function isAssertClause(node) {
23362
23371
  return node.kind === 293;
23363
23372
  }
@@ -28650,6 +28659,9 @@ var ts;
28650
28659
  typeArguments = expression.typeArguments;
28651
28660
  expression = expression.expression;
28652
28661
  }
28662
+ if (token() === 28) {
28663
+ parseErrorAtCurrentToken(ts.Diagnostics.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0, ts.getTextOfNodeFromSourceText(sourceText, expression));
28664
+ }
28653
28665
  var argumentList = token() === 20 ? parseArgumentList() : undefined;
28654
28666
  return finishNode(factory.createNewExpression(expression, typeArguments, argumentList), pos);
28655
28667
  }
@@ -35833,13 +35845,32 @@ var ts;
35833
35845
  }
35834
35846
  return toSearchResult(undefined);
35835
35847
  }
35848
+ function comparePatternKeys(a, b) {
35849
+ var aPatternIndex = a.indexOf("*");
35850
+ var bPatternIndex = b.indexOf("*");
35851
+ var baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;
35852
+ var baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;
35853
+ if (baseLenA > baseLenB)
35854
+ return -1;
35855
+ if (baseLenB > baseLenA)
35856
+ return 1;
35857
+ if (aPatternIndex === -1)
35858
+ return 1;
35859
+ if (bPatternIndex === -1)
35860
+ return -1;
35861
+ if (a.length > b.length)
35862
+ return -1;
35863
+ if (b.length > a.length)
35864
+ return 1;
35865
+ return 0;
35866
+ }
35836
35867
  function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
35837
35868
  var loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
35838
35869
  if (!ts.endsWith(moduleName, ts.directorySeparator) && moduleName.indexOf("*") === -1 && ts.hasProperty(lookupTable, moduleName)) {
35839
35870
  var target = lookupTable[moduleName];
35840
35871
  return loadModuleFromTargetImportOrExport(target, "", false);
35841
35872
  }
35842
- var expandingKeys = ts.sort(ts.filter(ts.getOwnKeys(lookupTable), function (k) { return k.indexOf("*") !== -1 || ts.endsWith(k, "/"); }), function (a, b) { return a.length - b.length; });
35873
+ var expandingKeys = ts.sort(ts.filter(ts.getOwnKeys(lookupTable), function (k) { return k.indexOf("*") !== -1 || ts.endsWith(k, "/"); }), comparePatternKeys);
35843
35874
  for (var _i = 0, expandingKeys_1 = expandingKeys; _i < expandingKeys_1.length; _i++) {
35844
35875
  var potentialTarget = expandingKeys_1[_i];
35845
35876
  if (state.features & NodeResolutionFeatures.ExportsPatternTrailers && matchesPatternWithTrailer(potentialTarget, moduleName)) {
@@ -36114,8 +36145,7 @@ var ts;
36114
36145
  var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
36115
36146
  loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths);
36116
36147
  if (!pathAndExtension && packageInfo
36117
- && packageInfo.packageJsonContent.exports === undefined
36118
- && packageInfo.packageJsonContent.main === undefined
36148
+ && (packageInfo.packageJsonContent.exports === undefined || packageInfo.packageJsonContent.exports === null)
36119
36149
  && state.features & NodeResolutionFeatures.EsmMode) {
36120
36150
  pathAndExtension = loadModuleFromFile(extensions, ts.combinePaths(candidate, "index.js"), onlyRecordFailures, state);
36121
36151
  }
@@ -41039,7 +41069,12 @@ var ts;
41039
41069
  function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
41040
41070
  if (meaning & (111551 & ~1024)) {
41041
41071
  if (isPrimitiveTypeName(name)) {
41042
- error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name));
41072
+ if (isExtendedByInterface(errorLocation)) {
41073
+ error(errorLocation, ts.Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, ts.unescapeLeadingUnderscores(name));
41074
+ }
41075
+ else {
41076
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name));
41077
+ }
41043
41078
  return true;
41044
41079
  }
41045
41080
  var symbol = resolveSymbol(resolveName(errorLocation, name, 788968 & ~111551, undefined, undefined, false));
@@ -41059,6 +41094,16 @@ var ts;
41059
41094
  }
41060
41095
  return false;
41061
41096
  }
41097
+ function isExtendedByInterface(node) {
41098
+ var grandparent = node.parent.parent;
41099
+ var parentOfGrandparent = grandparent.parent;
41100
+ if (grandparent && parentOfGrandparent) {
41101
+ var isExtending = ts.isHeritageClause(grandparent) && grandparent.token === 94;
41102
+ var isInterface = ts.isInterfaceDeclaration(parentOfGrandparent);
41103
+ return isExtending && isInterface;
41104
+ }
41105
+ return false;
41106
+ }
41062
41107
  function maybeMappedType(node, symbol) {
41063
41108
  var container = ts.findAncestor(node.parent, function (n) {
41064
41109
  return ts.isComputedPropertyName(n) || ts.isPropertySignature(n) ? false : ts.isTypeLiteralNode(n) || "quit";
@@ -43585,7 +43630,7 @@ var ts;
43585
43630
  anyType : getNonMissingTypeOfSymbol(propertySymbol);
43586
43631
  var saveEnclosingDeclaration = context.enclosingDeclaration;
43587
43632
  context.enclosingDeclaration = undefined;
43588
- if (context.tracker.trackSymbol && ts.getCheckFlags(propertySymbol) & 4096 && isLateBoundName(propertySymbol.escapedName)) {
43633
+ if (context.tracker.trackSymbol && isLateBoundName(propertySymbol.escapedName)) {
43589
43634
  if (propertySymbol.declarations) {
43590
43635
  var decl = ts.first(propertySymbol.declarations);
43591
43636
  if (hasLateBindableName(decl)) {
@@ -44041,6 +44086,7 @@ var ts;
44041
44086
  return symbol.parent ? ts.factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier;
44042
44087
  }
44043
44088
  function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) {
44089
+ var _a, _b, _c, _d;
44044
44090
  var chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384));
44045
44091
  var isTypeOf = meaning === 111551;
44046
44092
  if (ts.some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
@@ -44056,6 +44102,7 @@ var ts;
44056
44102
  assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
44057
44103
  ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral("import"))
44058
44104
  ])));
44105
+ (_b = (_a = context.tracker).reportImportTypeNodeResolutionModeOverride) === null || _b === void 0 ? void 0 : _b.call(_a);
44059
44106
  }
44060
44107
  }
44061
44108
  if (!specifier) {
@@ -44073,6 +44120,7 @@ var ts;
44073
44120
  assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
44074
44121
  ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral(swappedMode === ts.ModuleKind.ESNext ? "import" : "require"))
44075
44122
  ])));
44123
+ (_d = (_c = context.tracker).reportImportTypeNodeResolutionModeOverride) === null || _d === void 0 ? void 0 : _d.call(_c);
44076
44124
  }
44077
44125
  }
44078
44126
  if (!assertion) {
@@ -45040,7 +45088,7 @@ var ts;
45040
45088
  ? getBaseConstructorTypeOfClass(staticType)
45041
45089
  : anyType;
45042
45090
  var heritageClauses = __spreadArray(__spreadArray([], !ts.length(baseTypes) ? [] : [ts.factory.createHeritageClause(94, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], true), !ts.length(implementsExpressions) ? [] : [ts.factory.createHeritageClause(117, implementsExpressions)], true);
45043
- var symbolProps = getNonInterhitedProperties(classType, baseTypes, getPropertiesOfType(classType));
45091
+ var symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType));
45044
45092
  var publicSymbolProps = ts.filter(symbolProps, function (s) {
45045
45093
  var valueDecl = s.valueDeclaration;
45046
45094
  return !!valueDecl && !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name));
@@ -45954,7 +46002,7 @@ var ts;
45954
46002
  return type;
45955
46003
  }
45956
46004
  if (ts.getEffectiveTypeAnnotationNode(ts.walkUpBindingElementsAndPatterns(declaration))) {
45957
- return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration, 0)) & 32768) ? getNonUndefinedType(type) : type;
46005
+ return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0)) & 16777216) ? getNonUndefinedType(type) : type;
45958
46006
  }
45959
46007
  return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0)], 2));
45960
46008
  }
@@ -48742,7 +48790,7 @@ var ts;
48742
48790
  var objectType;
48743
48791
  return !!(type.flags & 8388608 && ts.getObjectFlags(objectType = type.objectType) & 32 &&
48744
48792
  !isGenericMappedType(objectType) && isGenericIndexType(type.indexType) &&
48745
- !objectType.declaration.questionToken && !objectType.declaration.nameType);
48793
+ !(getMappedTypeModifiers(objectType) & 8) && !objectType.declaration.nameType);
48746
48794
  }
48747
48795
  function getApparentType(type) {
48748
48796
  var t = !(type.flags & 465829888) ? type : getBaseConstraintOfType(type) || unknownType;
@@ -53441,7 +53489,7 @@ var ts;
53441
53489
  var sourceSig = checkMode & 3 ? undefined : getSingleCallSignature(getNonNullableType(sourceType));
53442
53490
  var targetSig = checkMode & 3 ? undefined : getSingleCallSignature(getNonNullableType(targetType));
53443
53491
  var callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) &&
53444
- (getFalsyFlags(sourceType) & 98304) === (getFalsyFlags(targetType) & 98304);
53492
+ (getTypeFacts(sourceType) & 50331648) === (getTypeFacts(targetType) & 50331648);
53445
53493
  var related = callbacks ?
53446
53494
  compareSignaturesRelated(targetSig, sourceSig, (checkMode & 8) | (strictVariance ? 2 : 1), reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) :
53447
53495
  !(checkMode & 3) && !strictVariance && compareTypes(sourceType, targetType, false) || compareTypes(targetType, sourceType, reportErrors);
@@ -56198,27 +56246,8 @@ var ts;
56198
56246
  var value = _a.value;
56199
56247
  return value.base10Value === "0";
56200
56248
  }
56201
- function getFalsyFlagsOfTypes(types) {
56202
- var result = 0;
56203
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
56204
- var t = types_14[_i];
56205
- result |= getFalsyFlags(t);
56206
- }
56207
- return result;
56208
- }
56209
- function getFalsyFlags(type) {
56210
- var t = type.flags & 2097152 ? getBaseConstraintOrType(type) : type;
56211
- return t.flags & 1048576 ? getFalsyFlagsOfTypes(t.types) :
56212
- t.flags & 128 ? t.value === "" ? 128 : 0 :
56213
- t.flags & 256 ? t.value === 0 ? 256 : 0 :
56214
- t.flags & 2048 ? isZeroBigInt(t) ? 2048 : 0 :
56215
- t.flags & 512 ? (t === falseType || t === regularFalseType) ? 512 : 0 :
56216
- t.flags & 117724;
56217
- }
56218
56249
  function removeDefinitelyFalsyTypes(type) {
56219
- return getFalsyFlags(type) & 117632 ?
56220
- filterType(type, function (t) { return !(getFalsyFlags(t) & 117632); }) :
56221
- type;
56250
+ return filterType(type, function (t) { return !!(getTypeFacts(t) & 4194304); });
56222
56251
  }
56223
56252
  function extractDefinitelyFalsyTypes(type) {
56224
56253
  return mapType(type, getDefinitelyFalsyPartOfType);
@@ -56256,11 +56285,7 @@ var ts;
56256
56285
  getIntersectionType([type, emptyObjectType]);
56257
56286
  }
56258
56287
  function getNonNullableType(type) {
56259
- if (strictNullChecks) {
56260
- var reducedType = getTypeWithFacts(type, 2097152);
56261
- return maybeTypeOfKind(reducedType, 465829888) ? getGlobalNonNullableTypeInstantiation(reducedType) : reducedType;
56262
- }
56263
- return type;
56288
+ return strictNullChecks ? getAdjustedTypeWithFacts(type, 2097152) : type;
56264
56289
  }
56265
56290
  function addOptionalTypeMarker(type) {
56266
56291
  return strictNullChecks ? getUnionType([type, optionalType]) : type;
@@ -57230,8 +57255,8 @@ var ts;
57230
57255
  }
57231
57256
  function getSingleTypeVariableFromIntersectionTypes(types) {
57232
57257
  var typeVariable;
57233
- for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
57234
- var type = types_15[_i];
57258
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
57259
+ var type = types_14[_i];
57235
57260
  var t = type.flags & 2097152 && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); });
57236
57261
  if (!t || typeVariable && t !== typeVariable) {
57237
57262
  return undefined;
@@ -57891,8 +57916,8 @@ var ts;
57891
57916
  }
57892
57917
  }
57893
57918
  };
57894
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
57895
- var type = types_16[_i];
57919
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
57920
+ var type = types_15[_i];
57896
57921
  var state_9 = _loop_24(type);
57897
57922
  if (typeof state_9 === "object")
57898
57923
  return state_9.value;
@@ -57991,14 +58016,16 @@ var ts;
57991
58016
  return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
57992
58017
  resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
57993
58018
  }
57994
- function getTypeFacts(type, ignoreObjects) {
57995
- if (ignoreObjects === void 0) { ignoreObjects = false; }
58019
+ function getTypeFacts(type) {
58020
+ if (type.flags & (2097152 | 465829888)) {
58021
+ type = getBaseConstraintOfType(type) || unknownType;
58022
+ }
57996
58023
  var flags = type.flags;
57997
- if (flags & 4) {
58024
+ if (flags & (4 | 268435456)) {
57998
58025
  return strictNullChecks ? 16317953 : 16776705;
57999
58026
  }
58000
- if (flags & 128) {
58001
- var isEmpty = type.value === "";
58027
+ if (flags & (128 | 134217728)) {
58028
+ var isEmpty = flags & 128 && type.value === "";
58002
58029
  return strictNullChecks ?
58003
58030
  isEmpty ? 12123649 : 7929345 :
58004
58031
  isEmpty ? 12582401 : 16776705;
@@ -58030,20 +58057,20 @@ var ts;
58030
58057
  (type === falseType || type === regularFalseType) ? 12580616 : 16774920;
58031
58058
  }
58032
58059
  if (flags & 524288) {
58033
- if (ignoreObjects) {
58034
- return 16768959;
58035
- }
58036
58060
  return ts.getObjectFlags(type) & 16 && isEmptyObjectType(type) ?
58037
- strictNullChecks ? 16318463 : 16777215 :
58061
+ strictNullChecks ? 83427327 : 83886079 :
58038
58062
  isFunctionObjectType(type) ?
58039
58063
  strictNullChecks ? 7880640 : 16728000 :
58040
58064
  strictNullChecks ? 7888800 : 16736160;
58041
58065
  }
58042
- if (flags & (16384 | 32768)) {
58066
+ if (flags & 16384) {
58043
58067
  return 9830144;
58044
58068
  }
58069
+ if (flags & 32768) {
58070
+ return 26607360;
58071
+ }
58045
58072
  if (flags & 65536) {
58046
- return 9363232;
58073
+ return 42917664;
58047
58074
  }
58048
58075
  if (flags & 12288) {
58049
58076
  return strictNullChecks ? 7925520 : 16772880;
@@ -58054,34 +58081,32 @@ var ts;
58054
58081
  if (flags & 131072) {
58055
58082
  return 0;
58056
58083
  }
58057
- if (flags & 465829888) {
58058
- return !isPatternLiteralType(type) ? getTypeFacts(getBaseConstraintOfType(type) || unknownType, ignoreObjects) :
58059
- strictNullChecks ? 7929345 : 16776705;
58060
- }
58061
58084
  if (flags & 1048576) {
58062
- return ts.reduceLeft(type.types, function (facts, t) { return facts | getTypeFacts(t, ignoreObjects); }, 0);
58085
+ return ts.reduceLeft(type.types, function (facts, t) { return facts | getTypeFacts(t); }, 0);
58063
58086
  }
58064
58087
  if (flags & 2097152) {
58065
- ignoreObjects || (ignoreObjects = maybeTypeOfKind(type, 131068));
58066
- return getIntersectionTypeFacts(type, ignoreObjects);
58088
+ return getIntersectionTypeFacts(type);
58067
58089
  }
58068
- return 16777215;
58090
+ return 83886079;
58069
58091
  }
58070
- function getIntersectionTypeFacts(type, ignoreObjects) {
58092
+ function getIntersectionTypeFacts(type) {
58093
+ var ignoreObjects = maybeTypeOfKind(type, 131068);
58071
58094
  var oredFacts = 0;
58072
- var andedFacts = 16777215;
58095
+ var andedFacts = 134217727;
58073
58096
  for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
58074
58097
  var t = _a[_i];
58075
- var f = getTypeFacts(t, ignoreObjects);
58076
- oredFacts |= f;
58077
- andedFacts &= f;
58098
+ if (!(ignoreObjects && t.flags & 524288)) {
58099
+ var f = getTypeFacts(t);
58100
+ oredFacts |= f;
58101
+ andedFacts &= f;
58102
+ }
58078
58103
  }
58079
- return oredFacts & 8256 | andedFacts & 16768959;
58104
+ return oredFacts & 8256 | andedFacts & 134209471;
58080
58105
  }
58081
58106
  function getTypeWithFacts(type, include) {
58082
58107
  return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
58083
58108
  }
58084
- function getIntersectionWithFacts(type, facts) {
58109
+ function getAdjustedTypeWithFacts(type, facts) {
58085
58110
  var reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 ? unknownUnionType : type, facts));
58086
58111
  if (strictNullChecks) {
58087
58112
  switch (facts) {
@@ -58339,8 +58364,8 @@ var ts;
58339
58364
  var types = origin && origin.flags & 1048576 ? origin.types : type.types;
58340
58365
  var mappedTypes;
58341
58366
  var changed = false;
58342
- for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
58343
- var t = types_17[_i];
58367
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
58368
+ var t = types_16[_i];
58344
58369
  var mapped = t.flags & 1048576 ? mapType(t, mapper, noReductions) : mapper(t);
58345
58370
  changed || (changed = t !== mapped);
58346
58371
  if (mapped) {
@@ -58413,8 +58438,8 @@ var ts;
58413
58438
  }
58414
58439
  function isEvolvingArrayTypeList(types) {
58415
58440
  var hasEvolvingArrayType = false;
58416
- for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
58417
- var t = types_18[_i];
58441
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
58442
+ var t = types_17[_i];
58418
58443
  if (!(t.flags & 131072)) {
58419
58444
  if (!(ts.getObjectFlags(t) & 256)) {
58420
58445
  return false;
@@ -59135,10 +59160,10 @@ var ts;
59135
59160
  }
59136
59161
  function narrowTypeByTruthiness(type, expr, assumeTrue) {
59137
59162
  if (isMatchingReference(reference, expr)) {
59138
- return getIntersectionWithFacts(type, assumeTrue ? 4194304 : 8388608);
59163
+ return getAdjustedTypeWithFacts(type, assumeTrue ? 4194304 : 8388608);
59139
59164
  }
59140
59165
  if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) {
59141
- type = getTypeWithFacts(type, 2097152);
59166
+ type = getAdjustedTypeWithFacts(type, 2097152);
59142
59167
  }
59143
59168
  var access = getDiscriminantPropertyAccess(expr, type);
59144
59169
  if (access) {
@@ -59265,7 +59290,7 @@ var ts;
59265
59290
  var valueType = getTypeOfExpression(value);
59266
59291
  var removeNullable = equalsOperator !== assumeTrue && everyType(valueType, function (t) { return !!(t.flags & nullableFlags); }) ||
59267
59292
  equalsOperator === assumeTrue && everyType(valueType, function (t) { return !(t.flags & (3 | nullableFlags)); });
59268
- return removeNullable ? getTypeWithFacts(type, 2097152) : type;
59293
+ return removeNullable ? getAdjustedTypeWithFacts(type, 2097152) : type;
59269
59294
  }
59270
59295
  function narrowTypeByEquality(type, operator, value, assumeTrue) {
59271
59296
  if (type.flags & 1) {
@@ -59294,7 +59319,7 @@ var ts;
59294
59319
  valueType.flags & 65536 ?
59295
59320
  assumeTrue ? 131072 : 1048576 :
59296
59321
  assumeTrue ? 65536 : 524288;
59297
- return getIntersectionWithFacts(type, facts);
59322
+ return getAdjustedTypeWithFacts(type, facts);
59298
59323
  }
59299
59324
  if (assumeTrue) {
59300
59325
  var filterFn = operator === 34 ?
@@ -59314,7 +59339,7 @@ var ts;
59314
59339
  var target = getReferenceCandidate(typeOfExpr.expression);
59315
59340
  if (!isMatchingReference(reference, target)) {
59316
59341
  if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) {
59317
- return getTypeWithFacts(type, 2097152);
59342
+ return getAdjustedTypeWithFacts(type, 2097152);
59318
59343
  }
59319
59344
  return type;
59320
59345
  }
@@ -59464,7 +59489,7 @@ var ts;
59464
59489
  var left = getReferenceCandidate(expr.left);
59465
59490
  if (!isMatchingReference(reference, left)) {
59466
59491
  if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) {
59467
- return getTypeWithFacts(type, 2097152);
59492
+ return getAdjustedTypeWithFacts(type, 2097152);
59468
59493
  }
59469
59494
  return type;
59470
59495
  }
@@ -59540,7 +59565,7 @@ var ts;
59540
59565
  }
59541
59566
  if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) &&
59542
59567
  !(getTypeFacts(predicate.type) & 65536)) {
59543
- type = getTypeWithFacts(type, 2097152);
59568
+ type = getAdjustedTypeWithFacts(type, 2097152);
59544
59569
  }
59545
59570
  var access = getDiscriminantPropertyAccess(predicateArgument, type);
59546
59571
  if (access) {
@@ -59591,7 +59616,7 @@ var ts;
59591
59616
  }
59592
59617
  function narrowTypeByOptionality(type, expr, assumePresent) {
59593
59618
  if (isMatchingReference(reference, expr)) {
59594
- return getTypeWithFacts(type, assumePresent ? 2097152 : 262144);
59619
+ return getAdjustedTypeWithFacts(type, assumePresent ? 2097152 : 262144);
59595
59620
  }
59596
59621
  var access = getDiscriminantPropertyAccess(expr, type);
59597
59622
  if (access) {
@@ -59666,8 +59691,8 @@ var ts;
59666
59691
  var annotationIncludesUndefined = strictNullChecks &&
59667
59692
  declaration.kind === 164 &&
59668
59693
  declaration.initializer &&
59669
- getFalsyFlags(declaredType) & 32768 &&
59670
- !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768);
59694
+ getTypeFacts(declaredType) & 16777216 &&
59695
+ !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216);
59671
59696
  popTypeResolution();
59672
59697
  return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288) : declaredType;
59673
59698
  }
@@ -59907,7 +59932,7 @@ var ts;
59907
59932
  return convertAutoToAny(flowType);
59908
59933
  }
59909
59934
  }
59910
- else if (!assumeInitialized && !(getFalsyFlags(type) & 32768) && getFalsyFlags(flowType) & 32768) {
59935
+ else if (!assumeInitialized && !(getTypeFacts(type) & 16777216) && getTypeFacts(flowType) & 16777216) {
59911
59936
  error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol));
59912
59937
  return type;
59913
59938
  }
@@ -61185,8 +61210,8 @@ var ts;
61185
61210
  }
61186
61211
  var signatureList;
61187
61212
  var types = type.types;
61188
- for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
61189
- var current = types_19[_i];
61213
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
61214
+ var current = types_18[_i];
61190
61215
  var signature = getContextualCallSignature(current, node);
61191
61216
  if (signature) {
61192
61217
  if (!signatureList) {
@@ -62149,19 +62174,19 @@ var ts;
62149
62174
  return checkNonNullType(checkExpression(node), node);
62150
62175
  }
62151
62176
  function isNullableType(type) {
62152
- return !!((strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304);
62177
+ return !!(getTypeFacts(type) & 50331648);
62153
62178
  }
62154
62179
  function getNonNullableTypeIfNeeded(type) {
62155
62180
  return isNullableType(type) ? getNonNullableType(type) : type;
62156
62181
  }
62157
- function reportObjectPossiblyNullOrUndefinedError(node, flags) {
62158
- error(node, flags & 32768 ? flags & 65536 ?
62182
+ function reportObjectPossiblyNullOrUndefinedError(node, facts) {
62183
+ error(node, facts & 16777216 ? facts & 33554432 ?
62159
62184
  ts.Diagnostics.Object_is_possibly_null_or_undefined :
62160
62185
  ts.Diagnostics.Object_is_possibly_undefined :
62161
62186
  ts.Diagnostics.Object_is_possibly_null);
62162
62187
  }
62163
- function reportCannotInvokePossiblyNullOrUndefinedError(node, flags) {
62164
- error(node, flags & 32768 ? flags & 65536 ?
62188
+ function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
62189
+ error(node, facts & 16777216 ? facts & 33554432 ?
62165
62190
  ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined :
62166
62191
  ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined :
62167
62192
  ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null);
@@ -62171,9 +62196,9 @@ var ts;
62171
62196
  error(node, ts.Diagnostics.Object_is_of_type_unknown);
62172
62197
  return errorType;
62173
62198
  }
62174
- var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304;
62175
- if (kind) {
62176
- reportError(node, kind);
62199
+ var facts = getTypeFacts(type);
62200
+ if (facts & 50331648) {
62201
+ reportError(node, facts);
62177
62202
  var t = getNonNullableType(type);
62178
62203
  return t.flags & (98304 | 131072) ? errorType : t;
62179
62204
  }
@@ -62439,7 +62464,7 @@ var ts;
62439
62464
  assumeUninitialized = true;
62440
62465
  }
62441
62466
  var flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType);
62442
- if (assumeUninitialized && !(getFalsyFlags(propType) & 32768) && getFalsyFlags(flowType) & 32768) {
62467
+ if (assumeUninitialized && !(getTypeFacts(propType) & 16777216) && getTypeFacts(flowType) & 16777216) {
62443
62468
  error(errorNode, ts.Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop));
62444
62469
  return propType;
62445
62470
  }
@@ -64043,8 +64068,8 @@ var ts;
64043
64068
  if (apparentType.flags & 1048576) {
64044
64069
  var types = apparentType.types;
64045
64070
  var hasSignatures = false;
64046
- for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
64047
- var constituent = types_20[_i];
64071
+ for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
64072
+ var constituent = types_19[_i];
64048
64073
  var signatures = getSignaturesOfType(constituent, kind);
64049
64074
  if (signatures.length !== 0) {
64050
64075
  hasSignatures = true;
@@ -65552,7 +65577,7 @@ var ts;
65552
65577
  var type = getTypeOfSymbol(symbol);
65553
65578
  if (strictNullChecks &&
65554
65579
  !(type.flags & (3 | 131072)) &&
65555
- !(exactOptionalPropertyTypes ? symbol.flags & 16777216 : getFalsyFlags(type) & 32768)) {
65580
+ !(exactOptionalPropertyTypes ? symbol.flags & 16777216 : getTypeFacts(type) & 16777216)) {
65556
65581
  error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_optional);
65557
65582
  }
65558
65583
  }
@@ -65711,8 +65736,8 @@ var ts;
65711
65736
  }
65712
65737
  if (type.flags & 3145728) {
65713
65738
  var types = type.types;
65714
- for (var _i = 0, types_21 = types; _i < types_21.length; _i++) {
65715
- var t = types_21[_i];
65739
+ for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
65740
+ var t = types_20[_i];
65716
65741
  if (maybeTypeOfKind(t, kind)) {
65717
65742
  return true;
65718
65743
  }
@@ -65902,7 +65927,7 @@ var ts;
65902
65927
  var prop = exprOrAssignment;
65903
65928
  if (prop.objectAssignmentInitializer) {
65904
65929
  if (strictNullChecks &&
65905
- !(getFalsyFlags(checkExpression(prop.objectAssignmentInitializer)) & 32768)) {
65930
+ !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216)) {
65906
65931
  sourceType = getTypeWithFacts(sourceType, 524288);
65907
65932
  }
65908
65933
  checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
@@ -65915,6 +65940,9 @@ var ts;
65915
65940
  if (target.kind === 221 && target.operatorToken.kind === 63) {
65916
65941
  checkBinaryExpression(target, checkMode);
65917
65942
  target = target.left;
65943
+ if (strictNullChecks) {
65944
+ sourceType = getTypeWithFacts(sourceType, 524288);
65945
+ }
65918
65946
  }
65919
65947
  if (target.kind === 205) {
65920
65948
  return checkObjectLiteralAssignment(target, sourceType, rightIsThis);
@@ -66267,7 +66295,7 @@ var ts;
66267
66295
  case 56:
66268
66296
  case 75: {
66269
66297
  var resultType_3 = getTypeFacts(leftType) & 8388608 ?
66270
- getUnionType([removeDefinitelyFalsyTypes(leftType), rightType], 2) :
66298
+ getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2) :
66271
66299
  leftType;
66272
66300
  if (operator === 75) {
66273
66301
  checkAssignmentOperator(rightType);
@@ -67807,8 +67835,11 @@ var ts;
67807
67835
  if (node.assertions) {
67808
67836
  var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
67809
67837
  if (override) {
67838
+ if (!ts.isNightly()) {
67839
+ grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
67840
+ }
67810
67841
  if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
67811
- grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
67842
+ grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
67812
67843
  }
67813
67844
  }
67814
67845
  }
@@ -68429,8 +68460,8 @@ var ts;
68429
68460
  }
68430
68461
  function getEntityNameForDecoratorMetadataFromTypeList(types) {
68431
68462
  var commonEntityName;
68432
- for (var _i = 0, types_22 = types; _i < types_22.length; _i++) {
68433
- var typeNode = types_22[_i];
68463
+ for (var _i = 0, types_21 = types; _i < types_21.length; _i++) {
68464
+ var typeNode = types_21[_i];
68434
68465
  while (typeNode.kind === 191 || typeNode.kind === 197) {
68435
68466
  typeNode = typeNode.type;
68436
68467
  }
@@ -69180,7 +69211,7 @@ var ts;
69180
69211
  }
69181
69212
  if (ts.isBindingPattern(node.name)) {
69182
69213
  var needCheckInitializer = node.initializer && node.parent.parent.kind !== 243;
69183
- var needCheckWidenedType = node.name.elements.length === 0;
69214
+ var needCheckWidenedType = !ts.some(node.name.elements, ts.not(ts.isOmittedExpression));
69184
69215
  if (needCheckInitializer || needCheckWidenedType) {
69185
69216
  var widenedType = getWidenedTypeForVariableLikeDeclaration(node);
69186
69217
  if (needCheckInitializer) {
@@ -69321,7 +69352,7 @@ var ts;
69321
69352
  return;
69322
69353
  var type = checkTruthinessExpression(location);
69323
69354
  var isPropertyExpressionCast = ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
69324
- if (getFalsyFlags(type) || isPropertyExpressionCast)
69355
+ if (!(getTypeFacts(type) & 4194304) || isPropertyExpressionCast)
69325
69356
  return;
69326
69357
  var callSignatures = getSignaturesOfType(type, 0);
69327
69358
  var isPromise = !!getAwaitedTypeOfPromise(type);
@@ -70675,17 +70706,16 @@ var ts;
70675
70706
  });
70676
70707
  }
70677
70708
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
70678
- var _a, _b;
70709
+ var _a, _b, _c, _d;
70679
70710
  var baseProperties = getPropertiesOfType(baseType);
70680
- basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
70681
- var baseProperty = baseProperties_1[_i];
70711
+ var _loop_33 = function (baseProperty) {
70682
70712
  var base = getTargetSymbol(baseProperty);
70683
70713
  if (base.flags & 4194304) {
70684
- continue;
70714
+ return "continue";
70685
70715
  }
70686
70716
  var baseSymbol = getPropertyOfObjectType(type, base.escapedName);
70687
70717
  if (!baseSymbol) {
70688
- continue;
70718
+ return "continue";
70689
70719
  }
70690
70720
  var derived = getTargetSymbol(baseSymbol);
70691
70721
  var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base);
@@ -70693,14 +70723,14 @@ var ts;
70693
70723
  if (derived === base) {
70694
70724
  var derivedClassDecl = ts.getClassLikeDeclarationOfSymbol(type.symbol);
70695
70725
  if (baseDeclarationFlags & 128 && (!derivedClassDecl || !ts.hasSyntacticModifier(derivedClassDecl, 128))) {
70696
- for (var _c = 0, _d = getBaseTypes(type); _c < _d.length; _c++) {
70697
- var otherBaseType = _d[_c];
70726
+ for (var _e = 0, _f = getBaseTypes(type); _e < _f.length; _e++) {
70727
+ var otherBaseType = _f[_e];
70698
70728
  if (otherBaseType === baseType)
70699
70729
  continue;
70700
70730
  var baseSymbol_1 = getPropertyOfObjectType(otherBaseType, base.escapedName);
70701
70731
  var derivedElsewhere = baseSymbol_1 && getTargetSymbol(baseSymbol_1);
70702
70732
  if (derivedElsewhere && derivedElsewhere !== base) {
70703
- continue basePropertyCheck;
70733
+ return "continue-basePropertyCheck";
70704
70734
  }
70705
70735
  }
70706
70736
  if (derivedClassDecl.kind === 226) {
@@ -70714,16 +70744,18 @@ var ts;
70714
70744
  else {
70715
70745
  var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived);
70716
70746
  if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
70717
- continue;
70747
+ return "continue";
70718
70748
  }
70719
70749
  var errorMessage = void 0;
70720
70750
  var basePropertyFlags = base.flags & 98308;
70721
70751
  var derivedPropertyFlags = derived.flags & 98308;
70722
70752
  if (basePropertyFlags && derivedPropertyFlags) {
70723
- if (baseDeclarationFlags & 128 && !(base.valueDeclaration && ts.isPropertyDeclaration(base.valueDeclaration) && base.valueDeclaration.initializer)
70724
- || base.valueDeclaration && base.valueDeclaration.parent.kind === 258
70753
+ if ((ts.getCheckFlags(base) & 6
70754
+ ? (_a = base.declarations) === null || _a === void 0 ? void 0 : _a.some(function (d) { return isPropertyAbstractOrInterface(d, baseDeclarationFlags); })
70755
+ : (_b = base.declarations) === null || _b === void 0 ? void 0 : _b.every(function (d) { return isPropertyAbstractOrInterface(d, baseDeclarationFlags); }))
70756
+ || ts.getCheckFlags(base) & 262144
70725
70757
  || derived.valueDeclaration && ts.isBinaryExpression(derived.valueDeclaration)) {
70726
- continue;
70758
+ return "continue";
70727
70759
  }
70728
70760
  var overriddenInstanceProperty = basePropertyFlags !== 4 && derivedPropertyFlags === 4;
70729
70761
  var overriddenInstanceAccessor = basePropertyFlags === 4 && derivedPropertyFlags !== 4;
@@ -70734,12 +70766,12 @@ var ts;
70734
70766
  error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type));
70735
70767
  }
70736
70768
  else if (useDefineForClassFields) {
70737
- var uninitialized = (_a = derived.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind === 167 && !d.initializer; });
70769
+ var uninitialized = (_c = derived.declarations) === null || _c === void 0 ? void 0 : _c.find(function (d) { return d.kind === 167 && !d.initializer; });
70738
70770
  if (uninitialized
70739
70771
  && !(derived.flags & 33554432)
70740
70772
  && !(baseDeclarationFlags & 128)
70741
70773
  && !(derivedDeclarationFlags & 128)
70742
- && !((_b = derived.declarations) === null || _b === void 0 ? void 0 : _b.some(function (d) { return !!(d.flags & 16777216); }))) {
70774
+ && !((_d = derived.declarations) === null || _d === void 0 ? void 0 : _d.some(function (d) { return !!(d.flags & 16777216); }))) {
70743
70775
  var constructor = findConstructorDeclaration(ts.getClassLikeDeclarationOfSymbol(type.symbol));
70744
70776
  var propName = uninitialized.name;
70745
70777
  if (uninitialized.exclamationToken
@@ -70752,11 +70784,11 @@ var ts;
70752
70784
  }
70753
70785
  }
70754
70786
  }
70755
- continue;
70787
+ return "continue";
70756
70788
  }
70757
70789
  else if (isPrototypeProperty(base)) {
70758
70790
  if (isPrototypeProperty(derived) || derived.flags & 4) {
70759
- continue;
70791
+ return "continue";
70760
70792
  }
70761
70793
  else {
70762
70794
  ts.Debug.assert(!!(derived.flags & 98304));
@@ -70771,9 +70803,20 @@ var ts;
70771
70803
  }
70772
70804
  error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
70773
70805
  }
70806
+ };
70807
+ basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
70808
+ var baseProperty = baseProperties_1[_i];
70809
+ var state_10 = _loop_33(baseProperty);
70810
+ switch (state_10) {
70811
+ case "continue-basePropertyCheck": continue basePropertyCheck;
70812
+ }
70774
70813
  }
70775
70814
  }
70776
- function getNonInterhitedProperties(type, baseTypes, properties) {
70815
+ function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) {
70816
+ return baseDeclarationFlags & 128 && (!ts.isPropertyDeclaration(declaration) || !declaration.initializer)
70817
+ || ts.isInterfaceDeclaration(declaration.parent);
70818
+ }
70819
+ function getNonInheritedProperties(type, baseTypes, properties) {
70777
70820
  if (!ts.length(baseTypes)) {
70778
70821
  return properties;
70779
70822
  }
@@ -70842,7 +70885,7 @@ var ts;
70842
70885
  var propName = member.name;
70843
70886
  if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName) || ts.isComputedPropertyName(propName)) {
70844
70887
  var type = getTypeOfSymbol(getSymbolOfNode(member));
70845
- if (!(type.flags & 3 || getFalsyFlags(type) & 32768)) {
70888
+ if (!(type.flags & 3 || getTypeFacts(type) & 16777216)) {
70846
70889
  if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) {
70847
70890
  error(member.name, ts.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, ts.declarationNameToString(propName));
70848
70891
  }
@@ -70866,7 +70909,7 @@ var ts;
70866
70909
  ts.setParent(reference, staticBlock);
70867
70910
  reference.flowNode = staticBlock.returnFlowNode;
70868
70911
  var flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));
70869
- if (!(getFalsyFlags(flowType) & 32768)) {
70912
+ if (!(getTypeFacts(flowType) & 16777216)) {
70870
70913
  return true;
70871
70914
  }
70872
70915
  }
@@ -70881,7 +70924,7 @@ var ts;
70881
70924
  ts.setParent(reference, constructor);
70882
70925
  reference.flowNode = constructor.returnFlowNode;
70883
70926
  var flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));
70884
- return !(getFalsyFlags(flowType) & 32768);
70927
+ return !(getTypeFacts(flowType) & 16777216);
70885
70928
  }
70886
70929
  function checkInterfaceDeclaration(node) {
70887
70930
  if (!checkGrammarDecoratorsAndModifiers(node))
@@ -71456,10 +71499,10 @@ var ts;
71456
71499
  var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
71457
71500
  if (validForTypeAssertions && override) {
71458
71501
  if (!ts.isNightly()) {
71459
- grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
71502
+ grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
71460
71503
  }
71461
71504
  if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
71462
- return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
71505
+ return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
71463
71506
  }
71464
71507
  return;
71465
71508
  }
@@ -77902,8 +77945,8 @@ var ts;
77902
77945
  }
77903
77946
  function serializeTypeList(types) {
77904
77947
  var serializedUnion;
77905
- for (var _i = 0, types_23 = types; _i < types_23.length; _i++) {
77906
- var typeNode = types_23[_i];
77948
+ for (var _i = 0, types_22 = types; _i < types_22.length; _i++) {
77949
+ var typeNode = types_22[_i];
77907
77950
  while (typeNode.kind === 191) {
77908
77951
  typeNode = typeNode.type;
77909
77952
  }
@@ -88598,7 +88641,8 @@ var ts;
88598
88641
  trackReferencedAmbientModule: trackReferencedAmbientModule,
88599
88642
  trackExternalModuleSymbolOfImportTypeNode: trackExternalModuleSymbolOfImportTypeNode,
88600
88643
  reportNonlocalAugmentation: reportNonlocalAugmentation,
88601
- reportNonSerializableProperty: reportNonSerializableProperty
88644
+ reportNonSerializableProperty: reportNonSerializableProperty,
88645
+ reportImportTypeNodeResolutionModeOverride: reportImportTypeNodeResolutionModeOverride,
88602
88646
  };
88603
88647
  var errorNameNode;
88604
88648
  var errorFallbackNode;
@@ -88720,6 +88764,11 @@ var ts;
88720
88764
  context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName));
88721
88765
  }
88722
88766
  }
88767
+ function reportImportTypeNodeResolutionModeOverride() {
88768
+ if (!ts.isNightly() && (errorNameNode || errorFallbackNode)) {
88769
+ context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
88770
+ }
88771
+ }
88723
88772
  function transformDeclarationsForJS(sourceFile, bundled) {
88724
88773
  var oldDiag = getSymbolAccessibilityDiagnostic;
88725
88774
  getSymbolAccessibilityDiagnostic = function (s) { return (s.errorNode && ts.canProduceDiagnostics(s.errorNode) ? ts.createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : ({
@@ -89136,7 +89185,7 @@ var ts;
89136
89185
  var mode = ts.getResolutionModeOverrideForClause(assertClause);
89137
89186
  if (mode !== undefined) {
89138
89187
  if (!ts.isNightly()) {
89139
- context.addDiagnostic(ts.createDiagnosticForNode(assertClause, ts.Diagnostics.Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
89188
+ context.addDiagnostic(ts.createDiagnosticForNode(assertClause, ts.Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
89140
89189
  }
89141
89190
  return assertClause;
89142
89191
  }
@@ -93528,8 +93577,8 @@ var ts;
93528
93577
  bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName });
93529
93578
  writeLine();
93530
93579
  }
93531
- for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
93532
- var directive = types_24[_d];
93580
+ for (var _d = 0, types_23 = types; _d < types_23.length; _d++) {
93581
+ var directive = types_23[_d];
93533
93582
  var pos = writer.getTextPos();
93534
93583
  var resolutionMode = directive.resolutionMode && directive.resolutionMode !== (currentSourceFile === null || currentSourceFile === void 0 ? void 0 : currentSourceFile.impliedNodeFormat)
93535
93584
  ? "resolution-mode=\"" + (directive.resolutionMode === ts.ModuleKind.ESNext ? "import" : "require") + "\""
@@ -97844,7 +97893,7 @@ var ts;
97844
97893
  ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective);
97845
97894
  var mode = ref.resolutionMode || file.impliedNodeFormat;
97846
97895
  if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
97847
- programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
97896
+ programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
97848
97897
  }
97849
97898
  processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: ts.FileIncludeKind.TypeReferenceDirective, file: file.path, index: index, });
97850
97899
  }
@@ -101122,7 +101171,7 @@ var ts;
101122
101171
  importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
101123
101172
  });
101124
101173
  var sortedPaths = [];
101125
- var _loop_33 = function (directory) {
101174
+ var _loop_34 = function (directory) {
101126
101175
  var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
101127
101176
  var pathsInDirectory;
101128
101177
  allFileNames.forEach(function (_a, fileName) {
@@ -101146,9 +101195,9 @@ var ts;
101146
101195
  };
101147
101196
  var out_directory_1;
101148
101197
  for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
101149
- var state_10 = _loop_33(directory);
101198
+ var state_11 = _loop_34(directory);
101150
101199
  directory = out_directory_1;
101151
- if (state_10 === "break")
101200
+ if (state_11 === "break")
101152
101201
  break;
101153
101202
  }
101154
101203
  if (allFileNames.size) {