UNPKG

@empathyco/x-components

Version:
21 lines (12 loc) 885 B
<!-- 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; [(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). |