typescript 4.6.0-dev.20220119 → 4.6.0-dev.20220123

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/lib.dom.d.ts CHANGED
@@ -1905,7 +1905,7 @@ interface AbortSignal extends EventTarget {
1905
1905
  declare var AbortSignal: {
1906
1906
  prototype: AbortSignal;
1907
1907
  new(): AbortSignal;
1908
- abort(reason?: any): AbortSignal;
1908
+ // abort(): AbortSignal; - To be re-added in the future
1909
1909
  };
1910
1910
 
1911
1911
  interface AbstractRange {
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.6";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220119";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220123";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  function tryGetNativeMap() {
@@ -4171,9 +4171,13 @@ var ts;
4171
4171
  }
4172
4172
  ts.getFileWatcherEventKind = getFileWatcherEventKind;
4173
4173
  ts.ignoredPaths = ["/node_modules/.", "/.git", "/.#"];
4174
- ts.sysLog = ts.noop;
4174
+ var curSysLog = ts.noop;
4175
+ function sysLog(s) {
4176
+ return curSysLog(s);
4177
+ }
4178
+ ts.sysLog = sysLog;
4175
4179
  function setSysLog(logger) {
4176
- ts.sysLog = logger;
4180
+ curSysLog = logger;
4177
4181
  }
4178
4182
  ts.setSysLog = setSysLog;
4179
4183
  function createDirectoryWatcherSupportingRecursive(_a) {
@@ -4293,7 +4297,7 @@ var ts;
4293
4297
  }
4294
4298
  function onTimerToUpdateChildWatches() {
4295
4299
  timerToUpdateChildWatches = undefined;
4296
- ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size);
4300
+ sysLog("sysLog:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size);
4297
4301
  var start = ts.timestamp();
4298
4302
  var invokeMap = new ts.Map();
4299
4303
  while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
@@ -4304,7 +4308,7 @@ var ts;
4304
4308
  var hasChanges = updateChildWatches(dirName, dirPath, options);
4305
4309
  invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
4306
4310
  }
4307
- ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: " + (ts.timestamp() - start) + "ms:: " + cacheToUpdateChildWatches.size);
4311
+ sysLog("sysLog:: invokingWatchers:: Elapsed:: " + (ts.timestamp() - start) + "ms:: " + cacheToUpdateChildWatches.size);
4308
4312
  callbackCache.forEach(function (callbacks, rootDirName) {
4309
4313
  var existing = invokeMap.get(rootDirName);
4310
4314
  if (existing) {
@@ -4320,7 +4324,7 @@ var ts;
4320
4324
  }
4321
4325
  });
4322
4326
  var elapsed = ts.timestamp() - start;
4323
- ts.sysLog("sysLog:: Elapsed:: " + elapsed + "ms:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size + " " + timerToUpdateChildWatches);
4327
+ sysLog("sysLog:: Elapsed:: " + elapsed + "ms:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size + " " + timerToUpdateChildWatches);
4324
4328
  }
4325
4329
  function removeChildWatches(parentWatcher) {
4326
4330
  if (!parentWatcher)
@@ -4822,7 +4826,7 @@ var ts;
4822
4826
  }
4823
4827
  };
4824
4828
  function invokeCallbackAndUpdateWatcher(createWatcher) {
4825
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
4829
+ sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
4826
4830
  callback("rename", "");
4827
4831
  if (watcher) {
4828
4832
  watcher.close();
@@ -4839,7 +4843,7 @@ var ts;
4839
4843
  }
4840
4844
  }
4841
4845
  if (hitSystemWatcherLimit) {
4842
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to fsWatchFile");
4846
+ sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to fsWatchFile");
4843
4847
  return watchPresentFileSystemEntryWithFsWatchFile();
4844
4848
  }
4845
4849
  try {
@@ -4851,7 +4855,7 @@ var ts;
4851
4855
  }
4852
4856
  catch (e) {
4853
4857
  hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
4854
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
4858
+ sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
4855
4859
  return watchPresentFileSystemEntryWithFsWatchFile();
4856
4860
  }
4857
4861
  }
@@ -5419,6 +5423,7 @@ var ts;
5419
5423
  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"),
5420
5424
  The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
5421
5425
  Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
