@@ -16,7 +16,7 @@ export class AuthorizationResultBasedEntityAssociationLoader<
1616 TIDField extends keyof NonNullable < Pick < TFields , TSelectedFields > > ,
1717 TViewerContext extends ViewerContext ,
1818 TEntity extends ReadonlyEntity < TFields , TIDField , TViewerContext , TSelectedFields > ,
19- TSelectedFields extends keyof TFields ,
19+ TSelectedFields extends keyof TFields = keyof TFields ,
2020> {
2121 constructor (
2222 private readonly entity : TEntity ,
@@ -123,10 +123,7 @@ export class AuthorizationResultBasedEntityAssociationLoader<
123123 . getViewerScopedEntityCompanionForClass ( associatedEntityClass )
124124 . getLoaderFactory ( )
125125 . forLoad ( this . queryContext , { previousValue : null , cascadingDeleteCause : null } ) ;
126- return await loader . loadManyByFieldEqualingAsync (
127- associatedEntityFieldContainingThisID ,
128- thisID as any ,
129- ) ;
126+ return await loader . loadManyByFieldEqualingAsync ( associatedEntityFieldContainingThisID , thisID ) ;
130127 }
131128
132129 /**
@@ -178,7 +175,7 @@ export class AuthorizationResultBasedEntityAssociationLoader<
178175 . forLoad ( this . queryContext , { previousValue : null , cascadingDeleteCause : null } ) ;
179176 return await loader . loadByFieldEqualingAsync (
180177 associatedEntityLookupByField ,
181- associatedFieldValue as any ,
178+ associatedFieldValue ,
182179 ) ;
183180 }
184181
@@ -232,7 +229,7 @@ export class AuthorizationResultBasedEntityAssociationLoader<
232229 . forLoad ( this . queryContext , { previousValue : null , cascadingDeleteCause : null } ) ;
233230 return await loader . loadManyByFieldEqualingAsync (
234231 associatedEntityLookupByField ,
235- associatedFieldValue as any ,
232+ associatedFieldValue ,
236233 ) ;
237234 }
238235
0 commit comments