<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [worker-tls](./worker-tls.md) &gt; [SortQueue](./worker-tls.sortqueue.md) &gt; [(constructor)](./worker-tls.sortqueue._constructor_.md)

## SortQueue.(constructor)

Constructs a new instance of the `SortQueue` class

**Signature:**

```typescript
constructor(comparer: SortComparer<Item>, items?: Item[]);
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

comparer


</td><td>

[SortComparer](./worker-tls.sortcomparer.md)<!-- -->&lt;Item&gt;


</td><td>


</td></tr>
<tr><td>

items


</td><td>

Item\[\]


</td><td>

_(Optional)_


</td></tr>
</tbody></table>
