mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added typings to jQuery promises and deferreds.
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ Q<number[]>(arrayPromise) // type specification required
|
||||
.then<number>(returnsNumPromise) // requires specification
|
||||
.then(num => num.toFixed());
|
||||
|
||||
declare var jPromise: JQueryPromise;
|
||||
declare var jPromise: JQueryPromise<string>;
|
||||
|
||||
// if jQuery promises definition supported generics, this could be more interesting example
|
||||
Q<any>(jPromise).then((val) => val.toExponential());
|
||||
|
||||
Reference in New Issue
Block a user