typescript 4.7.0-dev.20220418 → 4.7.0-dev.20220421

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.
@@ -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.20220418";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220421";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -33380,7 +33380,8 @@ var ts;
33380
33380
  var pos = getNodePos();
33381
33381
  parseExpected(112 /* TypeOfKeyword */);
33382
33382
  var entityName = parseEntityName(/*allowReservedWords*/ true, /*allowPrivateIdentifiers*/ true);
33383
- var typeArguments = tryParseTypeArguments();
33383
+ // Make sure we perform ASI to prevent parsing the next line's type arguments as part of an instantiation expression.
33384
+ var typeArguments = !scanner.hasPrecedingLineBreak() ? tryParseTypeArguments() : undefined;
33384
33385
  return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
33385
33386
  }
33386
33387
  function parseTypeParameter() {
@@ -62128,11 +62129,14 @@ var ts;
62128
62129
  return type[cache] = elementType;
62129
62130
  }
62130
62131
  }
62131
- // If the object type is a mapped type { [P in K]: E }, where K is generic, instantiate E using a mapper
62132
- // that substitutes the index type for P. For example, for an index access { [P in K]: Box<T[P]> }[X], we
62133
- // construct the type Box<T[X]>.
62134
- if (isGenericMappedType(objectType) && !objectType.declaration.nameType) {
62135
- return type[cache] = mapType(substituteIndexedMappedType(objectType, type.indexType), function (t) { return getSimplifiedType(t, writing); });
62132
+ // If the object type is a mapped type { [P in K]: E }, where K is generic, or { [P in K as N]: E }, where
62133
+ // K is generic and N is assignable to P, instantiate E using a mapper that substitutes the index type for P.
62134
+ // For example, for an index access { [P in K]: Box<T[P]> }[X], we construct the type Box<T[X]>.
62135
+ if (isGenericMappedType(objectType)) {
62136
+ var nameType = getNameTypeFromMappedType(objectType);
62137
+ if (!nameType || isTypeAssignableTo(nameType, getTypeParameterFromMappedType(objectType))) {
62138
+ return type[cache] = mapType(substituteIndexedMappedType(objectType, type.indexType), function (t) { return getSimplifiedType(t, writing); });
62139
+ }
62136
62140
  }
62137
62141
  return type[cache] = type;
62138
62142
  }
@@ -74452,10 +74456,15 @@ var ts;
74452
74456
  prop = getPropertyOfType(apparentType, right.escapedText);
74453
74457
  }
74454
74458
  // In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
74459
+ // `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
74460
+ // here even if `Foo` is not a const enum.
74461
+ //
74455
74462
  // The exceptions are:
74456
74463
  // 1. if 'isolatedModules' is enabled, because the const enum value will not be inlined, and
74457
74464
  // 2. if 'preserveConstEnums' is enabled and the expression is itself an export, e.g. `export = Foo.Bar.Baz`.
74458
- if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && isConstEnumOrConstEnumOnlyModule(prop)) || ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
74465
+ if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
74466
+ !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 299 /* EnumMember */)) ||
74467
+ ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
74459
74468
  markAliasReferenced(parentSymbol, node);
74460
74469
  }
74461
74470
  var propType;
@@ -86190,15 +86199,20 @@ var ts;
86190
86199
  return propertyDeclaration;
86191
86200
  }
86192
86201
  }
