From 37d73a9fd06fd4d0861324f6723d4710653feaac Mon Sep 17 00:00:00 2001 From: Philipp Katz Date: Wed, 23 May 2018 22:40:45 +0200 Subject: [PATCH] Add static `$.Autocomplete` to typings (used for accessing the `defaults` property) --- .../jquery.autocomplete-tests.ts | 5 +++++ .../jquery-autocomplete/jquery.autocomplete.d.ts | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/typings/jquery-autocomplete/jquery.autocomplete-tests.ts b/typings/jquery-autocomplete/jquery.autocomplete-tests.ts index 5bae7a11..06baa2a3 100644 --- a/typings/jquery-autocomplete/jquery.autocomplete-tests.ts +++ b/typings/jquery-autocomplete/jquery.autocomplete-tests.ts @@ -50,6 +50,11 @@ input.autocomplete({ } }); +// ---------------------------------------------------------------------------------------- +// ----------------------------- TEST AUTOCOMPLETE STATIC --------------------------------- +// ---------------------------------------------------------------------------------------- + +$.Autocomplete.defaults; // ---------------------------------------------------------------------------------------- // ------------------------------ TEST INSTANCE METHODS ----------------------------------- diff --git a/typings/jquery-autocomplete/jquery.autocomplete.d.ts b/typings/jquery-autocomplete/jquery.autocomplete.d.ts index eeef3db2..3bbdf24d 100644 --- a/typings/jquery-autocomplete/jquery.autocomplete.d.ts +++ b/typings/jquery-autocomplete/jquery.autocomplete.d.ts @@ -257,6 +257,15 @@ interface JQueryAutocompleteOptions { } +interface AutocompleteStatic { + + /** + * Default options for all instances. + */ + defaults: JQueryAutocompleteOptions + +} + interface AutocompleteInstance { /** @@ -297,6 +306,12 @@ interface AutocompleteInstance { } +interface JQueryStatic { + + Autocomplete: AutocompleteStatic + +} + interface JQuery { /**