/** @license * Copyright Stbui All Rights Reserved. * https://github.com/stbui/prophet */ export interface EditProps { resource: string; id: string | number; payload?: object; } export interface UseEditValue { record: any; id: string | number; loading: any; saving: any; save: any; error: any; saveError: any; } /** * * @param {string} resource * @param {string} id * @param {Object} payload * * @returns * * @example * * import { useEdit } from '@atbui/prophet-core'; * * const UserEdit = () => { * const { record, loading, save, isSaving } = useEdit({ resource, id payload: { data: { userId:1 } } }); * if (loading) { * return 'loading'; * } * * if (error) { * return error.message; * } * * return