typescript 4.8.0-dev.20220727 → 4.8.0-dev.20220728

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
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.8";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220727";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220728";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -49229,7 +49229,7 @@ var ts;
49229
49229
  }
49230
49230
  }
49231
49231
  }
49232
- return getIntersectionType(constraints);
49232
+ return getNormalizedType(getIntersectionType(constraints), false);
49233
49233
  }
49234
49234
  return undefined;
49235
49235
  }
@@ -70968,14 +70968,19 @@ var ts;
70968
70968
  }
70969
70969
  var indexInfos = getApplicableIndexInfos(type, propNameType);
70970
70970
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 ? ts.getDeclarationOfKind(type.symbol, 258) : undefined;
70971
- var localPropDeclaration = declaration && declaration.kind === 221 ||
70972
- name && name.kind === 162 || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
70971
+ var propDeclaration = declaration && declaration.kind === 221 ||
70972
+ name && name.kind === 162 ? declaration : undefined;
70973
+ var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
70973
70974
  var _loop_30 = function (info) {
70974
70975
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
70975
70976
  var errorNode = localPropDeclaration || localIndexDeclaration ||
70976
70977
  (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
70977
70978
  if (errorNode && !isTypeAssignableTo(propType, info.type)) {
70978
- error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
70979
+ var diagnostic = createError(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
70980
+ if (propDeclaration && errorNode !== propDeclaration) {
70981
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(propDeclaration, ts.Diagnostics._0_is_declared_here, symbolToString(prop)));
70982
+ }
70983
+ diagnostics.add(diagnostic);
70979
70984
  }
70980
70985
  };
70981
70986
  for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
package/lib/tsserver.js CHANGED
@@ -109,7 +109,7 @@ var ts;
109
109
  // The following is baselined as a literal template type without intervention
110
110
  /** The version of the TypeScript compiler release */
111
111
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
112
- ts.version = ts.versionMajorMinor + ".0-dev.20220727";
112
+ ts.version = ts.versionMajorMinor + ".0-dev.20220728";
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -59425,7 +59425,8 @@ var ts;
59425
59425
  }
59426
59426
  }
59427
59427
  }
59428
- return getIntersectionType(constraints);
59428
+ // The source types were normalized; ensure the result is normalized too.
59429
+ return getNormalizedType(getIntersectionType(constraints), /*writing*/ false);
59429
59430
  }
59430
59431
  return undefined;
59431
59432
  }
@@ -84668,8 +84669,9 @@ var ts;
84668
84669
  }
84669
84670
  var indexInfos = getApplicableIndexInfos(type, propNameType);
84670
84671
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 258 /* InterfaceDeclaration */) : undefined;
84671
- var localPropDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84672
- name && name.kind === 162 /* ComputedPropertyName */ || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84672
+ var propDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84673
+ name && name.kind === 162 /* ComputedPropertyName */ ? declaration : undefined;
84674
+ var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84673
84675
  var _loop_30 = function (info) {
84674
84676
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
84675
84677
  // We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
@@ -84678,7 +84680,11 @@ var ts;
84678
84680
  var errorNode = localPropDeclaration || localIndexDeclaration ||
84679
84681
  (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
84680
84682
  if (errorNode && !isTypeAssignableTo(propType, info.type)) {
84681
- error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84683
+ var diagnostic = createError(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84684
+ if (propDeclaration && errorNode !== propDeclaration) {
84685
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(propDeclaration, ts.Diagnostics._0_is_declared_here, symbolToString(prop)));
84686
+ }
84687
+ diagnostics.add(diagnostic);
84682
84688
  }
84683
84689
  };
84684
84690
  for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
@@ -118329,7 +118335,7 @@ var ts;
118329
118335
  // `result[i]` is either a `ResolvedModuleFull` or a marker.
118330
118336
  // If it is the former, we can leave it as is.
118331
118337
  if (result[i] === predictedToResolveToAmbientModuleMarker) {
118332
- result[i] = undefined; // TODO: GH#18217
118338
+ result[i] = undefined;
118333
118339
  }
118334
118340
  }
