Skip to content

Commit

Permalink
fix: take complex/mapped typed into account during prop completions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm authored Nov 5, 2024
1 parent 776125b commit b823694
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ export class JsOrTsComponentInfoProvider implements ComponentInfoProvider {
.getProperties()
.map((prop) => {
// type would still be correct when there're multiple declarations
const declaration = prop.valueDeclaration ?? prop.declarations?.[0];
const declaration =
prop.valueDeclaration ??
prop.declarations?.[0] ??
// very complex types are hidden on this thing for some reason
(prop as any)?.links?.mappedType?.declaration;
if (!declaration) {
return;
}
Expand Down

0 comments on commit b823694

Please sign in to comment.