@typescript-deploys/pr-build 5.4.0-pr-56794-29 → 5.4.0-pr-56794-34

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-insiders.20231218`;
21
+ var version = `${versionMajorMinor}.0-insiders.20231220`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -42972,10 +42972,10 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos
42972
42972
  return ending !== 0 /* Minimal */ || value === processEnding(relativeToBaseUrl, [ending], compilerOptions, host);
42973
42973
  }
42974
42974
  }
42975
- function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, exports, conditions, mode = 0 /* Exact */) {
42976
- if (typeof exports === "string") {
42975
+ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, exports2, conditions, mode = 0 /* Exact */) {
42976
+ if (typeof exports2 === "string") {
42977
42977
  const pathOrPattern = getNormalizedAbsolutePath(
42978
- combinePaths(packageDirectory, exports),
42978
+ combinePaths(packageDirectory, exports2),
42979
42979
  /*currentDirectory*/
42980
42980
  void 0
42981
42981
  );
@@ -42995,7 +42995,7 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
42995
42995
  false
42996
42996
  );
42997
42997
  return { moduleFileToTry: getNormalizedAbsolutePath(
42998
- combinePaths(combinePaths(packageName, exports), fragment),
42998
+ combinePaths(combinePaths(packageName, exports2), fragment),
42999
42999
  /*currentDirectory*/
43000
43000
  void 0
43001
43001
  ) };
@@ -43015,23 +43015,23 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
43015
43015
  }
43016
43016
  break;
43017
43017
  }
43018
- } else if (Array.isArray(exports)) {
43019
- return forEach(exports, (e) => tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, e, conditions));
43020
- } else if (typeof exports === "object" && exports !== null) {
43021
- if (allKeysStartWithDot(exports)) {
43022
- return forEach(getOwnKeys(exports), (k) => {
43018
+ } else if (Array.isArray(exports2)) {
43019
+ return forEach(exports2, (e) => tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, e, conditions));
43020
+ } else if (typeof exports2 === "object" && exports2 !== null) {
43021
+ if (allKeysStartWithDot(exports2)) {
43022
+ return forEach(getOwnKeys(exports2), (k) => {
43023
43023
  const subPackageName = getNormalizedAbsolutePath(
43024
43024
  combinePaths(packageName, k),
43025
43025
  /*currentDirectory*/
43026
43026
  void 0
43027
43027
  );
43028
43028
  const mode2 = endsWith(k, "/") ? 1 /* Directory */ : k.includes("*") ? 2 /* Pattern */ : 0 /* Exact */;
43029
- return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2);
43029
+ return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports2[k], conditions, mode2);
43030
43030
  });
43031
43031
  } else {
43032
- for (const key of getOwnKeys(exports)) {
43032
+ for (const key of getOwnKeys(exports2)) {
43033
43033
  if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) {
43034
- const subTarget = exports[key];
43034
+ const subTarget = exports2[key];
43035
43035
  const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
43036
43036
  if (result) {
43037
43037
  return result;
@@ -46124,13 +46124,13 @@ function createTypeChecker(host) {
46124
46124
  function reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName) {
46125
46125
  var _a, _b;
46126
46126
  const localSymbol = (_b = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(name.escapedText);
46127
- const exports = moduleSymbol.exports;
46127
+ const exports2 = moduleSymbol.exports;
46128
46128
  if (localSymbol) {
46129
- const exportedEqualsSymbol = exports == null ? void 0 : exports.get("export=" /* ExportEquals */);
46129
+ const exportedEqualsSymbol = exports2 == null ? void 0 : exports2.get("export=" /* ExportEquals */);
46130
46130
  if (exportedEqualsSymbol) {
46131
46131
  getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName);
46132
46132
  } else {
46133
- const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0;
46133
+ const exportedSymbol = exports2 ? find(symbolsToArray(exports2), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0;
46134
46134
  const diagnostic = exportedSymbol ? error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);
46135
46135
  if (localSymbol.declarations) {
46136
46136
  addRelatedInfo(diagnostic, ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));
@@ -46994,19 +46994,19 @@ function createTypeChecker(host) {
46994
46994
  return symbolsToArray(getExportsOfModule(moduleSymbol));
46995
46995
  }
46996
46996
  function getExportsAndPropertiesOfModule(moduleSymbol) {
46997
- const exports = getExportsOfModuleAsArray(moduleSymbol);
46997
+ const exports2 = getExportsOfModuleAsArray(moduleSymbol);
46998
46998
  const exportEquals = resolveExternalModuleSymbol(moduleSymbol);
46999
46999
  if (exportEquals !== moduleSymbol) {
47000
47000
  const type = getTypeOfSymbol(exportEquals);
47001
47001
  if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {
47002
- addRange(exports, getPropertiesOfType(type));
47002
+ addRange(exports2, getPropertiesOfType(type));
47003
47003
  }
47004
47004
  }
47005
- return exports;
47005
+ return exports2;
47006
47006
  }
47007
47007
  function forEachExportAndPropertyOfModule(moduleSymbol, cb) {
47008
- const exports = getExportsOfModule(moduleSymbol);
47009
- exports.forEach((symbol, key) => {
47008
+ const exports2 = getExportsOfModule(moduleSymbol);
47009
+ exports2.forEach((symbol, key) => {
47010
47010
  if (!isReservedMemberName(key)) {
47011
47011
  cb(symbol, key);
47012
47012
  }
@@ -47049,8 +47049,8 @@ function createTypeChecker(host) {
47049
47049
  function getExportsOfModule(moduleSymbol) {
47050
47050
  const links = getSymbolLinks(moduleSymbol);
47051
47051
  if (!links.resolvedExports) {
47052
- const { exports, typeOnlyExportStarMap } = getExportsOfModuleWorker(moduleSymbol);
47053
- links.resolvedExports = exports;
47052
+ const { exports: exports2, typeOnlyExportStarMap } = getExportsOfModuleWorker(moduleSymbol);
47053
+ links.resolvedExports = exports2;
47054
47054
  links.typeOnlyExportStarMap = typeOnlyExportStarMap;
47055
47055
  }
47056
47056
  return links.resolvedExports;
@@ -47084,12 +47084,12 @@ function createTypeChecker(host) {
47084
47084
  let typeOnlyExportStarMap;
47085
47085
  const nonTypeOnlyNames = /* @__PURE__ */ new Set();
47086
47086
  moduleSymbol = resolveExternalModuleSymbol(moduleSymbol);
47087
- const exports = visit(moduleSymbol) || emptySymbols;
47087
+ const exports2 = visit(moduleSymbol) || emptySymbols;
47088
47088
  if (typeOnlyExportStarMap) {
47089
47089
  nonTypeOnlyNames.forEach((name) => typeOnlyExportStarMap.delete(name));
47090
47090
  }
47091
47091
  return {
47092
- exports,
47092
+ exports: exports2,
47093
47093
  typeOnlyExportStarMap
47094
47094
  };
47095
47095
  function visit(symbol, exportStar, isTypeOnly) {
@@ -47278,12 +47278,12 @@ function createTypeChecker(host) {
47278
47278
  if (exportEquals && getSymbolIfSameReference(exportEquals, symbol)) {
47279
47279
  return container;
47280
47280
  }
47281
- const exports = getExportsOfSymbol(container);
47282
- const quick = exports.get(symbol.escapedName);
47281
+ const exports2 = getExportsOfSymbol(container);
47282
+ const quick = exports2.get(symbol.escapedName);
47283
47283
  if (quick && getSymbolIfSameReference(quick, symbol)) {
47284
47284
  return quick;
47285
47285
  }
47286
- return forEachEntry(exports, (exported) => {
47286
+ return forEachEntry(exports2, (exported) => {
47287
47287
  if (getSymbolIfSameReference(exported, symbol)) {
47288
47288
  return exported;
47289
47289
  }
@@ -48248,7 +48248,12 @@ function createTypeChecker(host) {
48248
48248
  }
48249
48249
  if (type.flags & 33554432 /* Substitution */) {
48250
48250
  const typeNode = typeToTypeNodeHelper(type.baseType, context);
48251
- return isNoInferType(type) ? factory.createTypeReferenceNode("NoInfer", [typeNode]) : typeNode;
48251
+ const noInferSymbol = isNoInferType(type) && getGlobalTypeSymbol(
48252
+ "NoInfer",
48253
+ /*reportErrors*/
48254
+ false
48255
+ );
48256
+ return noInferSymbol ? symbolToTypeNode(noInferSymbol, context, 788968 /* Type */, [typeNode]) : typeNode;
48252
48257
  }
48253
48258
  return Debug.fail("Should be unreachable.");
48254
48259
  function conditionalTypeToTypeNode(type2) {
@@ -49533,8 +49538,8 @@ function createTypeChecker(host) {
49533
49538
  context.flags ^= 16777216 /* InInitialEntityName */;
49534
49539
  } else {
49535
49540
  if (parent && getExportsOfSymbol(parent)) {
49536
- const exports = getExportsOfSymbol(parent);
49537
- forEachEntry(exports, (ex, name) => {
49541
+ const exports2 = getExportsOfSymbol(parent);
49542
+ forEachEntry(exports2, (ex, name) => {
49538
49543
  if (getSymbolIfSameReference(ex, symbol2) && !isLateBoundName(name) && name !== "export=" /* ExportEquals */) {
49539
49544
  symbolName2 = unescapeLeadingUnderscores(name);
49540
49545
  return true;
@@ -50158,8 +50163,8 @@ function createTypeChecker(host) {
50158
50163
  return statements;
50159
50164
  }
50160
50165
  function mergeExportDeclarations(statements) {
50161
- const exports = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause));
50162
- if (length(exports) > 1) {
50166
+ const exports2 = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause));
50167
+ if (length(exports2) > 1) {
50163
50168
  const nonExports = filter(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause);
50164
50169
  statements = [
50165
50170
  ...nonExports,
@@ -50168,7 +50173,7 @@ function createTypeChecker(host) {
50168
50173
  void 0,
50169
50174
  /*isTypeOnly*/
50170
50175
  false,
50171
- factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)),
50176
+ factory.createNamedExports(flatMap(exports2, (e) => cast(e.exportClause, isNamedExports).elements)),
50172
50177
  /*moduleSpecifier*/
50173
50178
  void 0
50174
50179
  )
@@ -50551,8 +50556,8 @@ function createTypeChecker(host) {
50551
50556
  );
50552
50557
  }
50553
50558
  function getNamespaceMembersForSerialization(symbol) {
50554
- const exports = getExportsOfSymbol(symbol);
50555
- return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
50559
+ const exports2 = getExportsOfSymbol(symbol);
50560
+ return !exports2 ? [] : filter(arrayFrom(exports2.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
50556
50561
  }
50557
50562
  function isTypeOnlyNamespace(symbol) {
50558
50563
  return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
@@ -52354,19 +52359,19 @@ function createTypeChecker(host) {
52354
52359
  if (!isInJSFile(decl) || !init || !isObjectLiteralExpression(init) || init.properties.length) {
52355
52360
  return void 0;
52356
52361
  }
52357
- const exports = createSymbolTable();
52362
+ const exports2 = createSymbolTable();
52358
52363
  while (isBinaryExpression(decl) || isPropertyAccessExpression(decl)) {
52359
52364
  const s2 = getSymbolOfNode(decl);
52360
52365
  if ((_a = s2 == null ? void 0 : s2.exports) == null ? void 0 : _a.size) {
52361
- mergeSymbolTable(exports, s2.exports);
52366
+ mergeSymbolTable(exports2, s2.exports);
52362
52367
  }
52363
52368
  decl = isBinaryExpression(decl) ? decl.parent : decl.parent.parent;
52364
52369
  }
52365
52370
  const s = getSymbolOfNode(decl);
52366
52371
  if ((_b = s == null ? void 0 : s.exports) == null ? void 0 : _b.size) {
52367
- mergeSymbolTable(exports, s.exports);
52372
+ mergeSymbolTable(exports2, s.exports);
52368
52373
  }
52369
- const type = createAnonymousType(symbol, exports, emptyArray, emptyArray, emptyArray);
52374
+ const type = createAnonymousType(symbol, exports2, emptyArray, emptyArray, emptyArray);
52370
52375
  type.objectFlags |= 4096 /* JSLiteral */;
52371
52376
  return type;
52372
52377
  }
@@ -57852,11 +57857,11 @@ function createTypeChecker(host) {
57852
57857
  );
57853
57858
  }
57854
57859
  function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
57855
- return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ && !isNoInferType(type) || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
57860
+ return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
57856
57861
  }
57857
57862
  function getIndexType(type, indexFlags = defaultIndexFlags) {
57858
57863
  type = getReducedType(type);
57859
- return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 33554432 /* Substitution */ ? getIndexType(type.baseType, indexFlags) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
57864
+ return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
57860
57865
  }
57861
57866
  function getExtractStringType(type) {
57862
57867
  if (keyofStringsOnly) {
@@ -69557,8 +69562,8 @@ function createTypeChecker(host) {
69557
69562
  }
69558
69563
  function getJsxType(name, location) {
69559
69564
  const namespace = getJsxNamespaceAt(location);
69560
- const exports = namespace && getExportsOfSymbol(namespace);
69561
- const typeSymbol = exports && getSymbol(exports, name, 788968 /* Type */);
69565
+ const exports2 = namespace && getExportsOfSymbol(namespace);
69566
+ const typeSymbol = exports2 && getSymbol(exports2, name, 788968 /* Type */);
69562
69567
  return typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType;
69563
69568
  }
69564
69569
  function getIntrinsicTagSymbol(node) {
@@ -72388,8 +72393,8 @@ function createTypeChecker(host) {
72388
72393
  }
72389
72394
  function createSignatureForJSXIntrinsic(node, result) {
72390
72395
  const namespace = getJsxNamespaceAt(node);
72391
- const exports = namespace && getExportsOfSymbol(namespace);
72392
- const typeSymbol = exports && getSymbol(exports, JsxNames.Element, 788968 /* Type */);
72396
+ const exports2 = namespace && getExportsOfSymbol(namespace);
72397
+ const typeSymbol = exports2 && getSymbol(exports2, JsxNames.Element, 788968 /* Type */);
72393
72398
  const returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 788968 /* Type */, node);
72394
72399
  const declaration = factory.createFunctionTypeNode(
72395
72400
  /*typeParameters*/
@@ -81142,9 +81147,9 @@ function createTypeChecker(host) {
81142
81147
  error(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements);
81143
81148
  }
81144
81149
  }
81145
- const exports = getExportsOfModule(moduleSymbol);
81146
- if (exports) {
81147
- exports.forEach(({ declarations, flags }, id) => {
81150
+ const exports2 = getExportsOfModule(moduleSymbol);
81151
+ if (exports2) {
81152
+ exports2.forEach(({ declarations, flags }, id) => {
81148
81153
  if (id === "__export") {
81149
81154
  return;
81150
81155
  }
@@ -83009,8 +83014,8 @@ function createTypeChecker(host) {
83009
83014
  return false;
83010
83015
  if (importTarget === file)
83011
83016
  return false;
83012
- const exports = getExportsOfModule(file.symbol);
83013
- for (const s of arrayFrom(exports.values())) {
83017
+ const exports2 = getExportsOfModule(file.symbol);
83018
+ for (const s of arrayFrom(exports2.values())) {
83014
83019
  if (s.mergeId) {
83015
83020
  const merged = getMergedSymbol(s);
83016
83021
  if (merged.declarations) {
@@ -106306,7 +106311,7 @@ function transformSystemModule(context) {
106306
106311
  const exportStarFunction = factory2.createUniqueName("exportStar");
106307
106312
  const m = factory2.createIdentifier("m");
106308
106313
  const n = factory2.createIdentifier("n");
106309
- const exports = factory2.createIdentifier("exports");
106314
+ const exports2 = factory2.createIdentifier("exports");
106310
106315
  let condition = factory2.createStrictInequality(n, factory2.createStringLiteral("default"));
106311
106316
  if (localNames) {
106312
106317
  condition = factory2.createLogicalAnd(
@@ -106345,7 +106350,7 @@ function transformSystemModule(context) {
106345
106350
  void 0,
106346
106351
  factory2.createVariableDeclarationList([
106347
106352
  factory2.createVariableDeclaration(
106348
- exports,
106353
+ exports2,
106349
106354
  /*exclamationToken*/
106350
106355
  void 0,
106351
106356
  /*type*/
@@ -106365,7 +106370,7 @@ function transformSystemModule(context) {
106365
106370
  condition,
106366
106371
  factory2.createExpressionStatement(
106367
106372
  factory2.createAssignment(
106368
- factory2.createElementAccessExpression(exports, n),
106373
+ factory2.createElementAccessExpression(exports2, n),
106369
106374
  factory2.createElementAccessExpression(m, n)
106370
106375
  )
106371
106376
  )
@@ -106379,7 +106384,7 @@ function transformSystemModule(context) {
106379
106384
  exportFunction,
106380
106385
  /*typeArguments*/
106381
106386
  void 0,
106382
- [exports]
106387
+ [exports2]
106383
106388
  )
106384
106389
  )
106385
106390
  ],
package/lib/tsserver.js CHANGED
@@ -2335,7 +2335,7 @@ module.exports = __toCommonJS(server_exports);
2335
2335
 
2336
2336
  // src/compiler/corePublic.ts
2337
2337
  var versionMajorMinor = "5.4";
2338
- var version = `${versionMajorMinor}.0-insiders.20231218`;
2338
+ var version = `${versionMajorMinor}.0-insiders.20231220`;
2339
2339
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2340
2340
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2341
2341
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -43127,18 +43127,18 @@ function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache
43127
43127
  }
43128
43128
  return packageJsonInfo.contents.resolvedEntrypoints = entrypoints || false;
43129
43129
  }
43130
- function loadEntrypointsFromExportMap(scope, exports, state, extensions) {
43130
+ function loadEntrypointsFromExportMap(scope, exports2, state, extensions) {
43131
43131
  let entrypoints;
43132
- if (isArray(exports)) {
43133
- for (const target of exports) {
43132
+ if (isArray(exports2)) {
43133
+ for (const target of exports2) {
43134
43134
  loadEntrypointsFromTargetExports(target);
43135
43135
  }
43136
- } else if (typeof exports === "object" && exports !== null && allKeysStartWithDot(exports)) {
43137
- for (const key in exports) {
43138
- loadEntrypointsFromTargetExports(exports[key]);
43136
+ } else if (typeof exports2 === "object" && exports2 !== null && allKeysStartWithDot(exports2)) {
43137
+ for (const key in exports2) {
43138
+ loadEntrypointsFromTargetExports(exports2[key]);
43139
43139
  }
43140
43140
  } else {
43141
- loadEntrypointsFromTargetExports(exports);
43141
+ loadEntrypointsFromTargetExports(exports2);
43142
43142
  }
43143
43143
  return entrypoints;
43144
43144
  function loadEntrypointsFromTargetExports(target) {
@@ -47687,10 +47687,10 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos
47687
47687
  return ending !== 0 /* Minimal */ || value === processEnding(relativeToBaseUrl, [ending], compilerOptions, host);
47688
47688
  }
47689
47689
  }
47690
- function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, exports, conditions, mode = 0 /* Exact */) {
47691
- if (typeof exports === "string") {
47690
+ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, exports2, conditions, mode = 0 /* Exact */) {
47691
+ if (typeof exports2 === "string") {
47692
47692
  const pathOrPattern = getNormalizedAbsolutePath(
47693
- combinePaths(packageDirectory, exports),
47693
+ combinePaths(packageDirectory, exports2),
47694
47694
  /*currentDirectory*/
47695
47695
  void 0
47696
47696
  );
@@ -47710,7 +47710,7 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
47710
47710
  false
47711
47711
  );
47712
47712
  return { moduleFileToTry: getNormalizedAbsolutePath(
47713
- combinePaths(combinePaths(packageName, exports), fragment),
47713
+ combinePaths(combinePaths(packageName, exports2), fragment),
47714
47714
  /*currentDirectory*/
47715
47715
  void 0
47716
47716
  ) };
@@ -47730,23 +47730,23 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
47730
47730
  }
47731
47731
  break;
47732
47732
  }
47733
- } else if (Array.isArray(exports)) {
47734
- return forEach(exports, (e) => tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, e, conditions));
47735
- } else if (typeof exports === "object" && exports !== null) {
47736
- if (allKeysStartWithDot(exports)) {
47737
- return forEach(getOwnKeys(exports), (k) => {
47733
+ } else if (Array.isArray(exports2)) {
47734
+ return forEach(exports2, (e) => tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, e, conditions));
47735
+ } else if (typeof exports2 === "object" && exports2 !== null) {
47736
+ if (allKeysStartWithDot(exports2)) {
47737
+ return forEach(getOwnKeys(exports2), (k) => {
47738
47738
  const subPackageName = getNormalizedAbsolutePath(
47739
47739
  combinePaths(packageName, k),
47740
47740
  /*currentDirectory*/
47741
47741
  void 0
47742
47742
  );
47743
47743
  const mode2 = endsWith(k, "/") ? 1 /* Directory */ : k.includes("*") ? 2 /* Pattern */ : 0 /* Exact */;
47744
- return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2);
47744
+ return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports2[k], conditions, mode2);
47745
47745
  });
47746
47746
  } else {
47747
- for (const key of getOwnKeys(exports)) {
47747
+ for (const key of getOwnKeys(exports2)) {
47748
47748
  if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) {
47749
- const subTarget = exports[key];
47749
+ const subTarget = exports2[key];
47750
47750
  const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
47751
47751
  if (result) {
47752
47752
  return result;
@@ -50839,13 +50839,13 @@ function createTypeChecker(host) {
50839
50839
  function reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName) {
50840
50840
  var _a, _b;
50841
50841
  const localSymbol = (_b = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(name.escapedText);
50842
- const exports = moduleSymbol.exports;
50842
+ const exports2 = moduleSymbol.exports;
50843
50843
  if (localSymbol) {
50844
- const exportedEqualsSymbol = exports == null ? void 0 : exports.get("export=" /* ExportEquals */);
50844
+ const exportedEqualsSymbol = exports2 == null ? void 0 : exports2.get("export=" /* ExportEquals */);
50845
50845
  if (exportedEqualsSymbol) {
50846
50846
  getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName);
50847
50847
  } else {
50848
- const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0;
50848
+ const exportedSymbol = exports2 ? find(symbolsToArray(exports2), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0;
50849
50849
  const diagnostic = exportedSymbol ? error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);
50850
50850
  if (localSymbol.declarations) {
50851
50851
  addRelatedInfo(diagnostic, ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));
@@ -51709,19 +51709,19 @@ function createTypeChecker(host) {
51709
51709
  return symbolsToArray(getExportsOfModule(moduleSymbol));
51710
51710
  }
51711
51711
  function getExportsAndPropertiesOfModule(moduleSymbol) {
51712
- const exports = getExportsOfModuleAsArray(moduleSymbol);
51712
+ const exports2 = getExportsOfModuleAsArray(moduleSymbol);
51713
51713
  const exportEquals = resolveExternalModuleSymbol(moduleSymbol);
51714
51714
  if (exportEquals !== moduleSymbol) {
51715
51715
  const type = getTypeOfSymbol(exportEquals);
51716
51716
  if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {
51717
- addRange(exports, getPropertiesOfType(type));
51717
+ addRange(exports2, getPropertiesOfType(type));
51718
51718
  }
51719
51719
  }
51720
- return exports;
51720
+ return exports2;
51721
51721
  }
51722
51722
  function forEachExportAndPropertyOfModule(moduleSymbol, cb) {
51723
- const exports = getExportsOfModule(moduleSymbol);
51724
- exports.forEach((symbol, key) => {
51723
+ const exports2 = getExportsOfModule(moduleSymbol);
51724
+ exports2.forEach((symbol, key) => {
51725
51725
  if (!isReservedMemberName(key)) {
51726
51726
  cb(symbol, key);
51727
51727
  }
@@ -51764,8 +51764,8 @@ function createTypeChecker(host) {
51764
51764
  function getExportsOfModule(moduleSymbol) {
51765
51765
  const links = getSymbolLinks(moduleSymbol);
51766
51766
  if (!links.resolvedExports) {
51767
- const { exports, typeOnlyExportStarMap } = getExportsOfModuleWorker(moduleSymbol);
51768
- links.resolvedExports = exports;
51767
+ const { exports: exports2, typeOnlyExportStarMap } = getExportsOfModuleWorker(moduleSymbol);
51768
+ links.resolvedExports = exports2;
51769
51769
  links.typeOnlyExportStarMap = typeOnlyExportStarMap;
51770
51770
  }
51771
51771
  return links.resolvedExports;
@@ -51799,12 +51799,12 @@ function createTypeChecker(host) {
51799
51799
  let typeOnlyExportStarMap;
51800
51800
  const nonTypeOnlyNames = /* @__PURE__ */ new Set();
51801
51801
  moduleSymbol = resolveExternalModuleSymbol(moduleSymbol);
51802
- const exports = visit(moduleSymbol) || emptySymbols;
51802
+ const exports2 = visit(moduleSymbol) || emptySymbols;
51803
51803
  if (typeOnlyExportStarMap) {
51804
51804
  nonTypeOnlyNames.forEach((name) => typeOnlyExportStarMap.delete(name));
51805
51805
  }
51806
51806
  return {
51807
- exports,
51807
+ exports: exports2,
51808
51808
  typeOnlyExportStarMap
51809
51809
  };
51810
51810
  function visit(symbol, exportStar, isTypeOnly) {
@@ -51993,12 +51993,12 @@ function createTypeChecker(host) {
51993
51993
  if (exportEquals && getSymbolIfSameReference(exportEquals, symbol)) {
51994
51994
  return container;
51995
51995
  }
51996
- const exports = getExportsOfSymbol(container);
51997
- const quick = exports.get(symbol.escapedName);
51996
+ const exports2 = getExportsOfSymbol(container);
51997
+ const quick = exports2.get(symbol.escapedName);
51998
51998
  if (quick && getSymbolIfSameReference(quick, symbol)) {
51999
51999
  return quick;
52000
52000
  }
52001
- return forEachEntry(exports, (exported) => {
52001
+ return forEachEntry(exports2, (exported) => {
52002
52002
  if (getSymbolIfSameReference(exported, symbol)) {
52003
52003
  return exported;
52004
52004
  }
@@ -52963,7 +52963,12 @@ function createTypeChecker(host) {
52963
52963
  }
52964
52964
  if (type.flags & 33554432 /* Substitution */) {
52965
52965
  const typeNode = typeToTypeNodeHelper(type.baseType, context);
52966
- return isNoInferType(type) ? factory.createTypeReferenceNode("NoInfer", [typeNode]) : typeNode;
52966
+ const noInferSymbol = isNoInferType(type) && getGlobalTypeSymbol(
52967
+ "NoInfer",
52968
+ /*reportErrors*/
52969
+ false
52970
+ );
52971
+ return noInferSymbol ? symbolToTypeNode(noInferSymbol, context, 788968 /* Type */, [typeNode]) : typeNode;
52967
52972
  }
52968
52973
  return Debug.fail("Should be unreachable.");
52969
52974
  function conditionalTypeToTypeNode(type2) {
@@ -54248,8 +54253,8 @@ function createTypeChecker(host) {
54248
54253
  context.flags ^= 16777216 /* InInitialEntityName */;
54249
54254
  } else {
54250
54255
  if (parent2 && getExportsOfSymbol(parent2)) {
54251
- const exports = getExportsOfSymbol(parent2);
54252
- forEachEntry(exports, (ex, name) => {
54256
+ const exports2 = getExportsOfSymbol(parent2);
54257
+ forEachEntry(exports2, (ex, name) => {
54253
54258
  if (getSymbolIfSameReference(ex, symbol2) && !isLateBoundName(name) && name !== "export=" /* ExportEquals */) {
54254
54259
  symbolName2 = unescapeLeadingUnderscores(name);
54255
54260
  return true;
@@ -54873,8 +54878,8 @@ function createTypeChecker(host) {
54873
54878
  return statements;
54874
54879
  }
54875
54880
  function mergeExportDeclarations(statements) {
54876
- const exports = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause));
54877
- if (length(exports) > 1) {
54881
+ const exports2 = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause));
54882
+ if (length(exports2) > 1) {
54878
54883
  const nonExports = filter(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause);
54879
54884
  statements = [
54880
54885
  ...nonExports,
@@ -54883,7 +54888,7 @@ function createTypeChecker(host) {
54883
54888
  void 0,
54884
54889
  /*isTypeOnly*/
54885
54890
  false,
54886
- factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)),
54891
+ factory.createNamedExports(flatMap(exports2, (e) => cast(e.exportClause, isNamedExports).elements)),
54887
54892
  /*moduleSpecifier*/
54888
54893
  void 0
54889
54894
  )
@@ -55266,8 +55271,8 @@ function createTypeChecker(host) {
55266
55271
  );
55267
55272
  }
55268
55273
  function getNamespaceMembersForSerialization(symbol) {
55269
- const exports = getExportsOfSymbol(symbol);
55270
- return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
55274
+ const exports2 = getExportsOfSymbol(symbol);
55275
+ return !exports2 ? [] : filter(arrayFrom(exports2.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
55271
55276
  }
55272
55277
  function isTypeOnlyNamespace(symbol) {
55273
55278
  return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
@@ -57069,19 +57074,19 @@ function createTypeChecker(host) {
57069
57074
  if (!isInJSFile(decl) || !init || !isObjectLiteralExpression(init) || init.properties.length) {
57070
57075
  return void 0;
57071
57076
  }
57072
- const exports = createSymbolTable();
57077
+ const exports2 = createSymbolTable();
57073
57078
  while (isBinaryExpression(decl) || isPropertyAccessExpression(decl)) {
57074
57079
  const s2 = getSymbolOfNode(decl);
57075
57080
  if ((_a = s2 == null ? void 0 : s2.exports) == null ? void 0 : _a.size) {
57076
- mergeSymbolTable(exports, s2.exports);
57081
+ mergeSymbolTable(exports2, s2.exports);
57077
57082
  }
57078
57083
  decl = isBinaryExpression(decl) ? decl.parent : decl.parent.parent;
57079
57084
  }
57080
57085
  const s = getSymbolOfNode(decl);
57081
57086
  if ((_b = s == null ? void 0 : s.exports) == null ? void 0 : _b.size) {
57082
- mergeSymbolTable(exports, s.exports);
57087
+ mergeSymbolTable(exports2, s.exports);
57083
57088
  }
57084
- const type = createAnonymousType(symbol, exports, emptyArray, emptyArray, emptyArray);
57089
+ const type = createAnonymousType(symbol, exports2, emptyArray, emptyArray, emptyArray);
57085
57090
  type.objectFlags |= 4096 /* JSLiteral */;
57086
57091
  return type;
57087
57092
  }
@@ -62567,11 +62572,11 @@ function createTypeChecker(host) {
62567
62572
  );
62568
62573
  }
62569
62574
  function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
62570
- return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ && !isNoInferType(type) || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
62575
+ return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
62571
62576
  }
62572
62577
  function getIndexType(type, indexFlags = defaultIndexFlags) {
62573
62578
  type = getReducedType(type);
62574
- return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 33554432 /* Substitution */ ? getIndexType(type.baseType, indexFlags) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
62579
+ return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
62575
62580
  }
62576
62581
  function getExtractStringType(type) {
62577
62582
  if (keyofStringsOnly) {
@@ -74272,8 +74277,8 @@ function createTypeChecker(host) {
74272
74277
  }
74273
74278
  function getJsxType(name, location) {
74274
74279
  const namespace = getJsxNamespaceAt(location);
74275
- const exports = namespace && getExportsOfSymbol(namespace);
74276
- const typeSymbol = exports && getSymbol2(exports, name, 788968 /* Type */);
74280
+ const exports2 = namespace && getExportsOfSymbol(namespace);
74281
+ const typeSymbol = exports2 && getSymbol2(exports2, name, 788968 /* Type */);
74277
74282
  return typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType;
74278
74283
  }
74279
74284
  function getIntrinsicTagSymbol(node) {
@@ -77103,8 +77108,8 @@ function createTypeChecker(host) {
77103
77108
  }
77104
77109
  function createSignatureForJSXIntrinsic(node, result) {
77105
77110
  const namespace = getJsxNamespaceAt(node);
77106
- const exports = namespace && getExportsOfSymbol(namespace);
77107
- const typeSymbol = exports && getSymbol2(exports, JsxNames.Element, 788968 /* Type */);
77111
+ const exports2 = namespace && getExportsOfSymbol(namespace);
77112
+ const typeSymbol = exports2 && getSymbol2(exports2, JsxNames.Element, 788968 /* Type */);
77108
77113
  const returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 788968 /* Type */, node);
77109
77114
  const declaration = factory.createFunctionTypeNode(
77110
77115
  /*typeParameters*/
@@ -85857,9 +85862,9 @@ function createTypeChecker(host) {
85857
85862
  error2(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements);
85858
85863
  }
85859
85864
  }
85860
- const exports = getExportsOfModule(moduleSymbol);
85861
- if (exports) {
85862
- exports.forEach(({ declarations, flags }, id) => {
85865
+ const exports2 = getExportsOfModule(moduleSymbol);
85866
+ if (exports2) {
85867
+ exports2.forEach(({ declarations, flags }, id) => {
85863
85868
  if (id === "__export") {
85864
85869
  return;
85865
85870
  }
@@ -87724,8 +87729,8 @@ function createTypeChecker(host) {
87724
87729
  return false;
87725
87730
  if (importTarget === file)
87726
87731
  return false;
87727
- const exports = getExportsOfModule(file.symbol);
87728
- for (const s of arrayFrom(exports.values())) {
87732
+ const exports2 = getExportsOfModule(file.symbol);
87733
+ for (const s of arrayFrom(exports2.values())) {
87729
87734
  if (s.mergeId) {
87730
87735
  const merged = getMergedSymbol(s);
87731
87736
  if (merged.declarations) {
@@ -111192,7 +111197,7 @@ function transformSystemModule(context) {
111192
111197
  const exportStarFunction = factory2.createUniqueName("exportStar");
111193
111198
  const m = factory2.createIdentifier("m");
111194
111199
  const n = factory2.createIdentifier("n");
111195
- const exports = factory2.createIdentifier("exports");
111200
+ const exports2 = factory2.createIdentifier("exports");
111196
111201
  let condition = factory2.createStrictInequality(n, factory2.createStringLiteral("default"));
111197
111202
  if (localNames) {
111198
111203
  condition = factory2.createLogicalAnd(
@@ -111231,7 +111236,7 @@ function transformSystemModule(context) {
111231
111236
  void 0,
111232
111237
  factory2.createVariableDeclarationList([
111233
111238
  factory2.createVariableDeclaration(
111234
- exports,
111239
+ exports2,
111235
111240
  /*exclamationToken*/
111236
111241
  void 0,
111237
111242
  /*type*/
@@ -111251,7 +111256,7 @@ function transformSystemModule(context) {
111251
111256
  condition,
111252
111257
  factory2.createExpressionStatement(
111253
111258
  factory2.createAssignment(
111254
- factory2.createElementAccessExpression(exports, n),
111259
+ factory2.createElementAccessExpression(exports2, n),
111255
111260
  factory2.createElementAccessExpression(m, n)
111256
111261
  )
111257
111262
  )
@@ -111265,7 +111270,7 @@ function transformSystemModule(context) {
111265
111270
  exportFunction,
111266
111271
  /*typeArguments*/
111267
111272
  void 0,
111268
- [exports]
111273
+ [exports2]
111269
111274
  )
111270
111275
  )
111271
111276
  ],
@@ -140716,9 +140721,9 @@ function addExports(sourceFile, toMove, needExport, useEs6Exports) {
140716
140721
  var _a;
140717
140722
  return needExport.has(Debug.checkDefined((_a = tryCast(d, canHaveSymbol)) == null ? void 0 : _a.symbol));
140718
140723
  })) {
140719
- const exports = addExport(getSynthesizedDeepClone(statement), useEs6Exports);
140720
- if (exports)
140721
- return exports;
140724
+ const exports2 = addExport(getSynthesizedDeepClone(statement), useEs6Exports);
140725
+ if (exports2)
140726
+ return exports2;
140722
140727
  }
140723
140728
  return getSynthesizedDeepClone(statement);
140724
140729
  });
@@ -149910,8 +149915,8 @@ function fixImportOfModuleExports(importingFile, exportingFile, program, changes
149910
149915
  }
149911
149916
  function convertFileToEsModule(sourceFile, checker, changes, target, quotePreference) {
149912
149917
  const identifiers = { original: collectFreeIdentifiers(sourceFile), additional: /* @__PURE__ */ new Set() };
149913
- const exports = collectExportRenames(sourceFile, checker, identifiers);
149914
- convertExportsAccesses(sourceFile, exports, changes);
149918
+ const exports2 = collectExportRenames(sourceFile, checker, identifiers);
149919
+ convertExportsAccesses(sourceFile, exports2, changes);
149915
149920
  let moduleExportsChangedToDefault = false;
149916
149921
  let useSitesToUnqualify;
149917
149922
  for (const statement of filter(sourceFile.statements, isVariableStatement)) {
@@ -149921,7 +149926,7 @@ function convertFileToEsModule(sourceFile, checker, changes, target, quotePrefer
149921
149926
  }
149922
149927
  }
149923
149928
  for (const statement of filter(sourceFile.statements, (s) => !isVariableStatement(s))) {
149924
- const moduleExportsChanged = convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference);
149929
+ const moduleExportsChanged = convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports2, useSitesToUnqualify, quotePreference);
149925
149930
  moduleExportsChangedToDefault = moduleExportsChangedToDefault || moduleExportsChanged;
149926
149931
  }
149927
149932
  useSitesToUnqualify == null ? void 0 : useSitesToUnqualify.forEach((replacement, original) => {
@@ -149945,13 +149950,13 @@ function collectExportRenames(sourceFile, checker, identifiers) {
149945
149950
  });
149946
149951
  return res;
149947
149952
  }
149948
- function convertExportsAccesses(sourceFile, exports, changes) {
149953
+ function convertExportsAccesses(sourceFile, exports2, changes) {
149949
149954
  forEachExportReference(sourceFile, (node, isAssignmentLhs) => {
149950
149955
  if (isAssignmentLhs) {
149951
149956
  return;
149952
149957
  }
149953
149958
  const { text } = node.name;
149954
- changes.replaceNode(sourceFile, node, factory.createIdentifier(exports.get(text) || text));
149959
+ changes.replaceNode(sourceFile, node, factory.createIdentifier(exports2.get(text) || text));
149955
149960
  });
149956
149961
  }
149957
149962
  function forEachExportReference(sourceFile, cb) {
@@ -149963,7 +149968,7 @@ function forEachExportReference(sourceFile, cb) {
149963
149968
  node.forEachChild(recur);
149964
149969
  });
149965
149970
  }
149966
- function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) {
149971
+ function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports2, useSitesToUnqualify, quotePreference) {
149967
149972
  switch (statement.kind) {
149968
149973
  case 243 /* VariableStatement */:
149969
149974
  convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference);
@@ -149990,7 +149995,7 @@ function convertStatement(sourceFile, statement, checker, changes, identifiers,
149990
149995
  }
149991
149996
  case 226 /* BinaryExpression */: {
149992
149997
  const { operatorToken } = expression;
149993
- return operatorToken.kind === 64 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify);
149998
+ return operatorToken.kind === 64 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports2, useSitesToUnqualify);
149994
149999
  }
149995
150000
  }
149996
150001
  }
@@ -150061,7 +150066,7 @@ function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identi
150061
150066
  return Debug.assertNever(name, `Convert to ES module got invalid syntax form ${name.kind}`);
150062
150067
  }
150063
150068
  }
150064
- function convertAssignment(sourceFile, checker, assignment, changes, exports, useSitesToUnqualify) {
150069
+ function convertAssignment(sourceFile, checker, assignment, changes, exports2, useSitesToUnqualify) {
150065
150070
  const { left, right } = assignment;
150066
150071
  if (!isPropertyAccessExpression(left)) {
150067
150072
  return false;
@@ -150084,7 +150089,7 @@ function convertAssignment(sourceFile, checker, assignment, changes, exports, us
150084
150089
  }
150085
150090
  }
150086
150091
  } else if (isExportsOrModuleExportsOrAlias(sourceFile, left.expression)) {
150087
- convertNamedExport(sourceFile, assignment, changes, exports);
150092
+ convertNamedExport(sourceFile, assignment, changes, exports2);
150088
150093
  }
150089
150094
  return false;
150090
150095
  }
@@ -150106,9 +150111,9 @@ function tryChangeModuleExportsObject(object, useSitesToUnqualify) {
150106
150111
  });
150107
150112
  return statements && [statements, false];
150108
150113
  }
150109
- function convertNamedExport(sourceFile, assignment, changes, exports) {
150114
+ function convertNamedExport(sourceFile, assignment, changes, exports2) {
150110
150115
  const { text } = assignment.left.name;
150111
- const rename = exports.get(text);
150116
+ const rename = exports2.get(text);
150112
150117
  if (rename !== void 0) {
150113
150118
  const newNodes = [
150114
150119
  makeConst(
@@ -150132,10 +150137,10 @@ function convertNamedExport(sourceFile, assignment, changes, exports) {
150132
150137
  function convertReExportAll(reExported, checker) {
150133
150138
  const moduleSpecifier = reExported.text;
150134
150139
  const moduleSymbol = checker.getSymbolAtLocation(reExported);
150135
- const exports = moduleSymbol ? moduleSymbol.exports : emptyMap;
150136
- return exports.has("export=" /* ExportEquals */) ? [[reExportDefault(moduleSpecifier)], true] : !exports.has("default" /* Default */) ? [[reExportStar(moduleSpecifier)], false] : (
150140
+ const exports2 = moduleSymbol ? moduleSymbol.exports : emptyMap;
150141
+ return exports2.has("export=" /* ExportEquals */) ? [[reExportDefault(moduleSpecifier)], true] : !exports2.has("default" /* Default */) ? [[reExportStar(moduleSpecifier)], false] : (
150137
150142
  // If there's some non-default export, must include both `export *` and `export default`.
150138
- exports.size > 1 ? [[reExportStar(moduleSpecifier), reExportDefault(moduleSpecifier)], true] : [[reExportDefault(moduleSpecifier)], true]
150143
+ exports2.size > 1 ? [[reExportStar(moduleSpecifier), reExportDefault(moduleSpecifier)], true] : [[reExportDefault(moduleSpecifier)], true]
150139
150144
  );
150140
150145
  }
150141
150146
  function reExportStar(moduleSpecifier) {
@@ -152661,7 +152666,7 @@ registerCodeFix({
152661
152666
  getAllCodeActions(context) {
152662
152667
  const { program } = context;
152663
152668
  return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {
152664
- const exports = /* @__PURE__ */ new Map();
152669
+ const exports2 = /* @__PURE__ */ new Map();
152665
152670
  eachDiagnostic(context, errorCodes23, (diag2) => {
152666
152671
  const info = getInfo7(diag2.file, diag2.start, program);
152667
152672
  if (info === void 0)
@@ -152670,16 +152675,16 @@ registerCodeFix({
152670
152675
  if (tryGetExportDeclaration(moduleSourceFile, exportName.isTypeOnly) === void 0 && canHaveExportModifier(node)) {
152671
152676
  changes.insertExportModifier(moduleSourceFile, node);
152672
152677
  } else {
152673
- const moduleExports = exports.get(moduleSourceFile) || { typeOnlyExports: [], exports: [] };
152678
+ const moduleExports = exports2.get(moduleSourceFile) || { typeOnlyExports: [], exports: [] };
152674
152679
  if (exportName.isTypeOnly) {
152675
152680
  moduleExports.typeOnlyExports.push(exportName);
152676
152681
  } else {
152677
152682
  moduleExports.exports.push(exportName);
152678
152683
  }
152679
- exports.set(moduleSourceFile, moduleExports);
152684
+ exports2.set(moduleSourceFile, moduleExports);
152680
152685
  }
152681
152686
  });
152682
- exports.forEach((moduleExports, moduleSourceFile) => {
152687
+ exports2.forEach((moduleExports, moduleSourceFile) => {
152683
152688
  const exportDeclaration = tryGetExportDeclaration(
152684
152689
  moduleSourceFile,
152685
152690
  /*isTypeOnly*/
@@ -160922,9 +160927,9 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
160922
160927
  }
160923
160928
  completionKind = 3 /* MemberLike */;
160924
160929
  isNewIdentifierLocation = false;
160925
- const exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
160930
+ const exports2 = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
160926
160931
  const existing = new Set(namedImportsOrExports.elements.filter((n) => !isCurrentlyEditingNode(n)).map((n) => (n.propertyName || n.name).escapedText));
160927
- const uniques = exports.filter((e) => e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName));
160932
+ const uniques = exports2.filter((e) => e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName));
160928
160933
  symbols = concatenate(symbols, uniques);
160929
160934
  if (!uniques.length) {
160930
160935
  keywordFilters = 0 /* None */;
@@ -162526,12 +162531,12 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c
162526
162531
  const packageFile = combinePaths(packageDirectory, "package.json");
162527
162532
  if (tryFileExists(host, packageFile)) {
162528
162533
  const packageJson = readJson(packageFile, host);
162529
- const exports = packageJson.exports;
162530
- if (exports) {
162531
- if (typeof exports !== "object" || exports === null) {
162534
+ const exports2 = packageJson.exports;
162535
+ if (exports2) {
162536
+ if (typeof exports2 !== "object" || exports2 === null) {
162532
162537
  return;
162533
162538
  }
162534
- const keys = getOwnKeys(exports);
162539
+ const keys = getOwnKeys(exports2);
162535
162540
  const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : "");
162536
162541
  const conditions = getConditions(compilerOptions, mode);
162537
162542
  addCompletionEntriesFromPathsOrExports(
@@ -162541,7 +162546,7 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c
162541
162546
  extensionOptions,
162542
162547
  host,
162543
162548
  keys,
162544
- (key) => singleElementArray(getPatternFromFirstMatchingCondition(exports[key], conditions)),
162549
+ (key) => singleElementArray(getPatternFromFirstMatchingCondition(exports2[key], conditions)),
162545
162550
  comparePatternKeys
162546
162551
  );
162547
162552
  return;
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-insiders.20231218`;
38
+ version = `${versionMajorMinor}.0-insiders.20231220`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -50722,7 +50722,12 @@ ${lanes.join("\n")}
50722
50722
  }
