From db5a6f4bc4da9c36b89ad8059df0800eaae515cc Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Tue, 27 Jun 2017 19:08:27 -0400 Subject: [PATCH] [jquery] Formatting. --- types/jquery/jquery-tests.ts | 123 ++++++++++++----------------------- 1 file changed, 41 insertions(+), 82 deletions(-) diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index e6a9907958..b21aeb6427 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -4458,52 +4458,31 @@ function JQueryStatic() { const w = $.when(t, u, v); w.then((a, b, c) => { - // $ExpectType string - a[0]; - // $ExpectType SuccessTextStatus - a[1]; - // $ExpectType jqXHR - a[2]; - // $ExpectType number - b[0]; - // $ExpectType SuccessTextStatus - b[1]; - // $ExpectType jqXHR - b[2]; - // $ExpectType boolean - c[0]; - // $ExpectType SuccessTextStatus - c[1]; - // $ExpectType jqXHR - c[2]; + a[0]; // $ExpectType string + a[1]; // $ExpectType SuccessTextStatus + a[2]; // $ExpectType jqXHR + b[0]; // $ExpectType number + b[1]; // $ExpectType SuccessTextStatus + b[2]; // $ExpectType jqXHR + c[0]; // $ExpectType boolean + c[1]; // $ExpectType SuccessTextStatus + c[2]; // $ExpectType jqXHR }); w.catch((a, b, c) => { - // $ExpectType jqXHR - a[0]; - // $ExpectType ErrorTextStatus - a[1]; - // $ExpectType string - a[2]; - // $ExpectType jqXHR - b[0]; - // $ExpectType ErrorTextStatus - b[1]; - // $ExpectType string - b[2]; - // $ExpectType jqXHR - c[0]; - // $ExpectType ErrorTextStatus - c[1]; - // $ExpectType string - c[2]; + a[0]; // $ExpectType jqXHR + a[1]; // $ExpectType ErrorTextStatus + a[2]; // $ExpectType string + b[0]; // $ExpectType jqXHR + b[1]; // $ExpectType ErrorTextStatus + b[2]; // $ExpectType string + c[0]; // $ExpectType jqXHR + c[1]; // $ExpectType ErrorTextStatus + c[2]; // $ExpectType string }); w.then(null, null, (a, b, c) => { - // $ExpectType never - a; - // $ExpectType never - b; - // $ExpectType never - c; + a; // $ExpectType never + b; // $ExpectType never + c; // $ExpectType never }); } @@ -4512,38 +4491,24 @@ function JQueryStatic() { const w = $.when(t, u); w.then((a, b) => { - // $ExpectType string - a[0]; - // $ExpectType SuccessTextStatus - a[1]; - // $ExpectType jqXHR - a[2]; - // $ExpectType number - b[0]; - // $ExpectType SuccessTextStatus - b[1]; - // $ExpectType jqXHR - b[2]; + a[0]; // $ExpectType string + a[1]; // $ExpectType SuccessTextStatus + a[2]; // $ExpectType jqXHR + b[0]; // $ExpectType number + b[1]; // $ExpectType SuccessTextStatus + b[2]; // $ExpectType jqXHR }); w.catch((a, b) => { - // $ExpectType jqXHR - a[0]; - // $ExpectType ErrorTextStatus - a[1]; - // $ExpectType string - a[2]; - // $ExpectType jqXHR - b[0]; - // $ExpectType ErrorTextStatus - b[1]; - // $ExpectType string - b[2]; + a[0]; // $ExpectType jqXHR + a[1]; // $ExpectType ErrorTextStatus + a[2]; // $ExpectType string + b[0]; // $ExpectType jqXHR + b[1]; // $ExpectType ErrorTextStatus + b[2]; // $ExpectType string }); w.then(null, null, (a, b) => { - // $ExpectType never - a; - // $ExpectType never - b; + a; // $ExpectType never + b; // $ExpectType never }); } @@ -4568,12 +4533,9 @@ function JQueryStatic() { errorThrown; }); w.then(null, null, (a, b, c) => { - // $ExpectType never - a; - // $ExpectType never - b; - // $ExpectType never - c; + a; // $ExpectType never + b; // $ExpectType never + c; // $ExpectType never }); } } @@ -4732,16 +4694,13 @@ function JQueryStatic() { const task3 = this.runTask3(); task1.then(value => { - // $ExpectType One - value; + value; // $ExpectType One }); task2.then(value => { - // $ExpectType Two - value; + value; // $ExpectType Two }); task3.then(value => { - // $ExpectType Three - value; + value; // $ExpectType Three }); $.when(task1, task2, task3)