<!-- 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; [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