118335
118341
  else {
@@ -163653,7 +163659,7 @@ var ts;
163653
163659
  var usage = getUsageInfo(oldFile, toMove.all, checker);
163654
163660
  var currentDirectory = ts.getDirectoryPath(oldFile.fileName);
163655
163661
  var extension = ts.extensionFromPath(oldFile.fileName);
163656
- var newModuleName = makeUniqueModuleName(getNewModuleName(usage.movedSymbols), extension, currentDirectory, host);
163662
+ var newModuleName = makeUniqueModuleName(getNewModuleName(usage.oldFileImportsFromNewFile, usage.movedSymbols), extension, currentDirectory, host);
163657
163663
  var newFileNameWithExtension = newModuleName + extension;
163658
163664
  // If previous file was global, this is easy.
163659
163665
  changes.createNewFile(oldFile, ts.combinePaths(currentDirectory, newFileNameWithExtension), getNewStatementsAndRemoveFromOldFile(oldFile, usage, changes, toMove, program, newModuleName, preferences));
@@ -164017,8 +164023,8 @@ var ts;
164017
164023
  newModuleName = moduleName + "." + i;
164018
164024
  }
164019
164025
  }
164020
- function getNewModuleName(movedSymbols) {
164021
- return movedSymbols.forEachEntry(ts.symbolNameNoDefault) || "newFile";
164026
+ function getNewModuleName(importsFromNewFile, movedSymbols) {
164027
+ return importsFromNewFile.forEachEntry(ts.symbolNameNoDefault) || movedSymbols.forEachEntry(ts.symbolNameNoDefault) || "newFile";
164022
164028
  }
164023
164029
  function getUsageInfo(oldFile, toMove, checker) {
164024
164030
  var movedSymbols = new SymbolSet();
@@ -303,7 +303,7 @@ var ts;
303
303
  // The following is baselined as a literal template type without intervention
304
304
  /** The version of the TypeScript compiler release */
305
305
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
306
- ts.version = ts.versionMajorMinor + ".0-dev.20220727";
306
+ ts.version = ts.versionMajorMinor + ".0-dev.20220728";
307
307
  /* @internal */
308
308
  var Comparison;
309
309
  (function (Comparison) {
@@ -59619,7 +59619,8 @@ var ts;
59619
59619
  }
59620
59620
  }
59621
59621
  }
59622
- return getIntersectionType(constraints);
59622
+ // The source types were normalized; ensure the result is normalized too.
59623
+ return getNormalizedType(getIntersectionType(constraints), /*writing*/ false);
59623
59624
  }
59624
59625
  return undefined;
59625
59626
  }
@@ -84862,8 +84863,9 @@ var ts;
84862
84863
  }
84863
84864
  var indexInfos = getApplicableIndexInfos(type, propNameType);
84864
84865
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 258 /* InterfaceDeclaration */) : undefined;
84865
- var localPropDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84866
- name && name.kind === 162 /* ComputedPropertyName */ || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84866
+ var propDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84867
+ name && name.kind === 162 /* ComputedPropertyName */ ? declaration : undefined;
84868
+ var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84867
84869
  var _loop_30 = function (info) {
84868
84870
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
84869
84871
  // We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
@@ -84872,7 +84874,11 @@ var ts;
84872
84874
  var errorNode = localPropDeclaration || localIndexDeclaration ||
84873
84875
  (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
84874
84876
  if (errorNode && !isTypeAssignableTo(propType, info.type)) {
84875
- error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84877
+ var diagnostic = createError(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84878
+ if (propDeclaration && errorNode !== propDeclaration) {
84879
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(propDeclaration, ts.Diagnostics._0_is_declared_here, symbolToString(prop)));
84880
+ }
84881
+ diagnostics.add(diagnostic);
84876
84882
  }
84877
84883
  };
84878
84884
  for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
@@ -118523,7 +118529,7 @@ var ts;
118523
118529
  // `result[i]` is either a `ResolvedModuleFull` or a marker.
118524
118530
  // If it is the former, we can leave it as is.
118525
118531
  if (result[i] === predictedToResolveToAmbientModuleMarker) {
118526
- result[i] = undefined; // TODO: GH#18217
118532
+ result[i] = undefined;
118527
118533
  }
118528
118534
  }
