You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const allPotentiallyUnusedIdentifiers = createMap<ReadonlyArray<PotentiallyUnusedIdentifier>>(); // key is file name
454
-
let potentiallyUnusedIdentifiers: PotentiallyUnusedIdentifier[]; // Potentially unused identifiers in the source file currently being checked.
455
-
const seenPotentiallyUnusedIdentifiers = createMap<true>(); // For assertion that we don't defer the same identifier twice
453
+
const allPotentiallyUnusedIdentifiers = createMap<PotentiallyUnusedIdentifier[]>(); // key is file name
456
454
457
455
let flowLoopStart = 0;
458
456
let flowLoopCount = 0;
@@ -22557,7 +22555,13 @@ namespace ts {
22557
22555
22558
22556
function registerForUnusedIdentifiersCheck(node: PotentiallyUnusedIdentifier): void {
22559
22557
// May be in a call such as getTypeOfNode that happened to call this. But potentiallyUnusedIdentifiers is only defined in the scope of `checkSourceFile`.
22560
-
if (potentiallyUnusedIdentifiers) {
22558
+
if (produceDiagnostics) {
22559
+
const sourceFile = getSourceFileOfNode(node);
22560
+
let potentiallyUnusedIdentifiers = allPotentiallyUnusedIdentifiers.get(sourceFile.path);
0 commit comments