aboutsummaryrefslogtreecommitdiff
path: root/src/ppq/index.d.ts
diff options
context:
space:
mode:
authorTom Harley2018-04-25 00:54:35 +0100
committerTom Harley2018-04-25 00:54:35 +0100
commit203386afb89d2e557e4df610c6f5e566b4554222 (patch)
treee6a468e393cd5653fb9b371352281f61bf35c9c7 /src/ppq/index.d.ts
parentAdd promise priority queue for conversion logic (diff)
downloadmedicine-203386afb89d2e557e4df610c6f5e566b4554222.tar.gz
medicine-203386afb89d2e557e4df610c6f5e566b4554222.zip

Edit promise queue to return promises itself

Diffstat (limited to 'src/ppq/index.d.ts')
-rw-r--r--src/ppq/index.d.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ppq/index.d.ts b/src/ppq/index.d.ts
index 0eb2361..ee12f89 100644
--- a/src/ppq/index.d.ts
+++ b/src/ppq/index.d.ts
@@ -1,7 +1,8 @@
-// tslint:disable-next-line:no-any
+// tslint:disable:no-any
+
type Promiser<T = any> = () => PromiseLike<T>;
export class PromisePriorityQueue {
public constructor(concurrent?: number, least?: number);
- public enqueue(priority: number, promiser: Promiser): void;
+ public enqueue<T = any>(priority: number, promiser: Promiser<T>): Promise<T>;
}