Unverified Commit a8a5368c authored by Hong Minhee's avatar Hong Minhee
Browse files

Fix CustomCollectionCallbacks authorizePredicate type parameter

Changed `keyof TParam & string` to `TParam` in authorize callbacks.
Since TParam is now `string` instead of `Record<string, string>`,
`keyof TParam` would incorrectly resolve to string method names
like "toString", "charAt", etc.

This fixes type checking errors introduced when refactoring collection
dispatcher types from Record-based to string-based parameters.
parent 7e49ab89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1520,7 +1520,7 @@ export class FederationBuilderImpl<TContextData>
      authorize(
        predicate: ObjectAuthorizePredicate<
          TContextData,
          keyof TParam & string
          TParam
        >,
      ) {
        callbacks.authorizePredicate = predicate;
+1 −1
Original line number Diff line number Diff line
@@ -912,7 +912,7 @@ export interface CustomCollectionCallbacks<
   */
  authorizePredicate?: ObjectAuthorizePredicate<
    TContextData,
    keyof TParam & string
    TParam
  >;
}