File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -161,14 +161,20 @@ export class EnhancedResource<T extends ResourceShape<any>> {
161
161
}
162
162
163
163
/**
164
- * An semi-ordered set of interfaces the resource.
164
+ * A semi-ordered set of interfaces the resource.
165
165
*/
166
166
@Once ( )
167
167
get interfaces ( ) : ReadonlySet < EnhancedResource < any > > {
168
168
return new Set (
169
- getParentTypes ( this . type )
170
- . slice ( 1 ) // not self
171
- . filter ( isResourceClass )
169
+ getParentTypes ( this . type , [ ] )
170
+ . filter (
171
+ ( cls ) : cls is ResourceShape < any > =>
172
+ // Is declared as interface. i.e. avoids DataObject.
173
+ GqlClassType . get ( cls ) === 'interface' &&
174
+ // Avoid intersected classes.
175
+ // getParentTypes will give us the intersect-ees directly.
176
+ ! cls . name . startsWith ( 'Intersection' ) ,
177
+ )
172
178
. map ( EnhancedResource . of ) ,
173
179
) ;
174
180
}
You can’t perform that action at this time.
0 commit comments