@types/defer-promise now in DefinitelyTyped

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21993
pull/3876/head
Niklas Fiekas 2017-12-08 00:16:41 +01:00
parent 8f79b25a50
commit f51304ce5a
5 changed files with 5 additions and 19 deletions

View File

@ -47,7 +47,6 @@
"ui/tournament",
"ui/tournamentSchedule",
"ui/tree",
"ui/@types/defer-promise",
"ui/@types/lichess"
]
}

View File

@ -1,11 +0,0 @@
interface Deferred<T> {
promise: Promise<T>;
resolve(value: T | PromiseLike<T>): void;
resolve(this: Deferred<void>): void;
reject(reason?: any): void;
}
declare module 'defer-promise' {
function defer<T>(): Deferred<T>;
export = defer;
}

View File

@ -1,6 +0,0 @@
{
"name": "@types/defer-promise",
"version": "1.0.0",
"author": "Thibault Duplessis",
"license": "AGPL-3.0"
}

View File

@ -13,7 +13,7 @@ export default class Protocol {
private work: Work | null = null;
private curEval: Tree.ClientEval | null = null;
private expectedPvs = 1;
private stopped: Deferred<void> | null;
private stopped: DeferPromise.Deferred<void> | null;
private opts: WorkerOpts;
constructor(send: (cmd: string) => void, opts: WorkerOpts) {

View File

@ -19,6 +19,10 @@
normalize-path "^2.0.1"
through2 "^2.0.3"
"@types/defer-promise@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/defer-promise/-/defer-promise-1.0.0.tgz#9c5054b7ef63fd0f0497d17b0ea1a849f9c6323b"
"@types/jquery@*":
version "3.2.16"
resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.2.16.tgz#04419c404a3194350e7d3f339a90e72c88db3111"