UNPKG

550 BTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/** Naive priority queue; not intended for large datasets */
9export declare class PriorityQueue<T> {
10 private _comparator;
11 private _items;
12 constructor(_comparator: (x: T, y: T) => number);
13 clear(): void;
14 push(item: T): void;
15 pop(): T | undefined;
16 peek(): T | undefined;
17 get size(): number;
18 toArray(): Array<T>;
19}