Added prepare function to RemoteOptions interface.

This method appears to have been added to Bloodhound in the 0.11.1
release that rolled out at the end of April.
This commit is contained in:
Blake Doss
2015-10-03 11:25:00 -04:00
parent e30c870675
commit bc5a757e71
+13
View File
@@ -316,6 +316,19 @@ declare module Bloodhound
* The ajax settings object passed to jQuery.ajax.
*/
ajax?: JQueryAjaxSettings;
/**
* A function that provides a hook to allow you to prepare the settings object passed to transport
* when a request is about to be made. The function signature should be prepare(query, settings),
* where query is the query #search was called with and settings is the default settings object
* created internally by the Bloodhound instance. The prepare function should return a settings object.
* [Note: Added in 0.11.1]
*
* @param query The query #search was called with.
* @param settings The default settings object created internally by Bloodhound.
* @returns A JqueryAjaxSettings object.
*/
prepare?: (query: string, settings: JQueryAjaxSettings) => JQueryAjaxSettings;
}
/**