import/Task.js
/**
     * Returns the task progress as a float between 0 and 1. The result would be
     * `-1` for tasks that have not been started yet.
     * @returns {number}
     */
Returns the task progress as a float between 0 and 1. The result would be
`-1` for tasks that have not been started yet.
@returns {number}
Returns the task progress as a float between 0 and 1 . The result would be ` - 1 ` for tasks that have not been started yet . @returns { number }
get progress()
    {
        if (this.#endTime || this.#error) {
            return 1;
        }
        const total = this.total;
        if (total <= 0) {
            return -1;
        }
        return this.position / total;
    }
get progress ( ) { if ( this . #endTime || this . #error ) { return 1 ; } const total = this . total ; if ( total <= 0 ) { return - 1 ; } return this . position / total ; }
Returns the task progress as a float between 0 and 1.
Returns the task progress as a float between 0 and 1 .
// if we don't know the total size we cannot compute the progress