mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Fixed misleading test
It didn't look quite right and when I debugged it in jQuery sure enough it took 2 parameters rather than 1 (both values passed on)
This commit is contained in:
@@ -2327,7 +2327,7 @@ function test_EventIsCallable() {
|
||||
}
|
||||
|
||||
$.when($.ajax("/my/page.json")).then((a,b,c) => a.asdf); // is type JQueryPromise<any>
|
||||
$.when("asdf", "jkl;").done(x => x.length, x=> x.length);
|
||||
$.when("asdf", "jkl;").done((x,y) => x.length + y.length, (x,y) => x.length + y.length);
|
||||
|
||||
var f1 = $.when("fetch"); // Is type JQueryPromise<string>
|
||||
var f2: JQueryPromise<string[]> = f1.then(s => [s, s]);
|
||||
|
||||
Reference in New Issue
Block a user