5426
+ catch_or_finally_expected: diag(1472, ts.DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
5422
5427
  The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
5423
5428
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
5424
5429
  Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
@@ -5906,6 +5911,7 @@ var ts;
5906
5911
  Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path."),
5907
5912
  Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?"),
5908
5913
  Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
5914
+ 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."),
5909
5915
  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}'."),
5910
5916
  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}'."),
5911
5917
  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}'."),
@@ -6299,7 +6305,7 @@ var ts;
6299
6305
  Completeness: diag(6257, ts.DiagnosticCategory.Message, "Completeness_6257", "Completeness"),
6300
6306
  _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, ts.DiagnosticCategory.Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"),
6301
6307
  Found_1_error_in_1: diag(6259, ts.DiagnosticCategory.Message, "Found_1_error_in_1_6259", "Found 1 error in {1}"),
6302
- Found_0_errors_in_1_file: diag(6260, ts.DiagnosticCategory.Message, "Found_0_errors_in_1_file_6260", "Found {0} errors in 1 file."),
6308
+ Found_0_errors_in_the_same_file_starting_at_Colon_1: diag(6260, ts.DiagnosticCategory.Message, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"),
6303
6309
  Found_0_errors_in_1_files: diag(6261, ts.DiagnosticCategory.Message, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."),
6304
6310
  Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, ts.DiagnosticCategory.Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."),
6305
6311
  Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, ts.DiagnosticCategory.Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."),
@@ -12277,7 +12283,7 @@ var ts;
12277
12283
  }
12278
12284
  ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
12279
12285
  function getExternalModuleRequireArgument(node) {
12280
- return isRequireVariableDeclaration(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
12286
+ return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
12281
12287
  }
12282
12288
  ts.getExternalModuleRequireArgument = getExternalModuleRequireArgument;
12283
12289
  function isInternalModuleImportEqualsDeclaration(node) {
@@ -12331,17 +12337,26 @@ var ts;
12331
12337
  return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg);
12332
12338
  }
12333
12339
  ts.isRequireCall = isRequireCall;
12334
- function isRequireVariableDeclaration(node) {
12340
+ function isVariableDeclarationInitializedToRequire(node) {
12341
+ return isVariableDeclarationInitializedWithRequireHelper(node, false);
12342
+ }
12343
+ ts.isVariableDeclarationInitializedToRequire = isVariableDeclarationInitializedToRequire;
12344
+ function isVariableDeclarationInitializedToBareOrAccessedRequire(node) {
12345
+ return isVariableDeclarationInitializedWithRequireHelper(node, true);
12346
+ }
12347
+ ts.isVariableDeclarationInitializedToBareOrAccessedRequire = isVariableDeclarationInitializedToBareOrAccessedRequire;
12348
+ function isVariableDeclarationInitializedWithRequireHelper(node, allowAccessedRequire) {
12335
12349
  if (node.kind === 202) {
12336
12350
  node = node.parent.parent;
12337
12351
  }
12338
- return ts.isVariableDeclaration(node) && !!node.initializer && isRequireCall(getLeftmostAccessExpression(node.initializer), true);
12352
+ return ts.isVariableDeclaration(node) &&
12353
+ !!node.initializer &&
12354
+ isRequireCall(allowAccessedRequire ? getLeftmostAccessExpression(node.initializer) : node.initializer, true);
12339
12355
  }
12340
- ts.isRequireVariableDeclaration = isRequireVariableDeclaration;
12341
12356
  function isRequireVariableStatement(node) {
12342
12357
  return ts.isVariableStatement(node)
12343
12358
  && node.declarationList.declarations.length > 0
12344
- && ts.every(node.declarationList.declarations, function (decl) { return isRequireVariableDeclaration(decl); });
12359
+ && ts.every(node.declarationList.declarations, function (decl) { return isVariableDeclarationInitializedToRequire(decl); });
12345
12360
  }
12346
12361
  ts.isRequireVariableStatement = isRequireVariableStatement;
12347
12362
  function isSingleOrDoubleQuote(charCode) {
@@ -15301,7 +15316,7 @@ var ts;
15301
15316
  getSourceMapSourceConstructor: function () { return SourceMapSource; },
15302
15317
  };
15303
15318
  function setObjectAllocator(alloc) {
15304
- ts.objectAllocator = alloc;
15319
+ Object.assign(ts.objectAllocator, alloc);
15305
15320
  }
15306
15321
  ts.setObjectAllocator = setObjectAllocator;
15307
15322
  function formatStringFromArgs(text, args, baseIndex) {
@@ -15309,12 +15324,19 @@ var ts;
15309
15324
  return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.checkDefined(args[+index + baseIndex]); });
15310
15325
  }