86193
- else if (ts.isMetaProperty(parent)) {
86194
- var parentType = getTypeOfNode(parent);
86195
- var propertyDeclaration = getPropertyOfType(parentType, node.escapedText);
86196
- if (propertyDeclaration) {
86197
- return propertyDeclaration;
86198
- }
86199
- if (parent.keywordToken === 103 /* NewKeyword */) {
86202
+ else if (ts.isMetaProperty(parent) && parent.name === node) {
86203
+ if (parent.keywordToken === 103 /* NewKeyword */ && ts.idText(node) === "target") {
86204
+ // `target` in `new.target`
86200
86205
  return checkNewTargetMetaProperty(parent).symbol;
86201
86206
  }
86207
+ // The `meta` in `import.meta` could be given `getTypeOfNode(parent).symbol` (the `ImportMeta` interface symbol), but
86208
+ // we have a fake expression type made for other reasons already, whose transient `meta`
86209
+ // member should more exactly be the kind of (declarationless) symbol we want.
86210
+ // (See #44364 and #45031 for relevant implementation PRs)
86211
+ if (parent.keywordToken === 100 /* ImportKeyword */ && ts.idText(node) === "meta") {
86212
+ return getGlobalImportMetaExpressionType().members.get("meta");
86213
+ }
86214
+ // no other meta properties are valid syntax, thus no others should have symbols
86215
+ return undefined;
86202
86216
  }
86203
86217
  }
86204
86218
  switch (node.kind) {
@@ -94876,7 +94890,7 @@ var ts;
94876
94890
  }
94877
94891
  resumeLexicalEnvironment();
94878
94892
  var needsSyntheticConstructor = !constructor && isDerivedClass;
94879
- var indexOfFirstStatementAfterSuper = 0;
94893
+ var indexOfFirstStatementAfterSuperAndPrologue = 0;
94880
94894
  var prologueStatementCount = 0;
94881
94895
  var superStatementIndex = -1;
94882
94896
  var statements = [];
@@ -94885,8 +94899,11 @@ var ts;
94885
94899
  superStatementIndex = ts.findSuperStatementIndex(constructor.body.statements, prologueStatementCount);
94886
94900
  // If there was a super call, visit existing statements up to and including it
94887
94901
  if (superStatementIndex >= 0) {
94888
- indexOfFirstStatementAfterSuper = superStatementIndex + 1;
94889
- statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, prologueStatementCount), true), ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, prologueStatementCount, indexOfFirstStatementAfterSuper - prologueStatementCount), true), statements.slice(prologueStatementCount), true);
94902
+ indexOfFirstStatementAfterSuperAndPrologue = superStatementIndex + 1;
94903
+ statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, prologueStatementCount), true), ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, prologueStatementCount, indexOfFirstStatementAfterSuperAndPrologue - prologueStatementCount), true), statements.slice(prologueStatementCount), true);
94904
+ }
94905
+ else if (prologueStatementCount >= 0) {
94906
+ indexOfFirstStatementAfterSuperAndPrologue = prologueStatementCount;
94890
94907
  }
94891
94908
  }
94892
94909
  if (needsSyntheticConstructor) {
@@ -94922,22 +94939,20 @@ var ts;
94922
94939
  }
94923
94940
  }
94924
94941
  if (parameterPropertyDeclarationCount > 0) {
94925
- var parameterProperties = ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatementAfterSuper, parameterPropertyDeclarationCount);
94942
+ var parameterProperties = ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatementAfterSuperAndPrologue, parameterPropertyDeclarationCount);
94926
94943
  // If there was a super() call found, add parameter properties immediately after it
94927
94944
  if (superStatementIndex >= 0) {
94928
94945
  ts.addRange(statements, parameterProperties);
94929
94946
  }
94930
- // If a synthetic super() call was added, add them just after it
94931
- else if (needsSyntheticConstructor) {
94932
- statements = __spreadArray(__spreadArray([
94933
- statements[0]
94934
- ], parameterProperties, true), statements.slice(1), true);
94935
- }
94936
- // Since there wasn't a super() call, add them to the top of the constructor
94937
94947
  else {
94938
- statements = __spreadArray(__spreadArray([], parameterProperties, true), statements, true);
94948
+ // Add add parameter properties to the top of the constructor after the prologue
94949
+ var superAndPrologueStatementCount = prologueStatementCount;
94950
+ // If a synthetic super() call was added, need to account for that
94951
+ if (needsSyntheticConstructor)
94952
+ superAndPrologueStatementCount++;
94953
+ statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, superAndPrologueStatementCount), true), parameterProperties, true), statements.slice(superAndPrologueStatementCount), true);
94939
94954
  }
94940
- indexOfFirstStatementAfterSuper += parameterPropertyDeclarationCount;
94955
+ indexOfFirstStatementAfterSuperAndPrologue += parameterPropertyDeclarationCount;
94941
94956
  }
94942
94957
  }
94943
94958
  }
@@ -94947,7 +94962,7 @@ var ts;
94947
94962
  addPropertyOrClassStaticBlockStatements(statements, properties, receiver);
94948
94963
  // Add existing statements after the initial prologues and super call
94949
94964
  if (constructor) {
94950
- ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitBodyStatement, ts.isStatement, indexOfFirstStatementAfterSuper + prologueStatementCount));
94965
+ ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitBodyStatement, ts.isStatement, indexOfFirstStatementAfterSuperAndPrologue));
94951
94966
  }
94952
94967
  statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment());
94953
94968
  return ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements),
@@ -98988,7 +99003,7 @@ var ts;
98988
99003
  // ```
98989
99004
  insertCaptureThisForNodeIfNeeded(prologue, constructor);
98990
99005
  }
