Closed Bluzzi closed 3 years ago
A clean and more organized system for managing tasks. This is what a task looks like now :
import Task from "../Task"; export default class Test extends Task { private execCount = 0; constructor(){ super(1000); } public async run(timeout: NodeJS.Timeout) : void { console.log(this.execCount); if(this.execCount === 5) clearInterval(timeout); this.execCount++; } }
Test.ts in the src/tasks/list folder
Test.ts
src/tasks/list
A clean and more organized system for managing tasks. This is what a task looks like now :