This commit is contained in:
Olivier Gagnon 2022-04-13 02:04:51 -04:00
parent b0c4d5b8f7
commit e1a56f9270
10 changed files with 40 additions and 9 deletions

9
dist/bitburner.d.ts vendored

@ -4503,7 +4503,7 @@ export declare interface NS {
* @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success.
* @param duration - Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000
*/
toast(msg: any, variant?: "success" | "info" | "warning" | "error", duration?: number | null): void;
toast(msg: any, variant?: ToastVariantValues, duration?: number | null): void;
/**
* Download a file from the internet.
@ -4699,12 +4699,12 @@ export declare interface NS {
*/
getSharePower(): number;
// enum: NSEnums;
enums: NSEnums;
}
/** @public */
export declare interface NSEnums {
toast: ToastVariant;
toast: typeof ToastVariant;
}
/**
@ -6839,6 +6839,9 @@ export declare enum ToastVariant {
INFO = "info",
}
/** @public */
export declare type ToastVariantValues = `${ToastVariant}`;
/**
* User Interface API.
* @public

@ -92,4 +92,5 @@
| Type Alias | Description |
| --- | --- |
| [FilenameOrPID](./bitburner.filenameorpid.md) | |
| [ToastVariantValues](./bitburner.toastvariantvalues.md) | |

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [enums](./bitburner.ns.enums.md)
## NS.enums property
<b>Signature:</b>
```typescript
enums: NSEnums;
```

@ -44,6 +44,7 @@ export async function main(ns) {
| [bladeburner](./bitburner.ns.bladeburner.md) | [Bladeburner](./bitburner.bladeburner.md) | Namespace for bladeburner functions. |
| [codingcontract](./bitburner.ns.codingcontract.md) | [CodingContract](./bitburner.codingcontract.md) | Namespace for codingcontract functions. |
| [corporation](./bitburner.ns.corporation.md) | [Corporation](./bitburner.corporation.md) | Namespace for corporation functions. RAM cost: 0 GB |
| [enums](./bitburner.ns.enums.md) | [NSEnums](./bitburner.nsenums.md) | |
| [formulas](./bitburner.ns.formulas.md) | [Formulas](./bitburner.formulas.md) | Namespace for formulas functions. |
| [gang](./bitburner.ns.gang.md) | [Gang](./bitburner.gang.md) | Namespace for gang functions. |
| [grafting](./bitburner.ns.grafting.md) | [Grafting](./bitburner.grafting.md) | Namespace for grafting functions. |

@ -9,7 +9,7 @@ Queue a toast (bottom-right notification).
<b>Signature:</b>
```typescript
toast(msg: any, variant?: "success" | "info" | "warning" | "error", duration?: number | null): void;
toast(msg: any, variant?: ToastVariantValues, duration?: number | null): void;
```
## Parameters
@ -17,7 +17,7 @@ toast(msg: any, variant?: "success" | "info" | "warning" | "error", duration?: n
| Parameter | Type | Description |
| --- | --- | --- |
| msg | any | Message in the toast. |
| variant | "success" \| "info" \| "warning" \| "error" | Type of toast, must be one of success, info, warning, error. Defaults to success. |
| variant | [ToastVariantValues](./bitburner.toastvariantvalues.md) | Type of toast, must be one of success, info, warning, error. Defaults to success. |
| duration | number \| null | Duration of toast in ms. Can also be <code>null</code> to create a persistent toast. Defaults to 2000 |
<b>Returns:</b>

@ -15,5 +15,5 @@ export interface NSEnums
| Property | Type | Description |
| --- | --- | --- |
| [toast](./bitburner.nsenums.toast.md) | [ToastVariant](./bitburner.toastvariant.md) | |
| [toast](./bitburner.nsenums.toast.md) | typeof [ToastVariant](./bitburner.toastvariant.md) | |

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
toast: ToastVariant;
toast: typeof ToastVariant;
```

@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ToastVariantValues](./bitburner.toastvariantvalues.md)
## ToastVariantValues type
<b>Signature:</b>
```typescript
export type ToastVariantValues = `${ToastVariant}`;
```
<b>References:</b> [ToastVariant](./bitburner.toastvariant.md)

@ -2555,7 +2555,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
}
},
flags: Flags(workerScript.args),
enum: {
enums: {
toast: ToastVariant,
},
};

@ -6423,7 +6423,7 @@ export interface NS {
*/
getSharePower(): number;
enum: NSEnums;
enums: NSEnums;
}
/** @public */
@ -6434,6 +6434,7 @@ export enum ToastVariant {
INFO = "info",
}
/** @public */
export type ToastVariantValues = `${ToastVariant}`;
/** @public */