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;
@@ -22553,7 +22551,13 @@ namespace ts {
22553
22551
22554
22552
function registerForUnusedIdentifiersCheck(node: PotentiallyUnusedIdentifier): void {
22555
22553
// May be in a call such as getTypeOfNode that happened to call this. But potentiallyUnusedIdentifiers is only defined in the scope of `checkSourceFile`.
22556
-
if (potentiallyUnusedIdentifiers) {
22554
+
if (produceDiagnostics) {
22555
+
const sourceFile = getSourceFileOfNode(node);
22556
+
let potentiallyUnusedIdentifiers = allPotentiallyUnusedIdentifiers.get(sourceFile.path);
0 commit comments