import/Task.js
/**
     * Updates the current position (how much is done)
     * @param {number} val The value to set. Should be a positive integer
     * and will be converted to such if it isn't.
     * @public
     */
Updates the current position (how much is done)
@param {number} val The value to set. Should be a positive integer
and will be converted to such if it isn't.
@public
Updates the current position ( how much is done ) @param { number } val The value to set . Should be a positive integer and will be converted to such if it isn ' t . @public
set position(val)
    {
        val = lib.uInt(val);
        const oldPosition = this.#position;
        if (oldPosition === val) {
            return;
        }
        this.#position = val;
        const info = this.toJSON();
        if (oldPosition === 0) {
            this.emit("start", info);
        }
        this.emit("progress", info);
        if (this.#total && this.#position / this.#total >= 1) {
            this.end();
        }
    }
set position ( val ) { val = lib . uInt ( val ) ; const oldPosition = this . #position ; if ( oldPosition === val ) { return ; } this . #position = val ; const info = this . toJSON ( ) ; if ( oldPosition === 0 ) { this . emit ( "start" , info ) ; } this . emit ( "progress" , info ) ; if ( this . #total && this . #position / this . #total >= 1 ) { this . end ( ) ; } }
Updates the current position (how much is done)
 @param {number} val The value to set.
Updates the current position ( how much is done ) @param { number } val The value to set .