typescript 5.3.0-dev.20230810 → 5.3.0-dev.20230812

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.3";
21
- var version = `${versionMajorMinor}.0-dev.20230810`;
21
+ var version = `${versionMajorMinor}.0-dev.20230812`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -16034,8 +16034,8 @@ var objectAllocator = {
16034
16034
  getSignatureConstructor: () => Signature2,
16035
16035
  getSourceMapSourceConstructor: () => SourceMapSource
16036
16036
  };
16037
- function formatStringFromArgs(text, args, baseIndex = 0) {
16038
- return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex]));
16037
+ function formatStringFromArgs(text, args) {
16038
+ return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index]));
16039
16039
  }
16040
16040
  var localizedDiagnosticMessages;
16041
16041
  function setLocalizedDiagnosticMessages(messages) {
@@ -16044,7 +16044,7 @@ function setLocalizedDiagnosticMessages(messages) {
16044
16044
  function getLocaleSpecificMessage(message) {
16045
16045
  return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message;
16046
16046
  }
16047
- function createDetachedDiagnostic(fileName, start, length2, message) {
16047
+ function createDetachedDiagnostic(fileName, start, length2, message, ...args) {
16048
16048
  assertDiagnosticLocation(
16049
16049
  /*file*/
16050
16050
  void 0,
@@ -16052,8 +16052,8 @@ function createDetachedDiagnostic(fileName, start, length2, message) {
16052
16052
  length2
16053
16053
  );
16054
16054
  let text = getLocaleSpecificMessage(message);
16055
- if (arguments.length > 4) {
16056
- text = formatStringFromArgs(text, arguments, 4);
16055
+ if (some(args)) {
16056
+ text = formatStringFromArgs(text, args);
16057
16057
  }
16058
16058
  return {
16059
16059
  file: void 0,
@@ -16105,11 +16105,11 @@ function attachFileToDiagnostics(diagnostics, file) {
16105
16105
  }
16106
16106
  return diagnosticsWithLocation;
16107
16107
  }
16108
- function createFileDiagnostic(file, start, length2, message) {
16108
+ function createFileDiagnostic(file, start, length2, message, ...args) {
16109
16109
  assertDiagnosticLocation(file, start, length2);
16110
16110
  let text = getLocaleSpecificMessage(message);
16111
- if (arguments.length > 4) {
16112
- text = formatStringFromArgs(text, arguments, 4);
16111
+ if (some(args)) {
16112
+ text = formatStringFromArgs(text, args);
16113
16113
  }
16114
16114
  return {
16115
16115
  file,
@@ -16122,17 +16122,17 @@ function createFileDiagnostic(file, start, length2, message) {
16122
16122
  reportsDeprecated: message.reportsDeprecated
16123
16123
  };
16124
16124
  }
16125
- function formatMessage(_dummy, message) {
16125
+ function formatMessage(message, ...args) {
16126
16126
  let text = getLocaleSpecificMessage(message);
16127
- if (arguments.length > 2) {
16128
- text = formatStringFromArgs(text, arguments, 2);
16127
+ if (some(args)) {
16128
+ text = formatStringFromArgs(text, args);
16129
16129
  }
16130
16130
  return text;
16131
16131
  }
16132
- function createCompilerDiagnostic(message) {
16132
+ function createCompilerDiagnostic(message, ...args) {
16133
16133
  let text = getLocaleSpecificMessage(message);
16134
- if (arguments.length > 1) {
16135
- text = formatStringFromArgs(text, arguments, 1);
16134
+ if (some(args)) {
16135
+ text = formatStringFromArgs(text, args);
16136
16136
  }
16137
16137
  return {
16138
16138
  file: void 0,
@@ -16156,10 +16156,10 @@ function createCompilerDiagnosticFromMessageChain(chain, relatedInformation) {
16156
16156
  relatedInformation
16157
16157
  };
16158
16158
  }
16159
- function chainDiagnosticMessages(details, message) {
16159
+ function chainDiagnosticMessages(details, message, ...args) {
16160
16160
  let text = getLocaleSpecificMessage(message);
16161
- if (arguments.length > 2) {
16162
- text = formatStringFromArgs(text, arguments, 2);
16161
+ if (some(args)) {
16162
+ text = formatStringFromArgs(text, args);
16163
16163
  }
16164
16164
  return {
16165
16165
  messageText: text,
@@ -35390,9 +35390,8 @@ function parseBuildCommand(args) {
35390
35390
  }
35391
35391
  return { buildOptions, watchOptions, projects, errors };
35392
35392
  }
35393
- function getDiagnosticText(_message, ..._args) {
35394
- const diagnostic = createCompilerDiagnostic.apply(void 0, arguments);
35395
- return diagnostic.messageText;
35393
+ function getDiagnosticText(message, ...args) {
35394
+ return cast(createCompilerDiagnostic(message, ...args).messageText, isString);
35396
35395
  }
35397
35396
  function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {
35398
35397
  const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName));
@@ -36738,8 +36737,8 @@ function getDefaultValueForOption(option) {
36738
36737
  }
36739
36738
 
36740
36739
  // src/compiler/moduleNameResolver.ts
36741
- function trace(host) {
36742
- host.trace(formatMessage.apply(void 0, arguments));
36740
+ function trace(host, message, ...args) {
36741
+ host.trace(formatMessage(message, ...args));
36743
36742
  }
36744
36743
  function isTraceEnabled(compilerOptions, host) {
36745
36744
  return !!compilerOptions.traceResolution && host.trace !== void 0;
@@ -56536,7 +56535,10 @@ function createTypeChecker(host) {
56536
56535
  }
56537
56536
  }
56538
56537
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
56539
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
56538
+ const templates = filter(
56539
+ types,
56540
+ (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
56541
+ );
56540
56542
  if (templates.length) {
56541
56543
  let i = types.length;
56542
56544
  while (i > 0) {
@@ -56941,15 +56943,19 @@ function createTypeChecker(host) {
56941
56943
  function getConstituentCountOfTypes(types) {
56942
56944
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
56943
56945
  }
56944
- function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
56945
- return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
56946
+ function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
56947
+ if (types.length !== 2) {
56948
+ return false;
56949
+ }
56950
+ const [t1, t2] = types;
56951
+ return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
56946
56952
  }
56947
56953
  function getTypeFromIntersectionTypeNode(node) {
56948
56954
  const links = getNodeLinks(node);
56949
56955
  if (!links.resolvedType) {
56950
56956
  const aliasSymbol = getAliasSymbolForTypeNode(node);
56951
56957
  const types = map(node.types, getTypeFromTypeNode);
56952
- const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
56958
+ const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
56953
56959
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
56954
56960
  }
56955
56961
  return links.resolvedType;
@@ -59378,14 +59384,7 @@ function createTypeChecker(host) {
59378
59384
  const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName);
59379
59385
  const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
59380
59386
  const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
59381
- invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
59382
- /*dummy*/
59383
- void 0,
59384
- diagnostic,
59385
- tagNameText,
59386
- childrenPropName,
59387
- typeToString(childrenTargetType)
59388
- ) };
59387
+ invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };
59389
59388
  }
59390
59389
  return invalidTextDiagnostic;
59391
59390
  }
@@ -63407,6 +63406,9 @@ function createTypeChecker(host) {
63407
63406
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
63408
63407
  return true;
63409
63408
  }
63409
+ if (target.flags & 2097152 /* Intersection */) {
63410
+ return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
63411
+ }
63410
63412
  if (source.flags & 128 /* StringLiteral */) {
63411
63413
  const value = source.value;
63412
63414
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -63417,7 +63419,7 @@ function createTypeChecker(host) {
63417
63419
  value,
63418
63420
  /*roundTripOnly*/
63419
63421
  false
63420
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
63422
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
63421
63423
  }
63422
63424
  if (source.flags & 134217728 /* TemplateLiteral */) {
63423
63425
  const texts = source.texts;
@@ -125065,12 +125067,7 @@ function printEasyHelp(sys2, simpleOptions) {
125065
125067
  false,
125066
125068
  /*beforeOptionsDescription*/
125067
125069
  void 0,
125068
- formatMessage(
125069
- /*dummy*/
125070
- void 0,
125071
- Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0,
125072
- "https://aka.ms/tsc"
125073
- )
125070
+ formatMessage(Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc")
125074
125071
  )
125075
125072
  ];
125076
125073
  for (const line of output) {
@@ -125094,12 +125091,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
125094
125091
  true,
125095
125092
  /*beforeOptionsDescription*/
125096
125093
  void 0,
125097
- formatMessage(
125098
- /*dummy*/
125099
- void 0,
125100
- Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0,
125101
- "https://aka.ms/tsc"
125102
- )
125094
+ formatMessage(Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc")
125103
125095
  )];
125104
125096
  output = [...output, ...generateSectionOptionsOutput(
125105
125097
  sys2,
@@ -125115,12 +125107,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
125115
125107
  buildOptions,
125116
125108
  /*subCategory*/
125117
125109
  false,
125118
- formatMessage(
125119
- /*dummy*/
125120
- void 0,
125121
- Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,
125122
- "https://aka.ms/tsc-composite-builds"
125123
- )
125110
+ formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")
125124
125111
  )];
125125
125112
  for (const line of output) {
125126
125113
  sys2.write(line);
@@ -125134,12 +125121,7 @@ function printBuildHelp(sys2, buildOptions) {
125134
125121
  buildOptions,
125135
125122
  /*subCategory*/
125136
125123
  false,
125137
- formatMessage(
125138
- /*dummy*/
125139
- void 0,
125140
- Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,
125141
- "https://aka.ms/tsc-composite-builds"
125142
- )
125124
+ formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")
125143
125125
  )];
125144
125126
  for (const line of output) {
125145
125127
  sys2.write(line);
package/lib/tsserver.js CHANGED
@@ -2331,7 +2331,7 @@ module.exports = __toCommonJS(server_exports);
2331
2331
 
2332
2332
  // src/compiler/corePublic.ts
2333
2333
  var versionMajorMinor = "5.3";
2334
- var version = `${versionMajorMinor}.0-dev.20230810`;
2334
+ var version = `${versionMajorMinor}.0-dev.20230812`;
2335
2335
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2336
2336
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2337
2337
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -20165,8 +20165,8 @@ function setObjectAllocator(alloc) {
20165
20165
  Object.assign(objectAllocator, alloc);
20166
20166
  forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator));
20167
20167
  }
20168
- function formatStringFromArgs(text, args, baseIndex = 0) {
20169
- return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex]));
20168
+ function formatStringFromArgs(text, args) {
20169
+ return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index]));
20170
20170
  }
20171
20171
  var localizedDiagnosticMessages;
20172
20172
  function setLocalizedDiagnosticMessages(messages) {
@@ -20180,7 +20180,7 @@ function maybeSetLocalizedDiagnosticMessages(getMessages) {
20180
20180
  function getLocaleSpecificMessage(message) {
20181
20181
  return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message;
20182
20182
  }
20183
- function createDetachedDiagnostic(fileName, start2, length2, message) {
20183
+ function createDetachedDiagnostic(fileName, start2, length2, message, ...args) {
20184
20184
  assertDiagnosticLocation(
20185
20185
  /*file*/
20186
20186
  void 0,
@@ -20188,8 +20188,8 @@ function createDetachedDiagnostic(fileName, start2, length2, message) {
20188
20188
  length2
20189
20189
  );
20190
20190
  let text = getLocaleSpecificMessage(message);
20191
- if (arguments.length > 4) {
20192
- text = formatStringFromArgs(text, arguments, 4);
20191
+ if (some(args)) {
20192
+ text = formatStringFromArgs(text, args);
20193
20193
  }
20194
20194
  return {
20195
20195
  file: void 0,
@@ -20241,11 +20241,11 @@ function attachFileToDiagnostics(diagnostics, file) {
20241
20241
  }
20242
20242
  return diagnosticsWithLocation;
20243
20243
  }
20244
- function createFileDiagnostic(file, start2, length2, message) {
20244
+ function createFileDiagnostic(file, start2, length2, message, ...args) {
20245
20245
  assertDiagnosticLocation(file, start2, length2);
20246
20246
  let text = getLocaleSpecificMessage(message);
20247
- if (arguments.length > 4) {
20248
- text = formatStringFromArgs(text, arguments, 4);
20247
+ if (some(args)) {
20248
+ text = formatStringFromArgs(text, args);
20249
20249
  }
20250
20250
  return {
20251
20251
  file,
@@ -20258,17 +20258,17 @@ function createFileDiagnostic(file, start2, length2, message) {
20258
20258
  reportsDeprecated: message.reportsDeprecated
20259
20259
  };
20260
20260
  }
20261
- function formatMessage(_dummy, message) {
20261
+ function formatMessage(message, ...args) {
20262
20262
  let text = getLocaleSpecificMessage(message);
20263
- if (arguments.length > 2) {
20264
- text = formatStringFromArgs(text, arguments, 2);
20263
+ if (some(args)) {
20264
+ text = formatStringFromArgs(text, args);
20265
20265
  }
20266
20266
  return text;
20267
20267
  }
20268
- function createCompilerDiagnostic(message) {
20268
+ function createCompilerDiagnostic(message, ...args) {
20269
20269
  let text = getLocaleSpecificMessage(message);
20270
- if (arguments.length > 1) {
20271
- text = formatStringFromArgs(text, arguments, 1);
20270
+ if (some(args)) {
20271
+ text = formatStringFromArgs(text, args);
20272
20272
  }
20273
20273
  return {
20274
20274
  file: void 0,
@@ -20292,10 +20292,10 @@ function createCompilerDiagnosticFromMessageChain(chain, relatedInformation) {
20292
20292
  relatedInformation
20293
20293
  };
20294
20294
  }
20295
- function chainDiagnosticMessages(details, message) {
20295
+ function chainDiagnosticMessages(details, message, ...args) {
20296
20296
  let text = getLocaleSpecificMessage(message);
20297
- if (arguments.length > 2) {
20298
- text = formatStringFromArgs(text, arguments, 2);
20297
+ if (some(args)) {
20298
+ text = formatStringFromArgs(text, args);
20299
20299
  }
20300
20300
  return {
20301
20301
  messageText: text,
@@ -39796,9 +39796,8 @@ function parseBuildCommand(args) {
39796
39796
  }
39797
39797
  return { buildOptions, watchOptions, projects, errors };
39798
39798
  }
39799
- function getDiagnosticText(_message, ..._args) {
39800
- const diagnostic = createCompilerDiagnostic.apply(void 0, arguments);
39801
- return diagnostic.messageText;
39799
+ function getDiagnosticText(message, ...args) {
39800
+ return cast(createCompilerDiagnostic(message, ...args).messageText, isString);
39802
39801
  }
39803
39802
  function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {
39804
39803
  const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName));
@@ -41211,8 +41210,8 @@ function getDefaultValueForOption(option) {
41211
41210
  }
41212
41211
 
41213
41212
  // src/compiler/moduleNameResolver.ts
41214
- function trace(host) {
41215
- host.trace(formatMessage.apply(void 0, arguments));
41213
+ function trace(host, message, ...args) {
41214
+ host.trace(formatMessage(message, ...args));
41216
41215
  }
41217
41216
  function isTraceEnabled(compilerOptions, host) {
41218
41217
  return !!compilerOptions.traceResolution && host.trace !== void 0;
@@ -61245,7 +61244,10 @@ function createTypeChecker(host) {
61245
61244
  }
61246
61245
  }
61247
61246
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
61248
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
61247
+ const templates = filter(
61248
+ types,
61249
+ (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
61250
+ );
61249
61251
  if (templates.length) {
61250
61252
  let i = types.length;
61251
61253
  while (i > 0) {
@@ -61650,15 +61652,19 @@ function createTypeChecker(host) {
61650
61652
  function getConstituentCountOfTypes(types) {
61651
61653
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
61652
61654
  }
61653
- function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
61654
- return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
61655
+ function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
61656
+ if (types.length !== 2) {
61657
+ return false;
61658
+ }
61659
+ const [t1, t2] = types;
61660
+ return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
61655
61661
  }
61656
61662
  function getTypeFromIntersectionTypeNode(node) {
61657
61663
  const links = getNodeLinks(node);
61658
61664
  if (!links.resolvedType) {
61659
61665
  const aliasSymbol = getAliasSymbolForTypeNode(node);
61660
61666
  const types = map(node.types, getTypeFromTypeNode);
61661
- const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
61667
+ const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
61662
61668
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
61663
61669
  }
61664
61670
  return links.resolvedType;
@@ -64087,14 +64093,7 @@ function createTypeChecker(host) {
64087
64093
  const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName);
64088
64094
  const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
64089
64095
  const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
64090
- invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
64091
- /*dummy*/
64092
- void 0,
64093
- diagnostic,
64094
- tagNameText,
64095
- childrenPropName,
64096
- typeToString(childrenTargetType)
64097
- ) };
64096
+ invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };
64098
64097
  }
64099
64098
  return invalidTextDiagnostic;
64100
64099
  }
@@ -68116,6 +68115,9 @@ function createTypeChecker(host) {
68116
68115
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
68117
68116
  return true;
68118
68117
  }
68118
+ if (target.flags & 2097152 /* Intersection */) {
68119
+ return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
68120
+ }
68119
68121
  if (source.flags & 128 /* StringLiteral */) {
68120
68122
  const value = source.value;
68121
68123
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -68126,7 +68128,7 @@ function createTypeChecker(host) {
68126
68128
  value,
68127
68129
  /*roundTripOnly*/
68128
68130
  false
68129
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
68131
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
68130
68132
  }
68131
68133
  if (source.flags & 134217728 /* TemplateLiteral */) {
68132
68134
  const texts = source.texts;
@@ -144592,7 +144594,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
144592
144594
  const lineTextStart = lineTextStarts.get(i.toString());
144593
144595
  if (lineTextStart !== void 0) {
144594
144596
  if (isJsx) {
144595
- textChanges2.push.apply(textChanges2, toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx));
144597
+ textChanges2.push(...toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx));
144596
144598
  } else if (isCommenting) {
144597
144599
  textChanges2.push({
144598
144600
  newText: openComment,
@@ -144735,7 +144737,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
144735
144737
  if (commentRange) {
144736
144738
  switch (commentRange.kind) {
144737
144739
  case 2 /* SingleLineCommentTrivia */:
144738
- textChanges2.push.apply(textChanges2, toggleLineComment(
144740
+ textChanges2.push(...toggleLineComment(
144739
144741
  fileName,
144740
144742
  { end: commentRange.end, pos: commentRange.pos + 1 },
144741
144743
  /*insertComment*/
@@ -144743,7 +144745,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
144743
144745
  ));
144744
144746
  break;
144745
144747
  case 3 /* MultiLineCommentTrivia */:
144746
- textChanges2.push.apply(textChanges2, toggleMultilineComment(
144748
+ textChanges2.push(...toggleMultilineComment(
144747
144749
  fileName,
144748
144750
  { end: commentRange.end, pos: commentRange.pos + 1 },
144749
144751
  /*insertComment*/
@@ -169791,7 +169793,7 @@ function getAllRules() {
169791
169793
  rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */),
169792
169794
  rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */),
169793
169795
  rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169794
- rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */),
169796
+ rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */),
169795
169797
  rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169796
169798
  // insert space after '?' only when it is used in conditional operator
169797
169799
  rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
@@ -169862,6 +169864,8 @@ function getAllRules() {
169862
169864
  rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169863
169865
  rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169864
169866
  rule("NoSpaceAfterEqualInJsxAttribute", 64 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169867
+ rule("NoSpaceBeforeJsxNamespaceColon", 80 /* Identifier */, 59 /* ColonToken */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */),
169868
+ rule("NoSpaceAfterJsxNamespaceColon", 59 /* ColonToken */, 80 /* Identifier */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */),
169865
169869
  // TypeScript-specific rules
169866
169870
  // Use of module as a function call. e.g.: import m2 = module("m2");
169867
169871
  rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
@@ -170291,11 +170295,17 @@ function isJsxExpressionContext(context) {
170291
170295
  return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */;
170292
170296
  }
170293
170297
  function isNextTokenParentJsxAttribute(context) {
170294
- return context.nextTokenParent.kind === 291 /* JsxAttribute */;
170298
+ return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */;
170295
170299
  }
170296
170300
  function isJsxAttributeContext(context) {
170297
170301
  return context.contextNode.kind === 291 /* JsxAttribute */;
170298
170302
  }
170303
+ function isNextTokenParentNotJsxNamespacedName(context) {
170304
+ return context.nextTokenParent.kind !== 295 /* JsxNamespacedName */;
170305
+ }
170306
+ function isNextTokenParentJsxNamespacedName(context) {
170307
+ return context.nextTokenParent.kind === 295 /* JsxNamespacedName */;
170308
+ }
170299
170309
  function isJsxSelfClosingElementContext(context) {
170300
170310
  return context.contextNode.kind === 285 /* JsxSelfClosingElement */;
170301
170311
  }
@@ -174381,7 +174391,7 @@ function formatDeprecationMessage(name, error2, errorAfter, since, message) {
174381
174391
  deprecationMessage += `'${name}' `;
174382
174392
  deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated";
174383
174393
  deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : ".";
174384
- deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : "";
174394
+ deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : "";
174385
174395
  return deprecationMessage;
174386
174396
  }
174387
174397
  function createErrorDeprecation(name, errorAfter, since, message) {
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-dev.20230810`;
38
+ version = `${versionMajorMinor}.0-dev.20230812`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -17847,8 +17847,8 @@ ${lanes.join("\n")}
17847
17847
  Object.assign(objectAllocator, alloc);
17848
17848
  forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator));
17849
17849
  }
17850
- function formatStringFromArgs(text, args, baseIndex = 0) {
17851
- return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex]));
17850
+ function formatStringFromArgs(text, args) {
17851
+ return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index]));
17852
17852
  }
17853
17853
  function setLocalizedDiagnosticMessages(messages) {
17854
17854
  localizedDiagnosticMessages = messages;
@@ -17861,7 +17861,7 @@ ${lanes.join("\n")}
17861
17861
  function getLocaleSpecificMessage(message) {
17862
17862
  return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message;
17863
17863
  }
17864
- function createDetachedDiagnostic(fileName, start, length2, message) {
17864
+ function createDetachedDiagnostic(fileName, start, length2, message, ...args) {
17865
17865
  assertDiagnosticLocation(
17866
17866
  /*file*/
17867
17867
  void 0,
@@ -17869,8 +17869,8 @@ ${lanes.join("\n")}
17869
17869
  length2
17870
17870
  );
17871
17871
  let text = getLocaleSpecificMessage(message);
17872
- if (arguments.length > 4) {
17873
- text = formatStringFromArgs(text, arguments, 4);
17872
+ if (some(args)) {
17873
+ text = formatStringFromArgs(text, args);
17874
17874
  }
17875
17875
  return {
17876
17876
  file: void 0,
@@ -17922,11 +17922,11 @@ ${lanes.join("\n")}
17922
17922
  }
17923
17923
  return diagnosticsWithLocation;
17924
17924
  }
17925
- function createFileDiagnostic(file, start, length2, message) {
17925
+ function createFileDiagnostic(file, start, length2, message, ...args) {
17926
17926
  assertDiagnosticLocation(file, start, length2);
17927
17927
  let text = getLocaleSpecificMessage(message);
17928
- if (arguments.length > 4) {
17929
- text = formatStringFromArgs(text, arguments, 4);
17928
+ if (some(args)) {
17929
+ text = formatStringFromArgs(text, args);
17930
17930
  }
17931
17931
  return {
17932
17932
  file,
@@ -17939,17 +17939,17 @@ ${lanes.join("\n")}
17939
17939
  reportsDeprecated: message.reportsDeprecated
17940
17940
  };
17941
17941
  }
17942
- function formatMessage(_dummy, message) {
17942
+ function formatMessage(message, ...args) {
17943
17943
  let text = getLocaleSpecificMessage(message);
17944
- if (arguments.length > 2) {
17945
- text = formatStringFromArgs(text, arguments, 2);
17944
+ if (some(args)) {
17945
+ text = formatStringFromArgs(text, args);
17946
17946
  }
17947
17947
  return text;
17948
17948
  }
17949
- function createCompilerDiagnostic(message) {
17949
+ function createCompilerDiagnostic(message, ...args) {
17950
17950
  let text = getLocaleSpecificMessage(message);
17951
- if (arguments.length > 1) {
17952
- text = formatStringFromArgs(text, arguments, 1);
17951
+ if (some(args)) {
17952
+ text = formatStringFromArgs(text, args);
17953
17953
  }
17954
17954
  return {
17955
17955
  file: void 0,
@@ -17973,10 +17973,10 @@ ${lanes.join("\n")}
17973
17973
  relatedInformation
17974
17974
  };
17975
17975
  }
17976
- function chainDiagnosticMessages(details, message) {
17976
+ function chainDiagnosticMessages(details, message, ...args) {
17977
17977
  let text = getLocaleSpecificMessage(message);
17978
- if (arguments.length > 2) {
17979
- text = formatStringFromArgs(text, arguments, 2);
17978
+ if (some(args)) {
17979
+ text = formatStringFromArgs(text, args);
17980
17980
  }
17981
17981
  return {
17982
17982
  messageText: text,
@@ -36161,9 +36161,8 @@ ${lanes.join("\n")}
36161
36161
  }
36162
36162
  return { buildOptions, watchOptions, projects, errors };
36163
36163
  }
36164
- function getDiagnosticText(_message, ..._args) {
36165
- const diagnostic = createCompilerDiagnostic.apply(void 0, arguments);
36166
- return diagnostic.messageText;
36164
+ function getDiagnosticText(message, ...args) {
36165
+ return cast(createCompilerDiagnostic(message, ...args).messageText, isString);
36167
36166
  }
36168
36167
  function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {
36169
36168
  const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName));
@@ -39068,8 +39067,8 @@ ${lanes.join("\n")}
39068
39067
  });
39069
39068
 
39070
39069
  // src/compiler/moduleNameResolver.ts
39071
- function trace(host) {
39072
- host.trace(formatMessage.apply(void 0, arguments));
39070
+ function trace(host, message, ...args) {
39071
+ host.trace(formatMessage(message, ...args));
39073
39072
  }
39074
39073
  function isTraceEnabled(compilerOptions, host) {
39075
39074
  return !!compilerOptions.traceResolution && host.trace !== void 0;
@@ -59008,7 +59007,10 @@ ${lanes.join("\n")}
59008
59007
  }
59009
59008
  }
59010
59009
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
59011
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
59010
+ const templates = filter(
59011
+ types,
59012
+ (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
59013
+ );
59012
59014
  if (templates.length) {
59013
59015
  let i = types.length;
59014
59016
  while (i > 0) {
@@ -59413,15 +59415,19 @@ ${lanes.join("\n")}
59413
59415
  function getConstituentCountOfTypes(types) {
59414
59416
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
59415
59417
  }
59416
- function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
59417
- return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
59418
+ function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
59419
+ if (types.length !== 2) {
59420
+ return false;
59421
+ }
59422
+ const [t1, t2] = types;
59423
+ return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
59418
59424
  }
59419
59425
  function getTypeFromIntersectionTypeNode(node) {
59420
59426
  const links = getNodeLinks(node);
59421
59427
  if (!links.resolvedType) {
59422
59428
  const aliasSymbol = getAliasSymbolForTypeNode(node);
59423
59429
  const types = map(node.types, getTypeFromTypeNode);
59424
- const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
59430
+ const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
59425
59431
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
59426
59432
  }
59427
59433
  return links.resolvedType;
@@ -61850,14 +61856,7 @@ ${lanes.join("\n")}
61850
61856
  const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName);
61851
61857
  const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
61852
61858
  const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
61853
- invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
61854
- /*dummy*/
61855
- void 0,
61856
- diagnostic,
61857
- tagNameText,
61858
- childrenPropName,
61859
- typeToString(childrenTargetType)
61860
- ) };
61859
+ invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };
61861
61860
  }
61862
61861
  return invalidTextDiagnostic;
61863
61862
  }
@@ -65879,6 +65878,9 @@ ${lanes.join("\n")}
65879
65878
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
65880
65879
  return true;
65881
65880
  }
65881
+ if (target.flags & 2097152 /* Intersection */) {
65882
+ return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
65883
+ }
65882
65884
  if (source.flags & 128 /* StringLiteral */) {
65883
65885
  const value = source.value;
65884
65886
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -65889,7 +65891,7 @@ ${lanes.join("\n")}
65889
65891
  value,
65890
65892
  /*roundTripOnly*/
65891
65893
  false
65892
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
65894
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
65893
65895
  }
65894
65896
  if (source.flags & 134217728 /* TemplateLiteral */) {
65895
65897
  const texts = source.texts;
@@ -142533,7 +142535,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142533
142535
  const lineTextStart = lineTextStarts.get(i.toString());
142534
142536
  if (lineTextStart !== void 0) {
142535
142537
  if (isJsx) {
142536
- textChanges2.push.apply(textChanges2, toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx));
142538
+ textChanges2.push(...toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx));
142537
142539
  } else if (isCommenting) {
142538
142540
  textChanges2.push({
142539
142541
  newText: openComment,
@@ -142676,7 +142678,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142676
142678
  if (commentRange) {
142677
142679
  switch (commentRange.kind) {
142678
142680
  case 2 /* SingleLineCommentTrivia */:
142679
- textChanges2.push.apply(textChanges2, toggleLineComment(
142681
+ textChanges2.push(...toggleLineComment(
142680
142682
  fileName,
142681
142683
  { end: commentRange.end, pos: commentRange.pos + 1 },
142682
142684
  /*insertComment*/
@@ -142684,7 +142686,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142684
142686
  ));
142685
142687
  break;
142686
142688
  case 3 /* MultiLineCommentTrivia */:
142687
- textChanges2.push.apply(textChanges2, toggleMultilineComment(
142689
+ textChanges2.push(...toggleMultilineComment(
142688
142690
  fileName,
142689
142691
  { end: commentRange.end, pos: commentRange.pos + 1 },
142690
142692
  /*insertComment*/
@@ -169259,7 +169261,7 @@ ${options.prefix}` : "\n" : options.prefix
169259
169261
  rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */),
169260
169262
  rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */),
169261
169263
  rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169262
- rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */),
169264
+ rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */),
169263
169265
  rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169264
169266
  // insert space after '?' only when it is used in conditional operator
169265
169267
  rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
@@ -169330,6 +169332,8 @@ ${options.prefix}` : "\n" : options.prefix
169330
169332
  rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169331
169333
  rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169332
169334
  rule("NoSpaceAfterEqualInJsxAttribute", 64 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169335
+ rule("NoSpaceBeforeJsxNamespaceColon", 80 /* Identifier */, 59 /* ColonToken */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */),
169336
+ rule("NoSpaceAfterJsxNamespaceColon", 59 /* ColonToken */, 80 /* Identifier */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */),
169333
169337
  // TypeScript-specific rules
169334
169338
  // Use of module as a function call. e.g.: import m2 = module("m2");
169335
169339
  rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
@@ -169759,11 +169763,17 @@ ${options.prefix}` : "\n" : options.prefix
169759
169763
  return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */;
169760
169764
  }
169761
169765
  function isNextTokenParentJsxAttribute(context) {
169762
- return context.nextTokenParent.kind === 291 /* JsxAttribute */;
169766
+ return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */;
169763
169767
  }
169764
169768
  function isJsxAttributeContext(context) {
169765
169769
  return context.contextNode.kind === 291 /* JsxAttribute */;
169766
169770
  }
169771
+ function isNextTokenParentNotJsxNamespacedName(context) {
169772
+ return context.nextTokenParent.kind !== 295 /* JsxNamespacedName */;
169773
+ }
169774
+ function isNextTokenParentJsxNamespacedName(context) {
169775
+ return context.nextTokenParent.kind === 295 /* JsxNamespacedName */;
169776
+ }
169767
169777
  function isJsxSelfClosingElementContext(context) {
169768
169778
  return context.contextNode.kind === 285 /* JsxSelfClosingElement */;
169769
169779
  }
@@ -171658,7 +171668,7 @@ ${options.prefix}` : "\n" : options.prefix
171658
171668
  deprecationMessage += `'${name}' `;
171659
171669
  deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated";
171660
171670
  deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : ".";
171661
- deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : "";
171671
+ deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : "";
171662
171672
  return deprecationMessage;
171663
171673
  }
171664
171674
  function createErrorDeprecation(name, errorAfter, since, message) {
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-dev.20230810`;
38
+ version = `${versionMajorMinor}.0-dev.20230812`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -17847,8 +17847,8 @@ ${lanes.join("\n")}
17847
17847
  Object.assign(objectAllocator, alloc);
17848
17848
  forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator));
17849
17849
  }
17850
- function formatStringFromArgs(text, args, baseIndex = 0) {
17851
- return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex]));
17850
+ function formatStringFromArgs(text, args) {
17851
+ return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index]));
17852
17852
  }
17853
17853
  function setLocalizedDiagnosticMessages(messages) {
17854
17854
  localizedDiagnosticMessages = messages;
@@ -17861,7 +17861,7 @@ ${lanes.join("\n")}
17861
17861
  function getLocaleSpecificMessage(message) {
17862
17862
  return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message;
17863
17863
  }
17864
- function createDetachedDiagnostic(fileName, start, length2, message) {
17864
+ function createDetachedDiagnostic(fileName, start, length2, message, ...args) {
17865
17865
  assertDiagnosticLocation(
17866
17866
  /*file*/
17867
17867
  void 0,
@@ -17869,8 +17869,8 @@ ${lanes.join("\n")}
17869
17869
  length2
17870
17870
  );
17871
17871
  let text = getLocaleSpecificMessage(message);
17872
- if (arguments.length > 4) {
17873
- text = formatStringFromArgs(text, arguments, 4);
17872
+ if (some(args)) {
17873
+ text = formatStringFromArgs(text, args);
17874
17874
  }
17875
17875
  return {
17876
17876
  file: void 0,
@@ -17922,11 +17922,11 @@ ${lanes.join("\n")}
17922
17922
  }
17923
17923
  return diagnosticsWithLocation;
17924
17924
  }
17925
- function createFileDiagnostic(file, start, length2, message) {
17925
+ function createFileDiagnostic(file, start, length2, message, ...args) {
17926
17926
  assertDiagnosticLocation(file, start, length2);
17927
17927
  let text = getLocaleSpecificMessage(message);
17928
- if (arguments.length > 4) {
17929
- text = formatStringFromArgs(text, arguments, 4);
17928
+ if (some(args)) {
17929
+ text = formatStringFromArgs(text, args);
17930
17930
  }
17931
17931
  return {
17932
17932
  file,
@@ -17939,17 +17939,17 @@ ${lanes.join("\n")}
17939
17939
  reportsDeprecated: message.reportsDeprecated
17940
17940
  };
17941
17941
  }
17942
- function formatMessage(_dummy, message) {
17942
+ function formatMessage(message, ...args) {
17943
17943
  let text = getLocaleSpecificMessage(message);
17944
- if (arguments.length > 2) {
17945
- text = formatStringFromArgs(text, arguments, 2);
17944
+ if (some(args)) {
17945
+ text = formatStringFromArgs(text, args);
17946
17946
  }
17947
17947
  return text;
17948
17948
  }
17949
- function createCompilerDiagnostic(message) {
17949
+ function createCompilerDiagnostic(message, ...args) {
17950
17950
  let text = getLocaleSpecificMessage(message);
17951
- if (arguments.length > 1) {
17952
- text = formatStringFromArgs(text, arguments, 1);
17951
+ if (some(args)) {
17952
+ text = formatStringFromArgs(text, args);
17953
17953
  }
17954
17954
  return {
17955
17955
  file: void 0,
@@ -17973,10 +17973,10 @@ ${lanes.join("\n")}
17973
17973
  relatedInformation
17974
17974
  };
17975
17975
  }
17976
- function chainDiagnosticMessages(details, message) {
17976
+ function chainDiagnosticMessages(details, message, ...args) {
17977
17977
  let text = getLocaleSpecificMessage(message);
17978
- if (arguments.length > 2) {
17979
- text = formatStringFromArgs(text, arguments, 2);
17978
+ if (some(args)) {
17979
+ text = formatStringFromArgs(text, args);
17980
17980
  }
17981
17981
  return {
17982
17982
  messageText: text,
@@ -36161,9 +36161,8 @@ ${lanes.join("\n")}
36161
36161
  }
36162
36162
  return { buildOptions, watchOptions, projects, errors };
36163
36163
  }
36164
- function getDiagnosticText(_message, ..._args) {
36165
- const diagnostic = createCompilerDiagnostic.apply(void 0, arguments);
36166
- return diagnostic.messageText;
36164
+ function getDiagnosticText(message, ...args) {
36165
+ return cast(createCompilerDiagnostic(message, ...args).messageText, isString);
36167
36166
  }
36168
36167
  function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {
36169
36168
  const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName));
@@ -39068,8 +39067,8 @@ ${lanes.join("\n")}
39068
39067
  });
39069
39068
 
39070
39069
  // src/compiler/moduleNameResolver.ts
39071
- function trace(host) {
39072
- host.trace(formatMessage.apply(void 0, arguments));
39070
+ function trace(host, message, ...args) {
39071
+ host.trace(formatMessage(message, ...args));
39073
39072
  }
39074
39073
  function isTraceEnabled(compilerOptions, host) {
39075
39074
  return !!compilerOptions.traceResolution && host.trace !== void 0;
@@ -59008,7 +59007,10 @@ ${lanes.join("\n")}
59008
59007
  }
59009
59008
  }
59010
59009
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
59011
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
59010
+ const templates = filter(
59011
+ types,
59012
+ (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
59013
+ );
59012
59014
  if (templates.length) {
59013
59015
  let i = types.length;
59014
59016
  while (i > 0) {
@@ -59413,15 +59415,19 @@ ${lanes.join("\n")}
59413
59415
  function getConstituentCountOfTypes(types) {
59414
59416
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
59415
59417
  }
59416
- function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
59417
- return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
59418
+ function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
59419
+ if (types.length !== 2) {
59420
+ return false;
59421
+ }
59422
+ const [t1, t2] = types;
59423
+ return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
59418
59424
  }
59419
59425
  function getTypeFromIntersectionTypeNode(node) {
59420
59426
  const links = getNodeLinks(node);
59421
59427
  if (!links.resolvedType) {
59422
59428
  const aliasSymbol = getAliasSymbolForTypeNode(node);
59423
59429
  const types = map(node.types, getTypeFromTypeNode);
59424
- const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
59430
+ const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
59425
59431
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
59426
59432
  }
59427
59433
  return links.resolvedType;
@@ -61850,14 +61856,7 @@ ${lanes.join("\n")}
61850
61856
  const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName);
61851
61857
  const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
61852
61858
  const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
61853
- invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
61854
- /*dummy*/
61855
- void 0,
61856
- diagnostic,
61857
- tagNameText,
61858
- childrenPropName,
61859
- typeToString(childrenTargetType)
61860
- ) };
61859
+ invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };
61861
61860
  }
61862
61861
  return invalidTextDiagnostic;
61863
61862
  }
@@ -65879,6 +65878,9 @@ ${lanes.join("\n")}
65879
65878
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
65880
65879
  return true;
65881
65880
  }
65881
+ if (target.flags & 2097152 /* Intersection */) {
65882
+ return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
65883
+ }
65882
65884
  if (source.flags & 128 /* StringLiteral */) {
65883
65885
  const value = source.value;
65884
65886
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -65889,7 +65891,7 @@ ${lanes.join("\n")}
65889
65891
  value,
65890
65892
  /*roundTripOnly*/
65891
65893
  false
65892
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
65894
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
65893
65895
  }
65894
65896
  if (source.flags & 134217728 /* TemplateLiteral */) {
65895
65897
  const texts = source.texts;
@@ -142548,7 +142550,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142548
142550
  const lineTextStart = lineTextStarts.get(i.toString());
142549
142551
  if (lineTextStart !== void 0) {
142550
142552
  if (isJsx) {
142551
- textChanges2.push.apply(textChanges2, toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx));
142553
+ textChanges2.push(...toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx));
142552
142554
  } else if (isCommenting) {
142553
142555
  textChanges2.push({
142554
142556
  newText: openComment,
@@ -142691,7 +142693,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142691
142693
  if (commentRange) {
142692
142694
  switch (commentRange.kind) {
142693
142695
  case 2 /* SingleLineCommentTrivia */:
142694
- textChanges2.push.apply(textChanges2, toggleLineComment(
142696
+ textChanges2.push(...toggleLineComment(
142695
142697
  fileName,
142696
142698
  { end: commentRange.end, pos: commentRange.pos + 1 },
142697
142699
  /*insertComment*/
@@ -142699,7 +142701,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142699
142701
  ));
142700
142702
  break;
142701
142703
  case 3 /* MultiLineCommentTrivia */:
142702
- textChanges2.push.apply(textChanges2, toggleMultilineComment(
142704
+ textChanges2.push(...toggleMultilineComment(
142703
142705
  fileName,
142704
142706
  { end: commentRange.end, pos: commentRange.pos + 1 },
142705
142707
  /*insertComment*/
@@ -169274,7 +169276,7 @@ ${options.prefix}` : "\n" : options.prefix
169274
169276
  rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */),
169275
169277
  rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */),
169276
169278
  rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169277
- rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */),
169279
+ rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */),
169278
169280
  rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169279
169281
  // insert space after '?' only when it is used in conditional operator
169280
169282
  rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
@@ -169345,6 +169347,8 @@ ${options.prefix}` : "\n" : options.prefix
169345
169347
  rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169346
169348
  rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169347
169349
  rule("NoSpaceAfterEqualInJsxAttribute", 64 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169350
+ rule("NoSpaceBeforeJsxNamespaceColon", 80 /* Identifier */, 59 /* ColonToken */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */),
169351
+ rule("NoSpaceAfterJsxNamespaceColon", 59 /* ColonToken */, 80 /* Identifier */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */),
169348
169352
  // TypeScript-specific rules
169349
169353
  // Use of module as a function call. e.g.: import m2 = module("m2");
169350
169354
  rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
@@ -169774,11 +169778,17 @@ ${options.prefix}` : "\n" : options.prefix
169774
169778
  return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */;
169775
169779
  }
169776
169780
  function isNextTokenParentJsxAttribute(context) {
169777
- return context.nextTokenParent.kind === 291 /* JsxAttribute */;
169781
+ return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */;
169778
169782
  }
169779
169783
  function isJsxAttributeContext(context) {
169780
169784
  return context.contextNode.kind === 291 /* JsxAttribute */;
169781
169785
  }
169786
+ function isNextTokenParentNotJsxNamespacedName(context) {
169787
+ return context.nextTokenParent.kind !== 295 /* JsxNamespacedName */;
169788
+ }
169789
+ function isNextTokenParentJsxNamespacedName(context) {
169790
+ return context.nextTokenParent.kind === 295 /* JsxNamespacedName */;
169791
+ }
169782
169792
  function isJsxSelfClosingElementContext(context) {
169783
169793
  return context.contextNode.kind === 285 /* JsxSelfClosingElement */;
169784
169794
  }
@@ -171673,7 +171683,7 @@ ${options.prefix}` : "\n" : options.prefix
171673
171683
  deprecationMessage += `'${name}' `;
171674
171684
  deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated";
171675
171685
  deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : ".";
171676
- deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : "";
171686
+ deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : "";
171677
171687
  return deprecationMessage;
171678
171688
  }
171679
171689
  function createErrorDeprecation(name, errorAfter, since, message) {
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.3";
57
- var version = `${versionMajorMinor}.0-dev.20230810`;
57
+ var version = `${versionMajorMinor}.0-dev.20230812`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -11154,14 +11154,14 @@ var objectAllocator = {
11154
11154
  getSignatureConstructor: () => Signature2,
11155
11155
  getSourceMapSourceConstructor: () => SourceMapSource
11156
11156
  };
11157
- function formatStringFromArgs(text, args, baseIndex = 0) {
11158
- return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex]));
11157
+ function formatStringFromArgs(text, args) {
11158
+ return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index]));
11159
11159
  }
11160
11160
  var localizedDiagnosticMessages;
11161
11161
  function getLocaleSpecificMessage(message) {
11162
11162
  return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message;
11163
11163
  }
11164
- function createDetachedDiagnostic(fileName, start, length2, message) {
11164
+ function createDetachedDiagnostic(fileName, start, length2, message, ...args) {
11165
11165
  assertDiagnosticLocation(
11166
11166
  /*file*/
11167
11167
  void 0,
@@ -11169,8 +11169,8 @@ function createDetachedDiagnostic(fileName, start, length2, message) {
11169
11169
  length2
11170
11170
  );
11171
11171
  let text = getLocaleSpecificMessage(message);
11172
- if (arguments.length > 4) {
11173
- text = formatStringFromArgs(text, arguments, 4);
11172
+ if (some(args)) {
11173
+ text = formatStringFromArgs(text, args);
11174
11174
  }
11175
11175
  return {
11176
11176
  file: void 0,
@@ -11222,11 +11222,11 @@ function attachFileToDiagnostics(diagnostics, file) {
11222
11222
  }
11223
11223
  return diagnosticsWithLocation;
11224
11224
  }
11225
- function createFileDiagnostic(file, start, length2, message) {
11225
+ function createFileDiagnostic(file, start, length2, message, ...args) {
11226
11226
  assertDiagnosticLocation(file, start, length2);
11227
11227
  let text = getLocaleSpecificMessage(message);
11228
- if (arguments.length > 4) {
11229
- text = formatStringFromArgs(text, arguments, 4);
11228
+ if (some(args)) {
11229
+ text = formatStringFromArgs(text, args);
11230
11230
  }
11231
11231
  return {
11232
11232
  file,
@@ -11239,17 +11239,17 @@ function createFileDiagnostic(file, start, length2, message) {
11239
11239
  reportsDeprecated: message.reportsDeprecated
11240
11240
  };
11241
11241
  }
11242
- function formatMessage(_dummy, message) {
11242
+ function formatMessage(message, ...args) {
11243
11243
  let text = getLocaleSpecificMessage(message);
11244
- if (arguments.length > 2) {
11245
- text = formatStringFromArgs(text, arguments, 2);
11244
+ if (some(args)) {
11245
+ text = formatStringFromArgs(text, args);
11246
11246
  }
11247
11247
  return text;
11248
11248
  }
11249
- function createCompilerDiagnostic(message) {
11249
+ function createCompilerDiagnostic(message, ...args) {
11250
11250
  let text = getLocaleSpecificMessage(message);
11251
- if (arguments.length > 1) {
11252
- text = formatStringFromArgs(text, arguments, 1);
11251
+ if (some(args)) {
11252
+ text = formatStringFromArgs(text, args);
11253
11253
  }
11254
11254
  return {
11255
11255
  file: void 0,
@@ -27282,8 +27282,8 @@ function specToDiagnostic(spec, disallowTrailingRecursion) {
27282
27282
  }
27283
27283
 
27284
27284
  // src/compiler/moduleNameResolver.ts
27285
- function trace(host) {
27286
- host.trace(formatMessage.apply(void 0, arguments));
27285
+ function trace(host, message, ...args) {
27286
+ host.trace(formatMessage(message, ...args));
27287
27287
  }
27288
27288
  function isTraceEnabled(compilerOptions, host) {
27289
27289
  return !!compilerOptions.traceResolution && host.trace !== void 0;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.3.0-dev.20230810",
5
+ "version": "5.3.0-dev.20230812",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "20.1.0",
114
114
  "npm": "8.19.4"
115
115
  },
116
- "gitHead": "cd391b066b49cead0d1b1ec089ab4f4de59a16d1"
116
+ "gitHead": "634d3a1db5c69c1425119a74045790a4d1dc3046"
117
117
  }