15311
15326
  ts.formatStringFromArgs = formatStringFromArgs;
15327
+ var localizedDiagnosticMessages;
15312
15328
  function setLocalizedDiagnosticMessages(messages) {
15313
- ts.localizedDiagnosticMessages = messages;
15329
+ localizedDiagnosticMessages = messages;
15314
15330
  }
15315
15331
  ts.setLocalizedDiagnosticMessages = setLocalizedDiagnosticMessages;
15332
+ function maybeSetLocalizedDiagnosticMessages(getMessages) {
15333
+ if (!localizedDiagnosticMessages && getMessages) {
15334
+ localizedDiagnosticMessages = getMessages();
15335
+ }
15336
+ }
15337
+ ts.maybeSetLocalizedDiagnosticMessages = maybeSetLocalizedDiagnosticMessages;
15316
15338
  function getLocaleSpecificMessage(message) {
15317
- return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
15339
+ return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message;
15318
15340
  }
15319
15341
  ts.getLocaleSpecificMessage = getLocaleSpecificMessage;
15320
15342
  function createDetachedDiagnostic(fileName, start, length, message) {
@@ -28164,7 +28186,7 @@ var ts;
28164
28186
  var catchClause = token() === 83 ? parseCatchClause() : undefined;
28165
28187
  var finallyBlock;
28166
28188
  if (!catchClause || token() === 96) {
28167
- parseExpected(96);
28189
+ parseExpected(96, ts.Diagnostics.catch_or_finally_expected);
28168
28190
  finallyBlock = parseBlock(false);
28169
28191
  }
28170
28192
  return withJSDoc(finishNode(factory.createTryStatement(tryBlock, catchClause, finallyBlock), pos), hasJSDoc);
@@ -29088,7 +29110,7 @@ var ts;
29088
29110
  var pos = getNodePos();
29089
29111
  var name = ts.tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(10);
29090
29112
  parseExpected(58);
29091
- var value = parseLiteralLikeNode(10);
29113
+ var value = parseAssignmentExpressionOrHigher();
29092
29114
  return finishNode(factory.createAssertEntry(name, value), pos);
29093
29115
  }
29094
29116
  function parseAssertClause() {
@@ -37227,6 +37249,8 @@ var ts;
37227
37249
  return;
37228
37250
  }
37229
37251
  ts.setParent(node, parent);
37252
+ if (ts.tracing)
37253
+ node.tracingPath = file.path;
37230
37254
  var saveInStrictMode = inStrictMode;
37231
37255
  bindWorker(node);
37232
37256
  if (node.kind > 159) {
@@ -37932,7 +37956,7 @@ var ts;
37932
37956
  checkStrictModeEvalOrArguments(node, node.name);
37933
37957
  }
37934
37958
  if (!ts.isBindingPattern(node.name)) {
37935
- if (ts.isInJSFile(node) && ts.isRequireVariableDeclaration(node) && !ts.getJSDocTypeTag(node)) {
37959
+ if (ts.isInJSFile(node) && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node) && !ts.getJSDocTypeTag(node)) {
37936
37960
  declareSymbolAndAddToSymbolTable(node, 2097152, 2097152);
37937
37961
  }
37938
37962
  else if (ts.isBlockOrCatchScoped(node)) {
@@ -40210,7 +40234,7 @@ var ts;
40210
40234
  && isAliasableOrJsExpression(node.parent.right)
40211
40235
  || node.kind === 295
40212
40236
  || node.kind === 294 && isAliasableOrJsExpression(node.initializer)
40213
- || ts.isRequireVariableDeclaration(node);
40237
+ || ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node);
40214
40238
  }
40215
40239
  function isAliasableOrJsExpression(e) {
40216
40240
  return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e);
@@ -40902,8 +40926,13 @@ var ts;
40902
40926
  var mode = contextSpecifier && ts.isStringLiteralLike(contextSpecifier) ? ts.getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat;
40903
40927
  var resolvedModule = ts.getResolvedModule(currentSourceFile, moduleReference, mode);
40904
40928
  var resolutionDiagnostic = resolvedModule && ts.getResolutionDiagnostic(compilerOptions, resolvedModule);
