Skip to content

Commit

Permalink
Fix bad types
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Sep 30, 2019
1 parent b002b35 commit cf84832
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
10 changes: 1 addition & 9 deletions packages/ra-core/src/dataProvider/useDelete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@ const useDelete = (
id: Identifier,
previousData: any = {},
options?: any
): [
(event: any, callTimePayload?: any, callTimeOptions?: any) => void,
{
data?: any;
error?: any;
loading: boolean;
loaded: boolean;
}
] =>
) =>
useMutation(
{ type: 'delete', resource, payload: { id, previousData } },
options
Expand Down
15 changes: 2 additions & 13 deletions packages/ra-core/src/dataProvider/useDeleteMany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,7 @@ import { Identifier } from '../types';
* return <button disabled={loading} onClick={deleteMany}>Delete selected posts</button>;
* };
*/
const useDeleteMany = (
resource: string,
ids: [Identifier],
options?: any
): [
(event: any, callTimePayload?: any, callTimeOptions?: any) => void,
{
data?: any;
error?: any;
loading: boolean;
loaded: boolean;
}
] => useMutation({ type: 'deleteMany', resource, payload: { ids } }, options);
const useDeleteMany = (resource: string, ids: [Identifier], options?: any) =>
useMutation({ type: 'deleteMany', resource, payload: { ids } }, options);

export default useDeleteMany;

0 comments on commit cf84832

Please sign in to comment.