mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Convert use-default-import refactor to a codefix (#22334)
This commit is contained in:
@@ -96,7 +96,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function eachDiagnostic({ program, sourceFile }: CodeFixAllContext, errorCodes: number[], cb: (diag: Diagnostic) => void): void {
|
||||
for (const diag of program.getSemanticDiagnostics(sourceFile)) {
|
||||
for (const diag of program.getSemanticDiagnostics(sourceFile).concat(computeSuggestionDiagnostics(sourceFile, program))) {
|
||||
if (contains(errorCodes, diag.code)) {
|
||||
cb(diag);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user