mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-30 17:04:20 +08:00
Updating Promise methods to use correct parameters
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user