118529
118535
  else {
@@ -164266,7 +164272,7 @@ var ts;
164266
164272
  var usage = getUsageInfo(oldFile, toMove.all, checker);
164267
164273
  var currentDirectory = ts.getDirectoryPath(oldFile.fileName);
164268
164274
  var extension = ts.extensionFromPath(oldFile.fileName);
164269
- var newModuleName = makeUniqueModuleName(getNewModuleName(usage.movedSymbols), extension, currentDirectory, host);
164275
+ var newModuleName = makeUniqueModuleName(getNewModuleName(usage.oldFileImportsFromNewFile, usage.movedSymbols), extension, currentDirectory, host);
164270
164276
  var newFileNameWithExtension = newModuleName + extension;
164271
164277
  // If previous file was global, this is easy.
164272
164278
  changes.createNewFile(oldFile, ts.combinePaths(currentDirectory, newFileNameWithExtension), getNewStatementsAndRemoveFromOldFile(oldFile, usage, changes, toMove, program, newModuleName, preferences));
@@ -164630,8 +164636,8 @@ var ts;
164630
164636
  newModuleName = moduleName + "." + i;
164631
164637
  }
164632
164638
  }
164633
- function getNewModuleName(movedSymbols) {
164634
- return movedSymbols.forEachEntry(ts.symbolNameNoDefault) || "newFile";
164639
+ function getNewModuleName(importsFromNewFile, movedSymbols) {
164640
+ return importsFromNewFile.forEachEntry(ts.symbolNameNoDefault) || movedSymbols.forEachEntry(ts.symbolNameNoDefault) || "newFile";
164635
164641
  }
164636
164642
  function getUsageInfo(oldFile, toMove, checker) {
164637
164643
  var movedSymbols = new SymbolSet();
package/lib/typescript.js CHANGED
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220727";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220728";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -59610,7 +59610,8 @@ var ts;
59610
59610
  }
59611
59611
  }
59612
59612
  }
59613
- return getIntersectionType(constraints);
59613
+ // The source types were normalized; ensure the result is normalized too.
59614
+ return getNormalizedType(getIntersectionType(constraints), /*writing*/ false);
59614
59615
  }
59615
59616
  return undefined;
59616
59617
  }
@@ -84853,8 +84854,9 @@ var ts;
84853
84854
  }
84854
84855
  var indexInfos = getApplicableIndexInfos(type, propNameType);
84855
84856
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 258 /* InterfaceDeclaration */) : undefined;
84856
- var localPropDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84857
- name && name.kind === 162 /* ComputedPropertyName */ || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84857
+ var propDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84858
+ name && name.kind === 162 /* ComputedPropertyName */ ? declaration : undefined;
84859
+ var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84858
84860
  var _loop_30 = function (info) {
84859
84861
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
84860
84862
  // We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
@@ -84863,7 +84865,11 @@ var ts;
84863
84865
  var errorNode = localPropDeclaration || localIndexDeclaration ||
84864
84866
  (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
84865
84867
  if (errorNode && !isTypeAssignableTo(propType, info.type)) {
84866
- error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84868
+ var diagnostic = createError(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84869
+ if (propDeclaration && errorNode !== propDeclaration) {
84870
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(propDeclaration, ts.Diagnostics._0_is_declared_here, symbolToString(prop)));
84871
+ }
84872
+ diagnostics.add(diagnostic);
84867
84873
  }
84868
84874
  };
84869
84875
  for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
@@ -118514,7 +118520,7 @@ var ts;
118514
118520
  // `result[i]` is either a `ResolvedModuleFull` or a marker.
118515
118521
  // If it is the former, we can leave it as is.
118516
118522
  if (result[i] === predictedToResolveToAmbientModuleMarker) {
118517
- result[i] = undefined; // TODO: GH#18217
118523
+ result[i] = undefined;
118518
118524
  }
118519
118525
  }
