@empathyco/x-components
Version:
Empathy X Components
51 lines (24 loc) • 1.02 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [BaseXPriorityQueue](./x-components.basexpriorityqueue.md) > [(constructor)](./x-components.basexpriorityqueue._constructor_.md)
## BaseXPriorityQueue.(constructor)
Creates a new [XPriorityQueue](./x-components.xpriorityqueue.md)<!-- -->.
**Signature:**
```typescript
constructor(comparatorFn?: NumberComparatorFn);
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
comparatorFn
</td><td>
[NumberComparatorFn](./x-components.numbercomparatorfn.md)
</td><td>
_(Optional)_ Comparator - the comparator that will be used to order this queue. By default, the elements will be sorted in descending order (an element with priority 1 will be higher in the queue than another with priority 0).
</td></tr>
</tbody></table>