Skip to content

Commit c8dc720

Browse files
authored
fix(language-service): avoid false positives for destructured props detection on binding property names (#5994)
1 parent ada2857 commit c8dc720

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/language-service/lib/plugins/vue-inlayhints.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,16 @@ export function findDestructuredProps(
317317
}
318318
}
319319

320+
if (
321+
ts.isBindingElement(parent)
322+
|| ts.isImportSpecifier(parent)
323+
|| ts.isExportSpecifier(parent)
324+
) {
325+
if (parent.propertyName === id) {
326+
return false;
327+
}
328+
}
329+
320330
return true;
321331
}
322332
}

0 commit comments

Comments
 (0)