@talend/react-forms
Version:
React forms library based on json schema form.
22 lines (21 loc) • 885 B
TypeScript
/**
* Trigger call management. It will
* - execute all triggers corresponding to the provided events names.
* - manage loading state through callback
* @param event The user event
* @param eventNames The trigger events to execute
* @param triggersDefinitions List of definition for each supported event
* @param onTrigger Trigger execution function
* @param onLoading Callback to manage loading state
* @param onResponse Callback in case of trigger success
* @param onError Callback in case of
* @returns {Promise} The process promise
*/
export default function callTrigger(event: any, { eventNames, triggersDefinitions, onTrigger, onLoading, onResponse, onError, }: {
eventNames?: never[] | undefined;
triggersDefinitions?: never[] | undefined;
onTrigger: any;
onLoading: any;
onResponse: any;
onError?: (() => void) | undefined;
}): Promise<any>;