(initialCapacity?: number, comparator?: (val: T, parent: T) => number)
| 4 | private _comparator: ((val: T, parent: T) => number) | null; |
| 5 | |
| 6 | constructor(initialCapacity?: number, comparator?: (val: T, parent: T) => number) { |
| 7 | const cap = initialCapacity ?? 11; |
| 8 | const com = comparator ?? null; |
| 9 | if (cap < 1) { |
| 10 | throw new Error('initial capacity must be greater than or equal to 1'); |
| 11 | } |
| 12 | this._queue = new Array<T>(cap); |
| 13 | this._comparator = com; |
| 14 | } |
| 15 | |
| 16 | private grow() { |
| 17 | const oldCapacity = this._size; |
nothing calls this directly
no outgoing calls
no test coverage detected