typescript 5.4.0-dev.20231205 → 5.4.0-dev.20231206

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.4";
21
- var version = `${versionMajorMinor}.0-dev.20231205`;
21
+ var version = `${versionMajorMinor}.0-dev.20231206`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -17526,6 +17526,10 @@ function hasResolutionModeOverride(node) {
17526
17526
  }
17527
17527
  return !!getResolutionModeOverride(node.attributes);
17528
17528
  }
17529
+ var stringReplace = String.prototype.replace;
17530
+ function replaceFirstStar(s, replacement) {
17531
+ return stringReplace.call(s, "*", replacement);
17532
+ }
17529
17533
 
17530
17534
  // src/compiler/factory/baseNodeFactory.ts
17531
17535
  function createBaseNodeFactory() {
@@ -39156,7 +39160,7 @@ function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, p
39156
39160
  trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
39157
39161
  }
39158
39162
  const resolved = forEach(paths[matchedPatternText], (subst) => {
39159
- const path = matchedStar ? subst.replace("*", matchedStar) : subst;
39163
+ const path = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
39160
39164
  const candidate = normalizePath(combinePaths(baseDirectory, path));
39161
39165
  if (state.traceEnabled) {
39162
39166
  trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
@@ -42793,7 +42797,7 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos
42793
42797
  if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {
42794
42798
  const matchedStar = value.substring(prefix.length, value.length - suffix.length);
42795
42799
  if (!pathIsRelative(matchedStar)) {
42796
- return key.replace("*", matchedStar);
42800
+ return replaceFirstStar(key, matchedStar);
42797
42801
  }
42798
42802
  }
42799
42803
  }
@@ -42841,11 +42845,11 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
42841
42845
  const trailingSlice = pathOrPattern.slice(starPos + 1);
42842
42846
  if (startsWith(targetFilePath, leadingSlice) && endsWith(targetFilePath, trailingSlice)) {
42843
42847
  const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length);
42844
- return { moduleFileToTry: packageName.replace("*", starReplacement) };
42848
+ return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
42845
42849
  }
42846
42850
  if (extensionSwappedTarget && startsWith(extensionSwappedTarget, leadingSlice) && endsWith(extensionSwappedTarget, trailingSlice)) {
42847
42851
  const starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length);
42848
- return { moduleFileToTry: packageName.replace("*", starReplacement) };
42852
+ return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
42849
42853
  }
42850
42854
  break;
42851
42855
  }
