File tree 5 files changed +12
-12
lines changed
tests/baselines/reference/api
5 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,16 @@ namespace ts {
314
314
getSuggestionDiagnostics: file => {
315
315
return (suggestionDiagnostics.get(file.fileName) || emptyArray).concat(getUnusedDiagnostics());
316
316
function getUnusedDiagnostics(): ReadonlyArray<Diagnostic> {
317
+ if (file.isDeclarationFile) return emptyArray;
318
+
317
319
checkSourceFile(file);
318
320
const diagnostics: Diagnostic[] = [];
319
321
Debug.assert(!!(getNodeLinks(file).flags & NodeCheckFlags.TypeChecked));
320
- if (!file.isDeclarationFile) {
321
- checkUnusedIdentifiers(allPotentiallyUnusedIdentifiers.get(file.fileName)!, (kind, diag) => {
322
- if (!unusedIsError(kind)) {
323
- diagnostics.push({ ...diag, category: DiagnosticCategory.Suggestion });
324
- }
325
- });
326
- }
322
+ checkUnusedIdentifiers(allPotentiallyUnusedIdentifiers.get(file.fileName)!, (kind, diag) => {
323
+ if (!unusedIsError(kind)) {
324
+ diagnostics.push({ ...diag, category: DiagnosticCategory.Suggestion });
325
+ }
326
+ });
327
327
return diagnostics;
328
328
}
329
329
},
Original file line number Diff line number Diff line change @@ -1623,7 +1623,7 @@ namespace ts {
1623
1623
messageText : text ,
1624
1624
category : message . category ,
1625
1625
code : message . code ,
1626
- unused : message . unused ,
1626
+ reportsUnused : message . unused ,
1627
1627
} ;
1628
1628
}
1629
1629
@@ -1654,7 +1654,7 @@ namespace ts {
1654
1654
messageText : text ,
1655
1655
category : message . category ,
1656
1656
code : message . code ,
1657
- unused : message . unused ,
1657
+ reportsUnused : message . unused ,
1658
1658
} ;
1659
1659
}
1660
1660
Original file line number Diff line number Diff line change @@ -4061,7 +4061,7 @@ namespace ts {
4061
4061
messageText : string | DiagnosticMessageChain ;
4062
4062
category : DiagnosticCategory ;
4063
4063
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
4064
- unused ?: { } ;
4064
+ reportsUnused ?: { } ;
4065
4065
code : number ;
4066
4066
source ?: string ;
4067
4067
}
Original file line number Diff line number Diff line change @@ -2279,7 +2279,7 @@ declare namespace ts {
2279
2279
messageText : string | DiagnosticMessageChain ;
2280
2280
category : DiagnosticCategory ;
2281
2281
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
2282
- unused ?: { } ;
2282
+ reportsUnused ?: { } ;
2283
2283
code : number ;
2284
2284
source ?: string ;
2285
2285
}
Original file line number Diff line number Diff line change @@ -2279,7 +2279,7 @@ declare namespace ts {
2279
2279
messageText : string | DiagnosticMessageChain ;
2280
2280
category : DiagnosticCategory ;
2281
2281
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
2282
- unused ?: { } ;
2282
+ reportsUnused ?: { } ;
2283
2283
code : number ;
2284
2284
source ?: string ;
2285
2285
}
You can’t perform that action at this time.
0 commit comments