Here's a solution to my problem. With a timer that acts on either of the interval limits, it works.
In the example below, I set the timer to 0.3 seconds for better understanding.
https://stackblitz.com/edit/stackblitz-starters-p4b3rgdy?file=src%2Fmain.ts