diff --git a/typeahead/typeahead.d.ts b/typeahead/typeahead.d.ts index 7317aa4c7..a8b139937 100644 --- a/typeahead/typeahead.d.ts +++ b/typeahead/typeahead.d.ts @@ -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 { */ public static tokenizers: Bloodhound.Tokenizers; } + +declare module "bloodhound" { + export = Bloodhound; +}