Home > @rushstack/node-core-library > MinimumHeap > peek
MinimumHeap.peek() method
Retrieves the root item from the heap without removing it.
Signature:
peek(): T | undefined;
Returns:
T | undefined
the root item, or undefined if the heap is empty