<!-- 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; [peek](./x-components.basexpriorityqueue.peek.md)

## BaseXPriorityQueue.peek() method

Retrieves, but does not remove, the head [node](./x-components.xpriorityqueuenode.md) of the queue.

**Signature:**

```typescript
peek(): XPriorityQueueNode<SomeRecord, SomeData> | undefined;
```
**Returns:**

[XPriorityQueueNode](./x-components.xpriorityqueuenode.md)<!-- -->&lt;SomeRecord, SomeData&gt; \| undefined

The head [node](./x-components.xpriorityqueuenode.md) of the queue.

