I am trying to restrict access to the admin panel to just superAdmins and admins both of which are roles on the user collection.
problem: I get the typescript error when i hover over users.access.admin access control function:
Type 'Access' is not assignable to type '(args?: any) => boolean | Promise<boolean>'.
Type 'AccessResult | Promise<AccessResult>' is not assignable to type 'boolean | Promise<boolean>'.
Type 'Where' is not assignable to type 'boolean | Promise<boolean>'.
Type 'Where' is missing the following properties from type 'Promise<boolean>': then, catch, finally, [Symbol.toStringTag]ts(2322)
types.d.ts(311, 9): The expected type comes from property 'admin' which is declared here on type '{ create?: Access; read?: Access; readVersions?: Access; update?: Access; delete?: Access; admin?: (args?: any) => boolean | Promise<boolean>; unlock?: Access; }'```