Merge pull request #6116 from bdoss/typeahead

Additions to definitions for Twitter Typeahead.
This commit is contained in:
Masahiro Wakame
2015-10-12 21:04:47 +09:00
+17
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;
}
/**
@@ -411,3 +424,7 @@ declare class Bloodhound<T> {
*/
public static tokenizers: Bloodhound.Tokenizers;
}
declare module "bloodhound" {
export = Bloodhound;
}