We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9440dc1 commit 3e6453eCopy full SHA for 3e6453e
1 file changed
index.d.ts
@@ -1,11 +1,10 @@
1
-export declare type Item = any;
2
-export declare type Comparator<Item> = (a: Item, b: Item) => number;
+export declare type Comparator<T> = (a: T, b: T) => number;
3
4
-export default class TinyQueue<Item> {
5
- public data : Item[];
+export default class TinyQueue<T> {
+ public data : T[];
6
public length : number;
7
- constructor (items? : Item[], compare? : Comparator<Item>);
8
- peek () : Item | undefined;
9
- pop () : Item | undefined;
10
- push (item: Item) : void;
+ constructor (items? : T[], compare? : Comparator<T>);
+ peek () : T | undefined;
+ pop () : T | undefined;
+ push (item: T) : void;
11
}
0 commit comments