98991
- var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex)), true), statements, true)),
99006
+ var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)),
98992
99007
  /*location*/ constructor.body.statements),
98993
99008
  /*multiLine*/ true);
98994
99009
  ts.setTextRange(body, constructor.body);
@@ -119964,6 +119979,18 @@ var ts;
119964
119979
  }
119965
119980
  return undefined;
119966
119981
  }
119982
+ function removeDiagnosticsOfLibraryFiles(state) {
119983
+ if (!state.cleanedDiagnosticsOfLibFiles) {
119984
+ state.cleanedDiagnosticsOfLibFiles = true;
119985
+ var program_1 = ts.Debug.checkDefined(state.program);
119986
+ var options_2 = program_1.getCompilerOptions();
119987
+ ts.forEach(program_1.getSourceFiles(), function (f) {
119988
+ return program_1.isSourceFileDefaultLibrary(f) &&
119989
+ !ts.skipTypeChecking(f, options_2, program_1) &&
119990
+ removeSemanticDiagnosticsOf(state, f.resolvedPath);
119991
+ });
119992
+ }
119993
+ }
119967
119994
  /**
119968
119995
  * Handles semantic diagnostics and dts emit for affectedFile and files, that are referencing modules that export entities from affected file
119969
119996
  * This is because even though js emit doesnt change, dts emit / type used can change resulting in need for dts emit and js change
@@ -119973,28 +120000,17 @@ var ts;
119973
120000
  removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
119974
120001
  // If affected files is everything except default library, then nothing more to do
119975
120002
  if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
119976
- if (!state.cleanedDiagnosticsOfLibFiles) {
119977
- state.cleanedDiagnosticsOfLibFiles = true;
119978
- var program_1 = ts.Debug.checkDefined(state.program);
119979
- var options_2 = program_1.getCompilerOptions();
119980
- ts.forEach(program_1.getSourceFiles(), function (f) {
119981
- return program_1.isSourceFileDefaultLibrary(f) &&
119982
- !ts.skipTypeChecking(f, options_2, program_1) &&
119983
- removeSemanticDiagnosticsOf(state, f.resolvedPath);
119984
- });
119985
- }
120003
+ removeDiagnosticsOfLibraryFiles(state);
119986
120004
  // When a change affects the global scope, all files are considered to be affected without updating their signature
119987
120005
  // That means when affected file is handled, its signature can be out of date
119988
120006
  // To avoid this, ensure that we update the signature for any affected file in this scenario.
119989
120007
  ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
119990
120008
  return;
119991
120009
  }
119992
- else {
119993
- ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
119994
- }
119995
- if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
119996
- forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash, host); });
119997
- }
120010
+ ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
120011
+ if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
120012
+ return;
120013
+ handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
119998
120014
  }
119999
120015
  /**
120000
120016
  * Handle the dts may change, so they need to be added to pending emit if dts emit is enabled,
@@ -120036,16 +120052,41 @@ var ts;
120036
120052
  var oldSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
120037
120053
  return newSignature !== oldSignature;
120038
120054
  }
120055
+ function forEachKeyOfExportedModulesMap(state, filePath, fn) {
120056
+ // Go through exported modules from cache first
120057
+ var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
120058
+ var result = keys && ts.forEachKey(keys, fn);
120059
+ if (result)
120060
+ return result;
120061
+ // If exported from path is not from cache and exported modules has path, all files referencing file exported from are affected
120062
+ keys = state.exportedModulesMap.getKeys(filePath);
120063
+ return keys && ts.forEachKey(keys, function (exportedFromPath) {
120064
+ var _a;
120065
+ // If the cache had an updated value, skip
120066
+ return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
120067
+ !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
120068
+ fn(exportedFromPath) :
120069
+ undefined;
120070
+ });
120071
+ }
120072
+ function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
120073
+ var _a;
120074
+ if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
120075
+ return false;
120076
+ // Every file needs to be handled
120077
+ ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, state.program, /*firstSourceFile*/ undefined)
120078
+ .forEach(function (file) { return handleDtsMayChangeOf(state, file.resolvedPath, cancellationToken, computeHash, host); });
120079
+ removeDiagnosticsOfLibraryFiles(state);
120080
+ return true;
120081
+ }
120039
120082
  /**
120040
- * Iterate on referencing modules that export entities from affected file
120083
+ * Iterate on referencing modules that export entities from affected file and delete diagnostics and add pending emit
120041
120084
  */
