UNPKG

@empathyco/x-components

Version:
51 lines (24 loc) 1.02 kB
<!-- 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 <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>