DOCUMENTATION: Fix missing and outdated info of optional parameter (#2176)

This commit is contained in:
catloversg
2025-06-03 15:13:54 +07:00
committed by GitHub
parent 7d2686ed1b
commit bdc08cf992
3 changed files with 5 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ Create a Corporation. You should use [canCreateCorporation](./bitburner.corporat
**Signature:**
```typescript
createCorporation(corporationName: string, selfFund: boolean): boolean;
createCorporation(corporationName: string, selfFund?: boolean): boolean;
```
## Parameters
@@ -21,7 +21,7 @@ createCorporation(corporationName: string, selfFund: boolean): boolean;
| Parameter | Type | Description |
| --- | --- | --- |
| corporationName | string | Name of the corporation. It must be a non-empty string. |
| selfFund | boolean | If you want to self-fund. Defaults to true, false will only work in BitNode 3. |
| selfFund | boolean | _(Optional)_ If you want to self-fund. Defaults to true, false will only work in BitNode 3. |
**Returns:**

View File

@@ -16,7 +16,7 @@ workForCompany(companyName: CompanyName, focus?: boolean): boolean;
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | [CompanyName](./bitburner.companyname.md) | Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked. |
| companyName | [CompanyName](./bitburner.companyname.md) | Name of company to work for. Must be an exact match. |
| focus | boolean | _(Optional)_ Acquire player focus on this work operation. Optional. Defaults to true. |
**Returns:**

View File

@@ -2130,8 +2130,7 @@ export interface Singularity {
* const success = ns.singularity.workForCompany(companyName);
* if (!success) ns.tprint(`ERROR: Failed to start work at ${companyName}.`);
* ```
* @param companyName - Name of company to work for. Must be an exact match. Optional. If not specified, this
* argument defaults to the last job that you worked.
* @param companyName - Name of company to work for. Must be an exact match.
* @param focus - Acquire player focus on this work operation. Optional. Defaults to true.
* @returns True if the player starts working, and false otherwise.
*/
@@ -9324,7 +9323,7 @@ export interface Corporation extends WarehouseAPI, OfficeAPI {
* @param selfFund - If you want to self-fund. Defaults to true, false will only work in BitNode 3.
* @returns true if created and false if not
*/
createCorporation(corporationName: string, selfFund: boolean): boolean;
createCorporation(corporationName: string, selfFund?: boolean): boolean;
/**
* Check if you have a one-time unlockable upgrade.