typescript 5.3.0-dev.20230811 → 5.3.0-dev.20230813

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.20230811`;
21
+ var version = `${versionMajorMinor}.0-dev.20230813`;
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;
@@ -59385,14 +59384,7 @@ function createTypeChecker(host) {
59385
59384
  const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName);
59386
59385
  const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
59387
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;
59388
- invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
59389
- /*dummy*/
59390
- void 0,
59391
- diagnostic,
59392
- tagNameText,
59393
- childrenPropName,
59394
- typeToString(childrenTargetType)
59395
- ) };
59387
+ invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };
59396
59388
  }
59397
59389
  return invalidTextDiagnostic;
59398
59390
  }
@@ -125075,12 +125067,7 @@ function printEasyHelp(sys2, simpleOptions) {
125075
125067
  false,
125076
125068
  /*beforeOptionsDescription*/
125077
125069
  void 0,
125078
- formatMessage(
125079
- /*dummy*/
125080
- void 0,
125081
- Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0,
125082
- "https://aka.ms/tsc"
125083
- )
125070
+ formatMessage(Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc")
125084
125071
  )
125085
125072
  ];
125086
125073
  for (const line of output) {
@@ -125104,12 +125091,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
125104
125091
  true,
125105
125092
  /*beforeOptionsDescription*/
125106
125093
  void 0,
125107
- formatMessage(
125108
- /*dummy*/
125109
- void 0,
125110
- Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0,
125111
- "https://aka.ms/tsc"
125112
- )
125094
+ formatMessage(Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc")
125113
125095
  )];
125114
125096
  output = [...output, ...generateSectionOptionsOutput(
125115
125097
  sys2,
@@ -125125,12 +125107,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
125125
125107
  buildOptions,
125126
125108
  /*subCategory*/
125127
125109
  false,
125128
- formatMessage(
125129
- /*dummy*/
125130
- void 0,
125131
- 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,
125132
- "https://aka.ms/tsc-composite-builds"
125133
- )
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")
125134
125111
  )];
125135
125112
  for (const line of output) {
125136
125113
  sys2.write(line);
@@ -125144,12 +125121,7 @@ function printBuildHelp(sys2, buildOptions) {
125144
125121
  buildOptions,
125145
125122
  /*subCategory*/
125146
125123
  false,
125147
- formatMessage(
125148
- /*dummy*/
125149
- void 0,
125150
- 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,
125151
- "https://aka.ms/tsc-composite-builds"
125152
- )
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")
125153
125125
  )];
125154
125126
  for (const line of output) {
125155
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.20230811`;
2334
+ var version = `${versionMajorMinor}.0-dev.20230813`;
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;
@@ -64094,14 +64093,7 @@ function createTypeChecker(host) {
64094
64093
  const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName);
64095
64094
  const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
64096
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;
64097
- invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
64098
- /*dummy*/
64099
- void 0,
64100
- diagnostic,
64101
- tagNameText,
64102
- childrenPropName,
64103
- typeToString(childrenTargetType)
64104
- ) };
64096
+ invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };
64105
64097
  }
64106
64098
  return invalidTextDiagnostic;
64107
64099
  }
@@ -144602,7 +144594,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
144602
144594
  const lineTextStart = lineTextStarts.get(i.toString());
