Commit d247a8cf authored by Jérome Perrin's avatar Jérome Perrin

monaco_editor: fix some rsvp.d.ts definitions

 - Promise signature is different, we have canceller
 - delay was missing
 - Queue.push signature was incorrect
parent 58470e11
......@@ -100,8 +100,10 @@
constructor(
executor: (
resolve: (value?: RSVP.Arg<T>) => void,
reject: (reason?: any) => void
reject: (reason?: any) => void,
notify: (value?: any) => void
) => void,
canceller: () => void,
label?: string
);
......@@ -611,12 +613,14 @@
// nexedi additions begin
class Queue<R> extends Promise<R> {
constructor();
push<U>(
onFulfilled?: (value: R) => U | Promise<U>,
onRejected?: (error: Error) => void
): Queue<U>;
push<TResult1 = R, TResult2 = never>(
onFulfilled?: ((value: R) => TResult1 | PromiseLike<TResult1>) | undefined | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,
label?: string
): Queue<TResult1 | TResult2>;
}
class CancellationError extends Error {}
const delay: (delay: number) => Promise<void>;
// nexedi additions end
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment