mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6116 from bdoss/typeahead
Additions to definitions for Twitter Typeahead.
This commit is contained in:
Vendored
+17
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user