40905
- var sourceFile = resolvedModule && !resolutionDiagnostic && host.getSourceFile(resolvedModule.resolvedFileName);
40929
+ var sourceFile = resolvedModule
40930
+ && (!resolutionDiagnostic || resolutionDiagnostic === ts.Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set)
40931
+ && host.getSourceFile(resolvedModule.resolvedFileName);
40906
40932
  if (sourceFile) {
40933
+ if (resolutionDiagnostic) {
40934
+ error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName);
40935
+ }
40907
40936
  if (sourceFile.symbol) {
40908
40937
  if (resolvedModule.isExternalLibraryImport && !ts.resolutionExtensionIsTSOrJson(resolvedModule.extension)) {
40909
40938
  errorOnImplicitAnyModule(false, errorNode, resolvedModule, moduleReference);
@@ -56664,10 +56693,21 @@ var ts;
56664
56693
  }
56665
56694
  if (flags & 2097152) {
56666
56695
  ignoreObjects || (ignoreObjects = maybeTypeOfKind(type, 131068));
56667
- return ts.reduceLeft(type.types, function (facts, t) { return facts & getTypeFacts(t, ignoreObjects); }, 16777215);
56696
+ return getIntersectionTypeFacts(type, ignoreObjects);
56668
56697
  }
56669
56698
  return 16777215;
56670
56699
  }
56700
+ function getIntersectionTypeFacts(type, ignoreObjects) {
56701
+ var oredFacts = 0;
56702
+ var andedFacts = 16777215;
56703
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
56704
+ var t = _a[_i];
56705
+ var f = getTypeFacts(t, ignoreObjects);
56706
+ oredFacts |= f;
56707
+ andedFacts &= f;
56708
+ }
56709
+ return oredFacts & 8288 | andedFacts & 16768927;
56710
+ }
56671
56711
  function getTypeWithFacts(type, include) {
56672
56712
  return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
56673
56713
  }
@@ -65257,7 +65297,7 @@ var ts;
65257
65297
  }
65258
65298
  }
65259
65299
  function checkExpression(node, checkMode, forceTuple) {
65260
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkExpression", { kind: node.kind, pos: node.pos, end: node.end });
65300
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkExpression", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
65261
65301
  var saveCurrentNode = currentNode;
65262
65302
  currentNode = node;
65263
65303
  instantiationCount = 0;
@@ -67514,7 +67554,7 @@ var ts;
67514
67554
  return;
67515
67555
  }
67516
67556
  var symbol = getSymbolOfNode(node);
67517
- if (symbol.flags & 2097152 && ts.isRequireVariableDeclaration(node)) {
67557
+ if (symbol.flags & 2097152 && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node)) {
67518
67558
  checkAliasSymbol(node);
67519
67559
  return;
67520
67560
  }
@@ -67586,7 +67626,7 @@ var ts;
67586
67626
  return ts.getSelectedEffectiveModifierFlags(left, interestingFlags) === ts.getSelectedEffectiveModifierFlags(right, interestingFlags);
67587
67627
  }
67588
67628
  function checkVariableDeclaration(node) {
67589
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkVariableDeclaration", { kind: node.kind, pos: node.pos, end: node.end });
67629
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkVariableDeclaration", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
67590
67630
  checkGrammarVariableDeclaration(node);
67591
67631
  checkVariableLikeDeclaration(node);
67592
67632
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
@@ -69575,6 +69615,17 @@ var ts;
69575
69615
  return false;
69576
69616
  }
69577
69617
  }
69618
+ if (!ts.isImportEqualsDeclaration(node) && node.assertClause) {
69619
+ var hasError = false;
69620
+ for (var _i = 0, _a = node.assertClause.elements; _i < _a.length; _i++) {
69621
+ var clause = _a[_i];
69622
+ if (!ts.isStringLiteral(clause.value)) {
69623
+ hasError = true;
69624
+ error(clause.value, ts.Diagnostics.Import_assertion_values_must_be_string_literal_expressions);
69625
+ }
69626
+ }
69627
+ return !hasError;
69628
+ }
69578
69629
  return true;
69579
69630
  }
69580
69631
  function checkAliasSymbol(node) {
@@ -70210,7 +70261,7 @@ var ts;
70210
70261
  }
70211
70262
  }
