(node)
| 81931 | } |
| 81932 | } |
| 81933 | function registerForUnusedIdentifiersCheck(node) { |
| 81934 | addLazyDiagnostic(registerForUnusedIdentifiersCheckDiagnostics); |
| 81935 | function registerForUnusedIdentifiersCheckDiagnostics() { |
| 81936 | // May be in a call such as getTypeOfNode that happened to call this. But potentiallyUnusedIdentifiers is only defined in the scope of `checkSourceFile`. |
| 81937 | var sourceFile = ts.getSourceFileOfNode(node); |
| 81938 | var potentiallyUnusedIdentifiers = allPotentiallyUnusedIdentifiers.get(sourceFile.path); |
| 81939 | if (!potentiallyUnusedIdentifiers) { |
| 81940 | potentiallyUnusedIdentifiers = []; |
| 81941 | allPotentiallyUnusedIdentifiers.set(sourceFile.path, potentiallyUnusedIdentifiers); |
| 81942 | } |
| 81943 | // TODO: GH#22580 |
| 81944 | // Debug.assert(addToSeen(seenPotentiallyUnusedIdentifiers, getNodeId(node)), "Adding potentially-unused identifier twice"); |
| 81945 | potentiallyUnusedIdentifiers.push(node); |
| 81946 | } |
| 81947 | } |
| 81948 | function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { |
| 81949 | for (var _i = 0, potentiallyUnusedIdentifiers_1 = potentiallyUnusedIdentifiers; _i < potentiallyUnusedIdentifiers_1.length; _i++) { |
| 81950 | var node = potentiallyUnusedIdentifiers_1[_i]; |
no test coverage detected
searching dependent graphs…