120042
- function forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, fn) {
120043
- var _a, _b;
120085
+ function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
120044
120086
  // If there was change in signature (dts output) for the changed file,
120045
120087
  // then only we need to handle pending file emit
120046
- if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath)) {
120088
+ if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
120047
120089
  return;
120048
- }
120049
120090
  if (!isChangedSignature(state, affectedFile.resolvedPath))
120050
120091
  return;
120051
120092
  // Since isolated modules dont change js files, files affected by change in signature is itself
@@ -120058,7 +120099,9 @@ var ts;
120058
120099
  var currentPath = queue.pop();
120059
120100
  if (!seenFileNamesMap.has(currentPath)) {
120060
120101
  seenFileNamesMap.set(currentPath, true);
120061
- fn(state, currentPath);
120102
+ if (handleDtsMayChangeOfGlobalScope(state, currentPath, cancellationToken, computeHash, host))
120103
+ return;
120104
+ handleDtsMayChangeOf(state, currentPath, cancellationToken, computeHash, host);
120062
120105
  if (isChangedSignature(state, currentPath)) {
120063
120106
  var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath);
120064
120107
  queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath));
@@ -120070,56 +120113,38 @@ var ts;
120070
120113
  var seenFileAndExportsOfFile = new ts.Set();
120071
120114
  // Go through exported modules from cache first
120072
120115
  // If exported modules has path, all files referencing file exported from are affected
120073
- (_a = state.currentAffectedFilesExportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
120074
- return forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn);
120075
- });
120076
- // If exported from path is not from cache and exported modules has path, all files referencing file exported from are affected
120077
- (_b = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.forEach(function (exportedFromPath) {
120078
- var _a;
120079
- // If the cache had an updated value, skip
120080
- return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
120081
- !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) &&
120082
- forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn);
120116
+ forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, function (exportedFromPath) {
120117
+ if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
120118
+ return true;
120119
+ var references = state.referencedMap.getKeys(exportedFromPath);
120120
+ return references && ts.forEachKey(references, function (filePath) {
120121
+ return handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
120122
+ });
120083
120123
  });
120084
120124
  }
120085
120125
  /**
120086
- * Iterate on files referencing referencedPath
120126
+ * handle dts and semantic diagnostics on file and iterate on anything that exports this file
120127
+ * return true when all work is done and we can exit handling dts emit and semantic diagnostics
120087
120128
  */
120088
- function forEachFilesReferencingPath(state, referencedPath, seenFileAndExportsOfFile, fn) {
120129
+ function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
120089
120130
  var _a;
120090
- (_a = state.referencedMap.getKeys(referencedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (filePath) {
120091
- return forEachFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, fn);
120092
- });
120093
- }
120094
- /**
120095
- * fn on file and iterate on anything that exports this file
120096
- */
120097
- function forEachFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, fn) {
120098
- var _a, _b, _c;
120099
- if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath)) {
120100
- return;
120101
- }
120102
- fn(state, filePath);
120131
+ if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
120132
+ return undefined;
120133
+ if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
120134
+ return true;
120135
+ handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
120103
120136
  ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
120104
- // Go through exported modules from cache first
120105
120137
  // If exported modules has path, all files referencing file exported from are affected
120106
- (_a = state.currentAffectedFilesExportedModulesMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
120107
- return forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn);
120108
- });
120109
- // If exported from path is not from cache and exported modules has path, all files referencing file exported from are affected
120110
- (_b = state.exportedModulesMap.getKeys(filePath)) === null || _b === void 0 ? void 0 : _b.forEach(function (exportedFromPath) {
120111
- var _a;
120112
- // If the cache had an updated value, skip
120113
- return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
120114
- !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) &&
120115
- forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn);
120138
+ forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
120139
+ return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
120116
120140
  });
120117
120141
  // Remove diagnostics of files that import this file (without going to exports of referencing files)
120118
- (_c = state.referencedMap.getKeys(filePath)) === null || _c === void 0 ? void 0 : _c.forEach(function (referencingFilePath) {
120142
+ (_a = state.referencedMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (referencingFilePath) {
120119
120143
  return !seenFileAndExportsOfFile.has(referencingFilePath) && // Not already removed diagnostic file
120120
- fn(state, referencingFilePath);
120121
- } // Dont add to seen since this is not yet done with the export removal
120122
- );
120144
+ handleDtsMayChangeOf(// Dont add to seen since this is not yet done with the export removal
120145
+ state, referencingFilePath, cancellationToken, computeHash, host);
120146
+ });
120147
+ return undefined;
120123
120148
  }
120124
120149
  /**
120125
120150
  * This is called after completing operation on the next affected file.