routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {
|
||||
const scheduleSubscription = scheduler.schedule(function () {
|
||||
work();
|
||||
if (repeat) {
|
||||
parentSubscription.add(this.schedule(null, delay));
|
||||
}
|
||||
else {
|
||||
this.unsubscribe();
|
||||
}
|
||||
}, delay);
|
||||
parentSubscription.add(scheduleSubscription);
|
||||
if (!repeat) {
|
||||
return scheduleSubscription;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=executeSchedule.js.map
|
||||
Reference in New Issue
Block a user