fix(channel header): fix action callbacks

This commit is contained in:
Paul Makles
2021-12-30 19:44:15 +00:00
parent a94c7d70ac
commit 841151a662
2 changed files with 32 additions and 15 deletions

View File

@@ -1 +1,11 @@
/**
* Schedule a task at the end of the Event Loop
* @param cb Callback
*/
export const defer = (cb: () => void) => setTimeout(cb, 0);
/**
* Schedule a task at the end of the second Event Loop
* @param cb Callback
*/
export const chainedDefer = (cb: () => void) => defer(() => defer(cb));