async function upgradeOfficeSize(ns, divisionName, city, seats) {
    // First buy the new seats.
    let success = false;
    try {
        if (seats > 0) ns.corporation.upgradeOfficeSize(divisionName, city, seats);
        success = true;
    } catch (e) {
        log(ns, `ERROR: Failed to upgrade office size by ${seats} seats in ${city}.`);
        log(ns, `ERROR: ${e}`);
    }
    if (!success) return false;

    /**
     * Now that we have more office space, we need to hire and assign workers. Since
     * worker assignment takes a long time, add them to a queue and we'll handle it
     * later.
     */
    fillSpaceQueue.push(`${divisionName}/${city}`);

    return true;
}
/**
 * Buy the specified number of seats, and hire employees to fill them.
 * @param {NS} ns
 * @param {string} divisionName
 * @param {string} city
 * @param {number} seats
 * @returns {boolean} returns true on success
 */
Buy the specified number of seats, and hire employees to fill them.
Buy the specified number of seats and hire employees to fill them .
async function upgradeOfficeSize(ns, divisionName, city, seats) {
    let success = false;
    try {
        if (seats > 0) ns.corporation.upgradeOfficeSize(divisionName, city, seats);
        success = true;
    } catch (e) {
        log(ns, `ERROR: Failed to upgrade office size by ${seats} seats in ${city}.`);
        log(ns, `ERROR: ${e}`);
    }
    if (!success) return false;
    fillSpaceQueue.push(`${divisionName}/${city}`);
    return true;
}
async function upgradeOfficeSize ( ns , divisionName , city , seats ) { let success = false ; try { if ( seats > 0 ) ns . corporation . upgradeOfficeSize ( divisionName , city , seats ) ; success = true ; } catch ( e ) { log ( ns , ` ${ seats } ${ city } ` ) ; log ( ns , ` ${ e } ` ) ; } if ( ! success ) return false ; fillSpaceQueue . push ( ` ${ divisionName } ${ city } ` ) ; return true ; }
Buy the specified number of seats, and hire employees to fill them.
Buy the specified number of seats and hire employees to fill them .
// First buy the new seats.
 /**
     * Now that we have more office space, we need to hire and assign workers. Since
     * worker assignment takes a long time, add them to a queue and we'll handle it
     * later.
     */