@empathyco/x-components
Version:
Empathy X Components
21 lines (12 loc) • 885 B
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
| Parameter | Type | Description |
| --- | --- | --- |
| comparatorFn | [NumberComparatorFn](./x-components.numbercomparatorfn.md) | _(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). |