mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
fix(50048): remove token name from id (#50051)
This commit is contained in:
@@ -26,14 +26,13 @@ namespace ts.codefix {
|
||||
fixIds: [fixId],
|
||||
getAllCodeActions: context => {
|
||||
const { program, preferences, host } = context;
|
||||
const seen = new Map<string, true>();
|
||||
const seen = new Map<number, true>();
|
||||
|
||||
return createCombinedCodeActions(textChanges.ChangeTracker.with(context, changes => {
|
||||
eachDiagnostic(context, errorCodes, diag => {
|
||||
const info = getInfo(program, diag.file, createTextSpan(diag.start, diag.length));
|
||||
if (info) {
|
||||
const id = getNodeId(info.declaration) + "#" + info.token.getText();
|
||||
if (addToSeen(seen, id)) {
|
||||
if (addToSeen(seen, getNodeId(info.declaration))) {
|
||||
return addMissingConstraint(changes, program, preferences, host, diag.file, info);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user