144603
144595
  if (lineTextStart !== void 0) {
144604
144596
  if (isJsx) {
144605
- 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));
144606
144598
  } else if (isCommenting) {
144607
144599
  textChanges2.push({
144608
144600
  newText: openComment,
@@ -144745,7 +144737,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
144745
144737
  if (commentRange) {
144746
144738
  switch (commentRange.kind) {
144747
144739
  case 2 /* SingleLineCommentTrivia */:
144748
- textChanges2.push.apply(textChanges2, toggleLineComment(
144740
+ textChanges2.push(...toggleLineComment(
144749
144741
  fileName,
144750
144742
  { end: commentRange.end, pos: commentRange.pos + 1 },
144751
144743
  /*insertComment*/
@@ -144753,7 +144745,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
144753
144745
  ));
144754
144746
  break;
144755
144747
  case 3 /* MultiLineCommentTrivia */:
144756
- textChanges2.push.apply(textChanges2, toggleMultilineComment(
144748
+ textChanges2.push(...toggleMultilineComment(
144757
144749
  fileName,
144758
144750
  { end: commentRange.end, pos: commentRange.pos + 1 },
144759
144751
  /*insertComment*/
@@ -169801,7 +169793,7 @@ function getAllRules() {
169801
169793
  rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */),
169802
169794
  rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */),
169803
169795
  rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169804
- rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */),
169796
+ rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */),
169805
169797
  rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169806
169798
  // insert space after '?' only when it is used in conditional operator
169807
169799
  rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
@@ -169872,6 +169864,8 @@ function getAllRules() {
169872
169864
  rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169873
169865
  rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169874
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 */),
169875
169869
  // TypeScript-specific rules
169876
169870
  // Use of module as a function call. e.g.: import m2 = module("m2");
169877
169871
  rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
@@ -170301,11 +170295,17 @@ function isJsxExpressionContext(context) {
170301
170295
  return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */;
170302
170296
  }
170303
170297
  function isNextTokenParentJsxAttribute(context) {
170304
- return context.nextTokenParent.kind === 291 /* JsxAttribute */;
170298
+ return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */;
170305
170299
  }
170306
170300
  function isJsxAttributeContext(context) {
170307
170301
  return context.contextNode.kind === 291 /* JsxAttribute */;
170308
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
+ }
170309
170309
  function isJsxSelfClosingElementContext(context) {
170310
170310
  return context.contextNode.kind === 285 /* JsxSelfClosingElement */;
170311
170311
  }
@@ -174391,7 +174391,7 @@ function formatDeprecationMessage(name, error2, errorAfter, since, message) {
174391
174391
  deprecationMessage += `'${name}' `;
174392
174392
  deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated";
174393
174393
  deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : ".";
174394
- deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : "";
174394
+ deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : "";
174395
174395
  return deprecationMessage;
174396
174396
  }
174397
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.20230811`;
38
+ version = `${versionMajorMinor}.0-dev.20230813`;
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;
@@ -61857,14 +61856,7 @@ ${lanes.join("\n")}
61857
61856
  const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName);
61858
61857
  const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
61859
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;
61860
- invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
61861
- /*dummy*/
61862
- void 0,
61863
- diagnostic,
61864
- tagNameText,
61865
- childrenPropName,
61866
- typeToString(childrenTargetType)
61867
- ) };
61859
+ invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };
61868
61860
  }
61869
61861
  return invalidTextDiagnostic;
61870
61862
  }
@@ -142543,7 +142535,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142543
142535
  const lineTextStart = lineTextStarts.get(i.toString());
142544
142536
  if (lineTextStart !== void 0) {
142545
142537
  if (isJsx) {
142546
- 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));
142547
142539
  } else if (isCommenting) {
142548
142540
  textChanges2.push({
142549
142541
  newText: openComment,
@@ -142686,7 +142678,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142686
142678
  if (commentRange) {
142687
142679
  switch (commentRange.kind) {
142688
142680
  case 2 /* SingleLineCommentTrivia */:
142689
- textChanges2.push.apply(textChanges2, toggleLineComment(
142681
+ textChanges2.push(...toggleLineComment(
142690
142682
  fileName,
142691
142683
  { end: commentRange.end, pos: commentRange.pos + 1 },
142692
142684
  /*insertComment*/
@@ -142694,7 +142686,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142694
142686
  ));
142695
142687
  break;
142696
142688
  case 3 /* MultiLineCommentTrivia */:
142697
- textChanges2.push.apply(textChanges2, toggleMultilineComment(
142689
+ textChanges2.push(...toggleMultilineComment(
142698
142690
  fileName,
142699
142691
  { end: commentRange.end, pos: commentRange.pos + 1 },
142700
142692
  /*insertComment*/
@@ -169269,7 +169261,7 @@ ${options.prefix}` : "\n" : options.prefix
169269
169261
  rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */),
169270
169262
  rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */),
169271
169263
  rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169272
- rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */),
169264
+ rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */),
169273
169265
  rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169274
169266
  // insert space after '?' only when it is used in conditional operator
169275
169267
  rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
@@ -169340,6 +169332,8 @@ ${options.prefix}` : "\n" : options.prefix
169340
169332
  rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169341
169333
  rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169342
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 */),
169343
169337
  // TypeScript-specific rules
169344
169338
  // Use of module as a function call. e.g.: import m2 = module("m2");
169345
169339
  rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
@@ -169769,11 +169763,17 @@ ${options.prefix}` : "\n" : options.prefix
169769
169763
  return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */;
169770
169764
  }
169771
169765
  function isNextTokenParentJsxAttribute(context) {
169772
- return context.nextTokenParent.kind === 291 /* JsxAttribute */;
169766
+ return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */;
169773
169767
  }
169774
169768
  function isJsxAttributeContext(context) {
169775
169769
  return context.contextNode.kind === 291 /* JsxAttribute */;
169776
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
+ }
169777
169777
  function isJsxSelfClosingElementContext(context) {
169778
169778
  return context.contextNode.kind === 285 /* JsxSelfClosingElement */;
169779
169779
  }
@@ -171668,7 +171668,7 @@ ${options.prefix}` : "\n" : options.prefix
171668
171668
  deprecationMessage += `'${name}' `;
171669
171669
  deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated";
171670
171670
  deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : ".";
171671
- deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : "";
171671
+ deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : "";
171672
171672
  return deprecationMessage;
171673
171673
  }
171674
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.20230811`;
38
+ version = `${versionMajorMinor}.0-dev.20230813`;
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;
@@ -61857,14 +61856,7 @@ ${lanes.join("\n")}
61857
61856
  const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName);
61858
61857
  const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
61859
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;
61860
- invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
61861
- /*dummy*/
61862
- void 0,
61863
- diagnostic,
61864
- tagNameText,
61865
- childrenPropName,
61866
- typeToString(childrenTargetType)
61867
- ) };
61859
+ invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };
61868
61860
  }
