(heap: Array<MinHeapEntry>, entry: MinHeapEntry)
| 4004 | self.priority < that.priority || (self.priority === that.priority && self.sequence < that.sequence) |
| 4005 | |
| 4006 | const minHeapPush = (heap: Array<MinHeapEntry>, entry: MinHeapEntry): void => { |
| 4007 | let index = heap.length |
| 4008 | heap.push(entry) |
| 4009 | while (index > 0) { |
| 4010 | const parent = (index - 1) >>> 1 |
| 4011 | if (!minHeapLessThan(entry, heap[parent])) { |
| 4012 | break |
| 4013 | } |
| 4014 | heap[index] = heap[parent] |
| 4015 | index = parent |
| 4016 | } |
| 4017 | heap[index] = entry |
| 4018 | } |
| 4019 | |
| 4020 | const minHeapPop = (heap: Array<MinHeapEntry>): MinHeapEntry | undefined => { |
| 4021 | const first = heap[0] |
no test coverage detected