118520
118526
  else {
@@ -164257,7 +164263,7 @@ var ts;
164257
164263
  var usage = getUsageInfo(oldFile, toMove.all, checker);
164258
164264
  var currentDirectory = ts.getDirectoryPath(oldFile.fileName);
164259
164265
  var extension = ts.extensionFromPath(oldFile.fileName);
164260
- var newModuleName = makeUniqueModuleName(getNewModuleName(usage.movedSymbols), extension, currentDirectory, host);
164266
+ var newModuleName = makeUniqueModuleName(getNewModuleName(usage.oldFileImportsFromNewFile, usage.movedSymbols), extension, currentDirectory, host);
164261
164267
  var newFileNameWithExtension = newModuleName + extension;
164262
164268
  // If previous file was global, this is easy.
164263
164269
  changes.createNewFile(oldFile, ts.combinePaths(currentDirectory, newFileNameWithExtension), getNewStatementsAndRemoveFromOldFile(oldFile, usage, changes, toMove, program, newModuleName, preferences));
@@ -164621,8 +164627,8 @@ var ts;
164621
164627
  newModuleName = moduleName + "." + i;
164622
164628
  }
164623
164629
  }
164624
- function getNewModuleName(movedSymbols) {
164625
- return movedSymbols.forEachEntry(ts.symbolNameNoDefault) || "newFile";
164630
+ function getNewModuleName(importsFromNewFile, movedSymbols) {
164631
+ return importsFromNewFile.forEachEntry(ts.symbolNameNoDefault) || movedSymbols.forEachEntry(ts.symbolNameNoDefault) || "newFile";
164626
164632
  }
164627
164633
  function getUsageInfo(oldFile, toMove, checker) {
164628
164634
  var movedSymbols = new SymbolSet();
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220727";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220728";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -59610,7 +59610,8 @@ var ts;
59610
59610
  }
59611
59611
  }
59612
59612
  }
59613
- return getIntersectionType(constraints);
59613
+ // The source types were normalized; ensure the result is normalized too.
59614
+ return getNormalizedType(getIntersectionType(constraints), /*writing*/ false);
59614
59615
  }
59615
59616
  return undefined;
59616
59617
  }
@@ -84853,8 +84854,9 @@ var ts;
84853
84854
  }
84854
84855
  var indexInfos = getApplicableIndexInfos(type, propNameType);
84855
84856
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 258 /* InterfaceDeclaration */) : undefined;
84856
- var localPropDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84857
- name && name.kind === 162 /* ComputedPropertyName */ || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84857
+ var propDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84858
+ name && name.kind === 162 /* ComputedPropertyName */ ? declaration : undefined;
84859
+ var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84858
84860
  var _loop_30 = function (info) {
84859
84861
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
84860
84862
  // We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
@@ -84863,7 +84865,11 @@ var ts;
84863
84865
  var errorNode = localPropDeclaration || localIndexDeclaration ||
84864
84866
  (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
84865
84867
  if (errorNode && !isTypeAssignableTo(propType, info.type)) {
84866
- error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84868
+ var diagnostic = createError(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84869
+ if (propDeclaration && errorNode !== propDeclaration) {
84870
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(propDeclaration, ts.Diagnostics._0_is_declared_here, symbolToString(prop)));
84871
+ }
84872
+ diagnostics.add(diagnostic);
84867
84873
  }
84868
84874
  };
84869
84875
  for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
@@ -118514,7 +118520,7 @@ var ts;
118514
118520
  // `result[i]` is either a `ResolvedModuleFull` or a marker.
118515
118521
  // If it is the former, we can leave it as is.
118516
118522
  if (result[i] === predictedToResolveToAmbientModuleMarker) {
118517
- result[i] = undefined; // TODO: GH#18217
118523
+ result[i] = undefined;
118518
118524
  }
118519
118525
  }
