fix(channel header): fix action callbacks

This commit is contained in:
Paul Makles
2021-12-30 19:44:15 +00:00
parent b065fba6a4
commit 4773b76ea9
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));