<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [BaseXPriorityQueue](./x-components.basexpriorityqueue.md) &gt; [toString](./x-components.basexpriorityqueue.tostring.md)

## BaseXPriorityQueue.toString() method

Returns a string representation of this collection. The string representation consists of a list of the queue [nodes](./x-components.xpriorityqueuenode.md) split in multiple lines, one for each one. Nodes are converted to strings as by toString().

**Signature:**

```typescript
toString(): string;
```
**Returns:**

string

A string representation of the queue.

## Example


```
[10] 1 -> { replaceable: false, a: 'b' }
[20] 2 -> { replaceable: false }
[30] 3 -> { replaceable: false, c: 1 }
```