118520
118526
  else {
@@ -164257,7 +164263,7 @@ var ts;
164257
164263
  var usage = getUsageInfo(oldFile, toMove.all, checker);
164258
164264
  var currentDirectory = ts.getDirectoryPath(oldFile.fileName);
164259
164265
  var extension = ts.extensionFromPath(oldFile.fileName);
164260
- var newModuleName = makeUniqueModuleName(getNewModuleName(usage.movedSymbols), extension, currentDirectory, host);
164266
+ var newModuleName = makeUniqueModuleName(getNewModuleName(usage.oldFileImportsFromNewFile, usage.movedSymbols), extension, currentDirectory, host);
164261
164267
  var newFileNameWithExtension = newModuleName + extension;
164262
164268
  // If previous file was global, this is easy.
164263
164269
  changes.createNewFile(oldFile, ts.combinePaths(currentDirectory, newFileNameWithExtension), getNewStatementsAndRemoveFromOldFile(oldFile, usage, changes, toMove, program, newModuleName, preferences));
@@ -164621,8 +164627,8 @@ var ts;
164621
164627
  newModuleName = moduleName + "." + i;
164622
164628
  }
164623
164629
  }
164624
- function getNewModuleName(movedSymbols) {
164625
- return movedSymbols.forEachEntry(ts.symbolNameNoDefault) || "newFile";
164630
+ function getNewModuleName(importsFromNewFile, movedSymbols) {
164631
+ return importsFromNewFile.forEachEntry(ts.symbolNameNoDefault) || movedSymbols.forEachEntry(ts.symbolNameNoDefault) || "newFile";
164626
164632
  }
164627
164633
  function getUsageInfo(oldFile, toMove, checker) {
164628
164634
  var movedSymbols = new SymbolSet();
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220727";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220728";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -59405,7 +59405,8 @@ var ts;
59405
59405
  }
59406
59406
  }
59407
59407
  }
59408
- return getIntersectionType(constraints);
59408
+ // The source types were normalized; ensure the result is normalized too.
59409
+ return getNormalizedType(getIntersectionType(constraints), /*writing*/ false);
59409
59410
  }
59410
59411
  return undefined;
59411
59412
  }
@@ -84648,8 +84649,9 @@ var ts;
84648
84649
  }
84649
84650
  var indexInfos = getApplicableIndexInfos(type, propNameType);
84650
84651
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 258 /* InterfaceDeclaration */) : undefined;
84651
- var localPropDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84652
- name && name.kind === 162 /* ComputedPropertyName */ || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84652
+ var propDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84653
+ name && name.kind === 162 /* ComputedPropertyName */ ? declaration : undefined;
84654
+ var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84653
84655
  var _loop_30 = function (info) {
84654
84656
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
84655
84657
  // We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
@@ -84658,7 +84660,11 @@ var ts;
84658
84660
  var errorNode = localPropDeclaration || localIndexDeclaration ||
84659
84661
  (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
84660
84662
  if (errorNode && !isTypeAssignableTo(propType, info.type)) {
84661
- error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84663
+ var diagnostic = createError(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
84664
+ if (propDeclaration && errorNode !== propDeclaration) {
84665
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(propDeclaration, ts.Diagnostics._0_is_declared_here, symbolToString(prop)));
84666
+ }
84667
+ diagnostics.add(diagnostic);
84662
84668
  }
84663
84669
  };
84664
84670
  for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
@@ -118309,7 +118315,7 @@ var ts;
118309
118315
  // `result[i]` is either a `ResolvedModuleFull` or a marker.
118310
118316
  // If it is the former, we can leave it as is.
118311
118317
  if (result[i] === predictedToResolveToAmbientModuleMarker) {
118312
- result[i] = undefined; // TODO: GH#18217
118318
+ result[i] = undefined;
118313
118319
  }
118314
118320
  }
118315
118321
  else {
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": "4.8.0-dev.20220727",
5
+ "version": "4.8.0-dev.20220728",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -28,7 +28,6 @@
28
28
  "engines": {
29
29
  "node": ">=4.2.0"
30
30
  },
31
- "packageManager": "npm@6.14.15",
32
31
  "devDependencies": {
33
32
  "@octokit/rest": "latest",
34
33
  "@types/chai": "latest",
@@ -118,7 +117,9 @@
118
117
  "source-map-support": false,
119
118
  "inspector": false
120
119
  },
120
+ "packageManager": "npm@8.15.0",
121
121
  "volta": {
122
- "node": "14.15.5"
122
+ "node": "14.20.0",
123
+ "npm": "8.15.0"
123
124
  }
124
125
  }