50723
50723
  if (type.flags & 33554432 /* Substitution */) {
50724
50724
  const typeNode = typeToTypeNodeHelper(type.baseType, context);
50725
- return isNoInferType(type) ? factory.createTypeReferenceNode("NoInfer", [typeNode]) : typeNode;
50725
+ const noInferSymbol = isNoInferType(type) && getGlobalTypeSymbol(
50726
+ "NoInfer",
50727
+ /*reportErrors*/
50728
+ false
50729
+ );
50730
+ return noInferSymbol ? symbolToTypeNode(noInferSymbol, context, 788968 /* Type */, [typeNode]) : typeNode;
50726
50731
  }
50727
50732
  return Debug.fail("Should be unreachable.");
50728
50733
  function conditionalTypeToTypeNode(type2) {
@@ -60326,11 +60331,11 @@ ${lanes.join("\n")}
60326
60331
  );
60327
60332
  }
60328
60333
  function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
60329
- return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ && !isNoInferType(type) || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
60334
+ return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
60330
60335
  }
60331
60336
  function getIndexType(type, indexFlags = defaultIndexFlags) {
60332
60337
  type = getReducedType(type);
60333
- return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 33554432 /* Substitution */ ? getIndexType(type.baseType, indexFlags) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
60338
+ return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
60334
60339
  }
60335
60340
  function getExtractStringType(type) {
60336
60341
  if (keyofStringsOnly) {
@@ -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-insiders.20231218`;
57
+ var version = `${versionMajorMinor}.0-insiders.20231220`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.4.0-pr-56794-29",
5
+ "version": "5.4.0-pr-56794-34",
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": "180ea6e8665ca5b5006ea2a9793c04327ad0ba45"
117
+ "gitHead": "332fc36407262e0f106314f0df14d9228b048a33"
118
118
  }