mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
Minor fixes for issue #726
This commit is contained in:
1 parent
85eabfe63b
commit
284f4a629a
2 files changed
+3
-2
No files matched your search
Vendored
+1
-1
@@ -98,7 +98,7 @@ interface JQueryPromise<T> {
|
||||
progress(...progressCallbacks: any[]): JQueryPromise<T>;
|
||||
|
||||
// Deprecated - given no typings
|
||||
pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise;
|
||||
pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
|
||||
|
||||
then<U>(onFulfill: (value: T) => U, onReject?: (...reasons) => U, onProgress?: (...progression) => any): JQueryPromise<U>;
|
||||
then<U>(onFulfill: (value: T) => JQueryGenericPromise<U>, onReject?: (...reasons) => U, onProgress?: (...progression) => any): JQueryPromise<U>;
|
||||
|
||||
+2
-1
@@ -76,7 +76,8 @@ Q<number[]>(arrayPromise) // type specification required
|
||||
declare var jPromise: JQueryPromise<string>;
|
||||
|
||||
// if jQuery promises definition supported generics, this could be more interesting example
|
||||
Q<any>(jPromise).then((val) => val.toExponential());
|
||||
Q<string>(jPromise).then(str => str.split(','));
|
||||
jPromise.then<number>(returnsNumPromise);
|
||||
|
||||
declare var promiseArray: Q.IPromise<number>[];
|
||||
var qPromiseArray = promiseArray.map(p => Q<number>(p));
|
||||
|
||||
Reference in new issue
Block a user