@wordpress/redux-routine
Version:
Redux middleware for generator coroutines.
18 lines (16 loc) • 346 B
TypeScript
declare module 'rungen' {
type Control = (
value: any,
next: any,
iterate: any,
yieldNext: ( result: boolean ) => void,
yieldError: ( err: Error ) => void
) => Promise< boolean > | boolean;
function create(
...args: any[]
): (
action: any,
successCallback: ( result: any ) => void,
errorCallaback: () => void
) => void;
}