70212
70263
  function checkDeferredNode(node) {
70213
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkDeferredNode", { kind: node.kind, pos: node.pos, end: node.end });
70264
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkDeferredNode", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
70214
70265
  var saveCurrentNode = currentNode;
70215
70266
  currentNode = node;
70216
70267
  instantiationCount = 0;
@@ -73790,7 +73841,7 @@ var ts;
73790
73841
  return factory.updateAssertClause(node, nodesVisitor(node.elements, visitor, ts.isAssertEntry), node.multiLine);
73791
73842
  case 293:
73792
73843
  ts.Debug.type(node);
73793
- return factory.updateAssertEntry(node, nodeVisitor(node.name, visitor, ts.isAssertionKey), nodeVisitor(node.value, visitor, ts.isStringLiteral));
73844
+ return factory.updateAssertEntry(node, nodeVisitor(node.name, visitor, ts.isAssertionKey), nodeVisitor(node.value, visitor, ts.isExpressionNode));
73794
73845
  case 266:
73795
73846
  ts.Debug.type(node);
73796
73847
  return factory.updateImportClause(node, node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.namedBindings, visitor, ts.isNamedImportBindings));
@@ -99397,22 +99448,31 @@ var ts;
99397
99448
  ts.Diagnostics.Found_0_errors_Watching_for_file_changes;
99398
99449
  }
99399
99450
  ts.getWatchErrorSummaryDiagnosticMessage = getWatchErrorSummaryDiagnosticMessage;
99451
+ function prettyPathForFileError(error, cwd) {
99452
+ var line = ts.formatColorAndReset(":" + error.line, ts.ForegroundColorEscapeSequences.Grey);
99453
+ if (ts.pathIsAbsolute(error.fileName) && ts.pathIsAbsolute(cwd)) {
99454
+ return ts.getRelativePathFromDirectory(cwd, error.fileName, false) + line;
99455
+ }
99456
+ return error.fileName + line;
99457
+ }
99400
99458
  function getErrorSummaryText(errorCount, filesInError, newLine, host) {
99401
99459
  if (errorCount === 0)
99402
99460
  return "";
99403
99461
  var nonNilFiles = filesInError.filter(function (fileInError) { return fileInError !== undefined; });
99404
99462
  var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return fileInError.fileName + ":" + fileInError.line; })
99405
99463
  .filter(function (value, index, self) { return self.indexOf(value) === index; });
99464
+ var firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());
99406
99465
  var d = errorCount === 1 ?
99407
99466
  ts.createCompilerDiagnostic(filesInError[0] !== undefined ?
99408
99467
  ts.Diagnostics.Found_1_error_in_1 :
99409
- ts.Diagnostics.Found_1_error, errorCount, distinctFileNamesWithLines[0]) :
99468
+ ts.Diagnostics.Found_1_error, errorCount, firstFileReference) :
99410
99469
  ts.createCompilerDiagnostic(distinctFileNamesWithLines.length === 0 ?
99411
99470
  ts.Diagnostics.Found_0_errors :
99412
99471
  distinctFileNamesWithLines.length === 1 ?
99413
- ts.Diagnostics.Found_0_errors_in_1_file :
99414
- ts.Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length);
99415
- return "" + newLine + ts.flattenDiagnosticMessageText(d.messageText, newLine) + newLine + newLine + (errorCount > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : "");
99472
+ ts.Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1 :
99473
+ ts.Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length === 1 ? firstFileReference : distinctFileNamesWithLines.length);
99474
+ var suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : "";
99475
+ return "" + newLine + ts.flattenDiagnosticMessageText(d.messageText, newLine) + newLine + newLine + suffix;
99416
99476
  }
99417
99477
  ts.getErrorSummaryText = getErrorSummaryText;
99418
99478
  function createTabularErrorsDisplay(filesInError, host) {
@@ -99434,8 +99494,8 @@ var ts;
99434
99494
  var leftPadding = errorCountDigitsLength < leftPaddingGoal ?
99435
99495
  " ".repeat(leftPaddingGoal - errorCountDigitsLength)
99436
99496
  : "";
99437
- var relativePath = ts.getRelativePathFromDirectory(host.getCurrentDirectory(), file.fileName, false);
99438
- tabularData += "" + leftPadding + errorCount + " " + relativePath + ":" + file.line + "\n";
99497
+ var fileRef = prettyPathForFileError(file, host.getCurrentDirectory());
99498
+ tabularData += "" + leftPadding + errorCount + " " + fileRef + "\n";
99439
99499
  });
99440
99500
  return tabularData;
99441
99501
  }