Skip to content

feat(language-service): set the kind of props inherited from intrinsic elements to Value instead of Field #5315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Apr 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: update
  • Loading branch information
KazariEX committed Apr 11, 2025
commit c705a1064edb54806e2da648be8d751b066e625c
26 changes: 12 additions & 14 deletions packages/typescript-plugin/lib/requests/getComponentProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,18 @@ export function getComponentProps(
}

let isAttribute: boolean | undefined;
for (const root of checker.getRootSymbols(prop)) {
for (const { parent } of root.declarations ?? []) {
if (!ts.isInterfaceDeclaration(parent)) {
continue;
}
const { text } = parent.name;
if (
text.endsWith('HTMLAttributes')
|| text === 'AriaAttributes'
|| text === 'SVGAttributes'
) {
isAttribute = true;
break;
}
for (const { parent } of checker.getRootSymbols(prop).flatMap((root) => root.declarations ?? [])) {
if (!ts.isInterfaceDeclaration(parent)) {
continue;
}
const { text } = parent.name;
if (
text.endsWith('HTMLAttributes')
|| text === 'AriaAttributes'
|| text === 'SVGAttributes'
) {
isAttribute = true;
break;
}
}

Expand Down
Loading