Generic callback task
Usefull for creating custom tasks from success and error callbacks and cancelaton function. Synchronous callbacks are not supported,
cancelation handler type
returned task resolve type
task body with success and error callbacks
cancelation function intended for stopping task execution
task resolving to success value
fromFunction
export function timeout(delay: number) { return fromCallback<NodeJS.Timeout, void>((resolve) => setTimeout(() => resolve(), delay), clearTimeout);} Copy
export function timeout(delay: number) { return fromCallback<NodeJS.Timeout, void>((resolve) => setTimeout(() => resolve(), delay), clearTimeout);}
Generic callback task
Usefull for creating custom tasks from success and error callbacks and cancelaton function. Synchronous callbacks are not supported,