We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a212a4 commit a9733a2Copy full SHA for a9733a2
2 files changed
index.d.ts
@@ -0,0 +1,11 @@
1
+export declare type Item = any;
2
+export declare type Comparator<Item> = (a: Item, b: Item) => -1 | 0 | 1;
3
+
4
+export default class TinyQueue<Item> {
5
+ public data : Item[];
6
+ public length : number;
7
+ constructor (items? : Item[], compare? : Comparator<Item>);
8
+ peek () : Item;
9
+ pop () : Item;
10
+ push (Item) : void;
11
+}
package.json
@@ -6,6 +6,7 @@
"module": "index.js",
"jsdelivr": "tinyqueue.min.js",
"unpkg": "tinyqueue.min.js",
+ "types": "index.d.ts",
"scripts": {
"lint": "eslint index.js test.js bench.js rollup.config.js",
12
"pretest": "npm run lint",
@@ -18,7 +19,8 @@
18
19
"files": [
20
"index.js",
21
"tinyqueue.js",
- "tinyqueue.min.js"
22
+ "tinyqueue.min.js",
23
+ "index.d.ts"
24
],
25
"repository": {
26
"type": "git",
0 commit comments