@@ -73148,9 +73152,16 @@ function createTypeChecker(host) {
73148
73152
  const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
73149
73153
  for (let i = 0; i < len; i++) {
73150
73154
  const parameter = signature.parameters[i];
73151
- if (!getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
73152
- const contextualParameterType = tryGetTypeAtPosition(context, i);
73153
- assignParameterType(parameter, contextualParameterType);
73155
+ const declaration = parameter.valueDeclaration;
73156
+ if (!getEffectiveTypeAnnotationNode(declaration)) {
73157
+ let type = tryGetTypeAtPosition(context, i);
73158
+ if (type && declaration.initializer) {
73159
+ let initializerType = checkDeclarationInitializer(declaration, 0 /* Normal */);
73160
+ if (!isTypeAssignableTo(initializerType, type) && isTypeAssignableTo(type, initializerType = widenTypeInferredFromInitializer(declaration, initializerType))) {
73161
+ type = initializerType;
73162
+ }
73163
+ }
73164
+ assignParameterType(parameter, type);
73154
73165
  }
73155
73166
  }
73156
73167
  if (signatureHasRestParameter(signature)) {
package/lib/tsserver.js CHANGED
@@ -2052,6 +2052,7 @@ __export(server_exports, {
2052
2052
  removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator,
2053
2053
  repeatString: () => repeatString,
2054
2054
  replaceElement: () => replaceElement,
2055
+ replaceFirstStar: () => replaceFirstStar,
2055
2056
  resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson,
2056
2057
  resolveConfigFileProjectName: () => resolveConfigFileProjectName,
2057
2058
  resolveJSModule: () => resolveJSModule,
@@ -2332,7 +2333,7 @@ module.exports = __toCommonJS(server_exports);
2332
2333
 
2333
2334
  // src/compiler/corePublic.ts
2334
2335
  var versionMajorMinor = "5.4";
2335
- var version = `${versionMajorMinor}.0-dev.20231205`;
2336
+ var version = `${versionMajorMinor}.0-dev.20231206`;
2336
2337
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2337
2338
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2338
2339
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -21746,6 +21747,10 @@ function hasResolutionModeOverride(node) {
21746
21747
  }
21747
21748
  return !!getResolutionModeOverride(node.attributes);
21748
21749
  }
21750
+ var stringReplace = String.prototype.replace;
21751
+ function replaceFirstStar(s, replacement) {
21752
+ return stringReplace.call(s, "*", replacement);
21753
+ }
21749
21754
 
21750
21755
  // src/compiler/factory/baseNodeFactory.ts
21751
21756
  function createBaseNodeFactory() {
@@ -43000,7 +43005,7 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) {
43000
43005
  /*excludes*/
43001
43006
  void 0,
43002
43007
  [
43003
- isDeclarationFileName(target) ? target.replace("*", "**/*") : changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))
43008
+ isDeclarationFileName(target) ? replaceFirstStar(target, "**/*") : changeAnyExtension(replaceFirstStar(target, "**/*"), getDeclarationEmitExtensionForPath(target))
43004
43009
  ]
43005
43010
  ).forEach((entry) => {
43006
43011
  entrypoints = appendIfUnique(entrypoints, {
@@ -43820,7 +43825,7 @@ function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, p
43820
43825
  trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
43821
43826
  }
43822
43827
  const resolved = forEach(paths[matchedPatternText], (subst) => {
43823
- const path = matchedStar ? subst.replace("*", matchedStar) : subst;
43828
+ const path = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
43824
43829
  const candidate = normalizePath(combinePaths(baseDirectory, path));
43825
43830
  if (state.traceEnabled) {
43826
43831
  trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
@@ -47520,7 +47525,7 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos
47520
47525
  if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {
47521
47526
  const matchedStar = value.substring(prefix.length, value.length - suffix.length);
47522
47527
  if (!pathIsRelative(matchedStar)) {
47523
- return key.replace("*", matchedStar);
47528
+ return replaceFirstStar(key, matchedStar);
47524
47529
  }
47525
47530
  }
47526
47531
  }
@@ -47568,11 +47573,11 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
47568
47573
  const trailingSlice = pathOrPattern.slice(starPos + 1);
47569
47574
  if (startsWith(targetFilePath, leadingSlice) && endsWith(targetFilePath, trailingSlice)) {
47570
47575
  const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length);
47571
- return { moduleFileToTry: packageName.replace("*", starReplacement) };
47576
+ return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
47572
47577
  }
47573
47578
  if (extensionSwappedTarget && startsWith(extensionSwappedTarget, leadingSlice) && endsWith(extensionSwappedTarget, trailingSlice)) {
47574
47579
  const starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length);
47575
- return { moduleFileToTry: packageName.replace("*", starReplacement) };
47580
+ return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
47576
47581
  }
47577
47582
  break;
47578
47583
  }
@@ -77875,9 +77880,16 @@ function createTypeChecker(host) {
77875
77880
  const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
77876
77881
  for (let i = 0; i < len; i++) {
77877
77882
  const parameter = signature.parameters[i];
77878
- if (!getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
77879
- const contextualParameterType = tryGetTypeAtPosition(context, i);
77880
- assignParameterType(parameter, contextualParameterType);
77883
+ const declaration = parameter.valueDeclaration;
77884
+ if (!getEffectiveTypeAnnotationNode(declaration)) {
77885
+ let type = tryGetTypeAtPosition(context, i);
77886
+ if (type && declaration.initializer) {
77887
+ let initializerType = checkDeclarationInitializer(declaration, 0 /* Normal */);
77888
+ if (!isTypeAssignableTo(initializerType, type) && isTypeAssignableTo(type, initializerType = widenTypeInferredFromInitializer(declaration, initializerType))) {
77889
+ type = initializerType;
77890
+ }
77891
+ }
77892
+ assignParameterType(parameter, type);
77881
77893
  }
77882
77894
  }
77883
77895
  if (signatureHasRestParameter(signature)) {
@@ -133958,7 +133970,7 @@ function getContextualTypeFromParent(node, checker, contextFlags) {
133958
133970
  function quote(sourceFile, preferences, text) {
133959
133971
  const quotePreference = getQuotePreference(sourceFile, preferences);
133960
133972
  const quoted = JSON.stringify(text);
133961
- return quotePreference === 0 /* Single */ ? `'${stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"')}'` : quoted;
133973
+ return quotePreference === 0 /* Single */ ? `'${stripQuotes(quoted).replace(/'/g, () => "\\'").replace(/\\"/g, '"')}'` : quoted;
133962
133974
  }
133963
133975
  function isEqualityOperatorKind(kind) {
133964
133976
  switch (kind) {
@@ -175169,6 +175181,7 @@ __export(ts_exports2, {
175169
175181
  removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator,
175170
175182
  repeatString: () => repeatString,
175171
175183
  replaceElement: () => replaceElement,
175184
+ replaceFirstStar: () => replaceFirstStar,
175172
175185
  resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson,
175173
175186
  resolveConfigFileProjectName: () => resolveConfigFileProjectName,
175174
175187
  resolveJSModule: () => resolveJSModule,
@@ -189961,6 +189974,7 @@ start(initializeNodeSystem(), require("os").platform());
189961
189974
  removeTrailingDirectorySeparator,
189962
189975
  repeatString,
189963
189976
  replaceElement,
189977
+ replaceFirstStar,
189964
189978
  resolutionExtensionIsTSOrJson,
189965
189979
  resolveConfigFileProjectName,
189966
189980
  resolveJSModule,
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.4";
38
- version = `${versionMajorMinor}.0-dev.20231205`;
38
+ version = `${versionMajorMinor}.0-dev.20231206`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -18969,7 +18969,10 @@ ${lanes.join("\n")}
18969
18969
  }
18970
18970
  return !!getResolutionModeOverride(node.attributes);
18971
18971
  }
18972
- var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
18972
+ function replaceFirstStar(s, replacement) {
18973
+ return stringReplace.call(s, "*", replacement);
18974
+ }
18975
+ var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries, stringReplace;
18973
18976
  var init_utilities = __esm({
18974
18977
  "src/compiler/utilities.ts"() {
18975
18978
  "use strict";
@@ -19544,6 +19547,7 @@ ${lanes.join("\n")}
19544
19547
  files: emptyArray,
19545
19548
  directories: emptyArray
19546
19549
  };
19550
+ stringReplace = String.prototype.replace;
19547
19551
  }
19548
19552
  });
19549
19553
 
@@ -40840,7 +40844,7 @@ ${lanes.join("\n")}
40840
40844
  /*excludes*/
40841
40845
  void 0,
40842
40846
  [
40843
- isDeclarationFileName(target) ? target.replace("*", "**/*") : changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))
40847
+ isDeclarationFileName(target) ? replaceFirstStar(target, "**/*") : changeAnyExtension(replaceFirstStar(target, "**/*"), getDeclarationEmitExtensionForPath(target))
40844
40848
  ]
40845
40849
  ).forEach((entry) => {
40846
40850
  entrypoints = appendIfUnique(entrypoints, {
@@ -41660,7 +41664,7 @@ ${lanes.join("\n")}
41660
41664
  trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
41661
41665
  }
41662
41666
  const resolved = forEach(paths[matchedPatternText], (subst) => {
41663
- const path = matchedStar ? subst.replace("*", matchedStar) : subst;
41667
+ const path = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
41664
41668
  const candidate = normalizePath(combinePaths(baseDirectory, path));
41665
41669
  if (state.traceEnabled) {
41666
41670
  trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
@@ -45381,7 +45385,7 @@ ${lanes.join("\n")}
45381
45385
  if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {
45382
45386
  const matchedStar = value.substring(prefix.length, value.length - suffix.length);
45383
45387
  if (!pathIsRelative(matchedStar)) {
45384
- return key.replace("*", matchedStar);
45388
+ return replaceFirstStar(key, matchedStar);
45385
45389
  }
45386
45390
  }
45387
45391
  }
@@ -45429,11 +45433,11 @@ ${lanes.join("\n")}
45429
45433
  const trailingSlice = pathOrPattern.slice(starPos + 1);
45430
45434
  if (startsWith(targetFilePath, leadingSlice) && endsWith(targetFilePath, trailingSlice)) {
45431
45435
  const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length);
45432
- return { moduleFileToTry: packageName.replace("*", starReplacement) };
45436
+ return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
45433
45437
  }
45434
45438
  if (extensionSwappedTarget && startsWith(extensionSwappedTarget, leadingSlice) && endsWith(extensionSwappedTarget, trailingSlice)) {
45435
45439
  const starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length);
45436
- return { moduleFileToTry: packageName.replace("*", starReplacement) };
45440
+ return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
45437
45441
  }
45438
45442
  break;
45439
45443
  }
@@ -75638,9 +75642,16 @@ ${lanes.join("\n")}
75638
75642
  const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
75639
75643
  for (let i = 0; i < len; i++) {
75640
75644
  const parameter = signature.parameters[i];
75641
- if (!getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
75642
- const contextualParameterType = tryGetTypeAtPosition(context, i);
75643
- assignParameterType(parameter, contextualParameterType);
75645
+ const declaration = parameter.valueDeclaration;
75646
+ if (!getEffectiveTypeAnnotationNode(declaration)) {
75647
+ let type = tryGetTypeAtPosition(context, i);
75648
+ if (type && declaration.initializer) {
75649
+ let initializerType = checkDeclarationInitializer(declaration, 0 /* Normal */);
75650
+ if (!isTypeAssignableTo(initializerType, type) && isTypeAssignableTo(type, initializerType = widenTypeInferredFromInitializer(declaration, initializerType))) {
75651
+ type = initializerType;
75652
+ }
75653
+ }
75654
+ assignParameterType(parameter, type);
75644
75655
  }
75645
75656
  }
75646
75657
  if (signatureHasRestParameter(signature)) {
@@ -132219,7 +132230,7 @@ ${lanes.join("\n")}
132219
132230
  function quote(sourceFile, preferences, text) {
132220
132231
  const quotePreference = getQuotePreference(sourceFile, preferences);
132221
132232
  const quoted = JSON.stringify(text);
132222
- return quotePreference === 0 /* Single */ ? `'${stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"')}'` : quoted;
132233
+ return quotePreference === 0 /* Single */ ? `'${stripQuotes(quoted).replace(/'/g, () => "\\'").replace(/\\"/g, '"')}'` : quoted;
132223
132234
  }
132224
132235
  function isEqualityOperatorKind(kind) {
132225
132236
  switch (kind) {
@@ -186727,6 +186738,7 @@ ${e.message}`;
186727
186738
  removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator,
186728
186739
  repeatString: () => repeatString,
186729
186740
  replaceElement: () => replaceElement,
186741
+ replaceFirstStar: () => replaceFirstStar,
186730
186742
  resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson,
186731
186743
  resolveConfigFileProjectName: () => resolveConfigFileProjectName,
186732
186744
  resolveJSModule: () => resolveJSModule,
@@ -189140,6 +189152,7 @@ ${e.message}`;
189140
189152
  removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator,
189141
189153
  repeatString: () => repeatString,
189142
189154
  replaceElement: () => replaceElement,
189155
+ replaceFirstStar: () => replaceFirstStar,
189143
189156
  resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson,
189144
189157
  resolveConfigFileProjectName: () => resolveConfigFileProjectName,
189145
189158
  resolveJSModule: () => resolveJSModule,
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.4";
57
- var version = `${versionMajorMinor}.0-dev.20231205`;
57
+ var version = `${versionMajorMinor}.0-dev.20231206`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -11744,6 +11744,10 @@ function getEscapedTextOfJsxNamespacedName(node) {
11744
11744
  function getTextOfJsxNamespacedName(node) {
11745
11745
  return `${idText(node.namespace)}:${idText(node.name)}`;
11746
11746
  }
11747
+ var stringReplace = String.prototype.replace;
11748
+ function replaceFirstStar(s, replacement) {
11749
+ return stringReplace.call(s, "*", replacement);
11750
+ }
11747
11751
 
11748
11752
  // src/compiler/factory/baseNodeFactory.ts
11749
11753
  function createBaseNodeFactory() {
@@ -29000,7 +29004,7 @@ function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, p
29000
29004
  trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
29001
29005
  }
29002
29006
  const resolved = forEach(paths[matchedPatternText], (subst) => {
29003
- const path2 = matchedStar ? subst.replace("*", matchedStar) : subst;
29007
+ const path2 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
29004
29008
  const candidate = normalizePath(combinePaths(baseDirectory, path2));
29005
29009
  if (state.traceEnabled) {
29006
29010
  trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path2);
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.4.0-dev.20231205",
5
+ "version": "5.4.0-dev.20231206",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "6c0687e493e23bfd054bf9ae1fc37a7cb75229ad"
117
+ "gitHead": "1d7c0c977abcb076d6f491ed091834baff6d41f8"
118
118
  }