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 @@ ...@@ -100,8 +100,10 @@
constructor( constructor(
executor: ( executor: (
resolve: (value?: RSVP.Arg<T>) => void, resolve: (value?: RSVP.Arg<T>) => void,
reject: (reason?: any) => void reject: (reason?: any) => void,
notify: (value?: any) => void
) => void, ) => void,
canceller: () => void,
label?: string label?: string
); );
...@@ -611,12 +613,14 @@ ...@@ -611,12 +613,14 @@
// nexedi additions begin // nexedi additions begin
class Queue<R> extends Promise<R> { class Queue<R> extends Promise<R> {
constructor(); constructor();
push<U>( push<TResult1 = R, TResult2 = never>(
onFulfilled?: (value: R) => U | Promise<U>, onFulfilled?: ((value: R) => TResult1 | PromiseLike<TResult1>) | undefined | null,
onRejected?: (error: Error) => void onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,
): Queue<U>; label?: string
): Queue<TResult1 | TResult2>;
} }
class CancellationError extends Error {} class CancellationError extends Error {}
const delay: (delay: number) => Promise<void>;
// nexedi additions end // 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