lib/pool.js
/**
     * Add a task or tasks array into pool.
     * @param task Task instance or task instances array.
     */
Add a task or tasks array into pool.
@param task Task instance or task instances array.
Add a task or tasks array into pool . @param task Task instance or task instances array .
addTask(task) {
        if (task instanceof task_1.Task) {
            const length = this.tasks.push(task);
            return length - 1;
        }
        throw new TypeError('Invalid task(s)');
    }
addTask ( task ) { if ( task instanceof task_1 . Task ) { const length = this . tasks . push ( task ) ; return length - 1 ; } throw new TypeError ( 'Invalid task(s)' ) ; }
Add a task or tasks array into pool.
Add a task or tasks array into pool .
// throw error if params is not a task or a tasks array.