mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 04:17:05 +02:00
91 lines
1021 B
Markdown
91 lines
1021 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [toast](./bitburner.ns.toast.md)
|
|
|
|
## NS.toast() method
|
|
|
|
Queue a toast (bottom-right notification).
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
toast(msg: string, variant?: ToastVariant, duration?: number | null): void;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
<table><thead><tr><th>
|
|
|
|
Parameter
|
|
|
|
|
|
</th><th>
|
|
|
|
Type
|
|
|
|
|
|
</th><th>
|
|
|
|
Description
|
|
|
|
|
|
</th></tr></thead>
|
|
<tbody><tr><td>
|
|
|
|
msg
|
|
|
|
|
|
</td><td>
|
|
|
|
string
|
|
|
|
|
|
</td><td>
|
|
|
|
Message in the toast.
|
|
|
|
|
|
</td></tr>
|
|
<tr><td>
|
|
|
|
variant
|
|
|
|
|
|
</td><td>
|
|
|
|
[ToastVariant](./bitburner.toastvariant.md)
|
|
|
|
|
|
</td><td>
|
|
|
|
_(Optional)_ Type of toast. Must be one of success, info, warning, error. Defaults to success.
|
|
|
|
|
|
</td></tr>
|
|
<tr><td>
|
|
|
|
duration
|
|
|
|
|
|
</td><td>
|
|
|
|
number \| null
|
|
|
|
|
|
</td><td>
|
|
|
|
_(Optional)_ Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000.
|
|
|
|
|
|
</td></tr>
|
|
</tbody></table>
|
|
|
|
**Returns:**
|
|
|
|
void
|
|
|
|
## Remarks
|
|
|
|
RAM cost: 0 GB
|
|
|