61869
61861
  return invalidTextDiagnostic;
61870
61862
  }
@@ -142558,7 +142550,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142558
142550
  const lineTextStart = lineTextStarts.get(i.toString());
142559
142551
  if (lineTextStart !== void 0) {
142560
142552
  if (isJsx) {
142561
- 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));
142562
142554
  } else if (isCommenting) {
142563
142555
  textChanges2.push({
142564
142556
  newText: openComment,
@@ -142701,7 +142693,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142701
142693
  if (commentRange) {
142702
142694
  switch (commentRange.kind) {
142703
142695
  case 2 /* SingleLineCommentTrivia */:
142704
- textChanges2.push.apply(textChanges2, toggleLineComment(
142696
+ textChanges2.push(...toggleLineComment(
142705
142697
  fileName,
142706
142698
  { end: commentRange.end, pos: commentRange.pos + 1 },
142707
142699
  /*insertComment*/
@@ -142709,7 +142701,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142709
142701
  ));
142710
142702
  break;
142711
142703
  case 3 /* MultiLineCommentTrivia */:
142712
- textChanges2.push.apply(textChanges2, toggleMultilineComment(
142704
+ textChanges2.push(...toggleMultilineComment(
142713
142705
  fileName,
142714
142706
  { end: commentRange.end, pos: commentRange.pos + 1 },
142715
142707
  /*insertComment*/
@@ -169284,7 +169276,7 @@ ${options.prefix}` : "\n" : options.prefix
169284
169276
  rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */),
169285
169277
  rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */),
169286
169278
  rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169287
- rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */),
169279
+ rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */),
169288
169280
  rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),
169289
169281
  // insert space after '?' only when it is used in conditional operator
169290
169282
  rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
@@ -169355,6 +169347,8 @@ ${options.prefix}` : "\n" : options.prefix
169355
169347
  rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169356
169348
  rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169357
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 */),
169358
169352
  // TypeScript-specific rules
169359
169353
  // Use of module as a function call. e.g.: import m2 = module("m2");
169360
169354
  rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
@@ -169784,11 +169778,17 @@ ${options.prefix}` : "\n" : options.prefix
169784
169778
  return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */;
169785
169779
  }
169786
169780
  function isNextTokenParentJsxAttribute(context) {
169787
- return context.nextTokenParent.kind === 291 /* JsxAttribute */;
169781
+ return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */;
169788
169782
  }
169789
169783
  function isJsxAttributeContext(context) {
169790
169784
  return context.contextNode.kind === 291 /* JsxAttribute */;
169791
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
+ }
169792
169792
  function isJsxSelfClosingElementContext(context) {
169793
169793
  return context.contextNode.kind === 285 /* JsxSelfClosingElement */;
169794
169794
  }
@@ -171683,7 +171683,7 @@ ${options.prefix}` : "\n" : options.prefix
171683
171683
  deprecationMessage += `'${name}' `;
171684
171684
  deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated";
171685
171685
  deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : ".";
171686
- deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : "";
171686
+ deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : "";
171687
171687
  return deprecationMessage;
171688
171688
  }
171689
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.20230811`;
57
+ var version = `${versionMajorMinor}.0-dev.20230813`;
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.20230811",
5
+ "version": "5.3.0-dev.20230813",
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": "28cd1fbd13b8d09259e7a7086aa258c0221c38ac"
116
+ "gitHead": "634d3a1db5c69c1425119a74045790a4d1dc3046"
117
117
  }