mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Updating Promise methods to use correct parameters
This commit is contained in:
parent
045d13a1f8
commit
7c3fbd6945
@ -75,4 +75,8 @@ qwest.get('foo', null, {
|
||||
timeout: 2000,
|
||||
attempts: 7
|
||||
})
|
||||
qwest.get('foo', null, {})
|
||||
qwest.get('foo', null, {})
|
||||
|
||||
qwest.get('foo', null, {}).complete(() => {
|
||||
//done
|
||||
})
|
||||
6
qwest/qwest.d.ts
vendored
6
qwest/qwest.d.ts
vendored
@ -58,13 +58,13 @@ declare module Qwest {
|
||||
interface Promise {
|
||||
|
||||
/** Request is successful */
|
||||
then(callback: (xhr: XMLHttpRequest, response: any) => any): Promise;
|
||||
then(callback: (response: any) => any): Promise;
|
||||
|
||||
/** Request has failed */
|
||||
catch(callback: (xhr: XMLHttpRequest, response: any) => any): Promise;
|
||||
catch(callback: (e: any, response: any) => any): Promise;
|
||||
|
||||
/** Always run */
|
||||
complete(callback: (response: any) => any): Promise;
|
||||
complete(callback: () => any): Promise;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user