File tree 1 file changed +12
-14
lines changed
packages/typescript-plugin/lib/requests
1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -86,20 +86,18 @@ export function getComponentProps(
86
86
}
87
87
88
88
let isAttribute : boolean | undefined ;
89
- for ( const root of checker . getRootSymbols ( prop ) ) {
90
- for ( const { parent } of root . declarations ?? [ ] ) {
91
- if ( ! ts . isInterfaceDeclaration ( parent ) ) {
92
- continue ;
93
- }
94
- const { text } = parent . name ;
95
- if (
96
- text . endsWith ( 'HTMLAttributes' )
97
- || text === 'AriaAttributes'
98
- || text === 'SVGAttributes'
99
- ) {
100
- isAttribute = true ;
101
- break ;
102
- }
89
+ for ( const { parent } of checker . getRootSymbols ( prop ) . flatMap ( ( root ) => root . declarations ?? [ ] ) ) {
90
+ if ( ! ts . isInterfaceDeclaration ( parent ) ) {
91
+ continue ;
92
+ }
93
+ const { text } = parent . name ;
94
+ if (
95
+ text . endsWith ( 'HTMLAttributes' )
96
+ || text === 'AriaAttributes'
97
+ || text === 'SVGAttributes'
98
+ ) {
99
+ isAttribute = true ;
100
+ break ;
103
101
}
104
102
}
105
103
You can’t perform that action at this time.
0 commit comments