Hi, is there any proposal for an expression to invoke something after the
current call stack has cleared? Lodash `defer` is a good example.

Just like I can use `await` to pause the execution of the current call, it
would be nice to also have an expression to queue up something that cannot
run immediately e.g. `defer doThisLater();`

The current solution is to use `setTimeout` with a 1 ms delay but that is
not a good solution as it is not the same thing and it makes it more
difficult for people to understand what is the true purpose of that line of
code.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to