Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > MinimumHeap > poll

MinimumHeap.poll() method

Retrieves and removes the root item from the heap. The next smallest item will become the new root.

Signature:

poll(): T | undefined;

Returns:

T | undefined

the root item, or undefined if the heap is empty