luciopaiva / heapify

The fastest JavaScript priority queue out there. Zero dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation: What do peek() and peekPriority() return on empty heap

Feuermurmel opened this issue · comments

I could not find a description on what peek() and peekPriority() return when the heap is empty. pop() has a return type of number | undefined, and is documented to return undefined if the heap is emtpy, but peek() and peekPriority() both return just number.