| 9 | ) => Promise<ActionState<TInput, TOutput>>; |
| 10 | |
| 11 | interface UseActionOptions<TOutput> { |
| 12 | onSuccess?: (data: TOutput) => void; |
| 13 | onError?: (error: string) => void; |
| 14 | onComplete?: () => void; |
| 15 | } |
| 16 | |
| 17 | export const useAction = <TInput, TOutput>( |
| 18 | action: Action<TInput, TOutput>, |
nothing calls this directly
no outgoing calls
no test coverage detected