From 42cf3abe63b2642c6faedf70a2eec5998dd8268c Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Mon, 16 Oct 2017 14:32:07 -0400 Subject: [PATCH] [jquery] Add ajaxSettings property. (#20433) --- types/jquery/index.d.ts | 5 +++++ types/jquery/jquery-tests.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index e557103e47..f5947549b7 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -41,6 +41,11 @@ type _Event = Event; type _Promise = Promise; interface JQueryStatic { + /** + * @see {@link http://api.jquery.com/jquery.ajax/#jQuery-ajax1} + * @deprecated Use jQuery.ajaxSetup(options) + */ + ajaxSettings: JQuery.AjaxSettings; /** * A factory function that returns a chainable utility object with methods to register multiple * callbacks into callback queues, invoke callback queues, and relay the success or failure state of diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 0694ce2502..99a10c6f45 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -62,6 +62,11 @@ function JQueryStatic() { $(); } + function ajaxSettings() { + // $ExpectType JQuery.AjaxSettings + $.ajaxSettings; + } + function Event() { // $ExpectType EventStatic $.Event;