mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-04 12:10:30 +08:00
Fixed typeahead signatures
- Updated according to official documentation: see https://github.com/twitter/typeahead.js/blob/master/doc/jquery_typeahead.md - Added one more test (from official samples)
This commit is contained in:
1 parent
33bf97ba1e
commit
d8ecb4d77d
2 files changed
+64
-22
No files matched your search
Vendored
+12
-17
@@ -6,21 +6,6 @@
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
|
||||
interface JQuery {
|
||||
/**
|
||||
* Turns an input[type="text"] element into a typeahead.
|
||||
*
|
||||
* @constructor
|
||||
* @param dataset Single dataset
|
||||
*/
|
||||
typeahead(dataset: Twitter.Typeahead.Dataset): JQuery;
|
||||
|
||||
/**
|
||||
* Turns an input[type="text"] element into a typeahead.
|
||||
*
|
||||
* @constructor
|
||||
* @param dataset Array of datasets
|
||||
*/
|
||||
typeahead(datasets: Twitter.Typeahead.Dataset[]): JQuery;
|
||||
|
||||
/**
|
||||
* Destroys previously initialized typeaheads. This entails reverting
|
||||
@@ -57,9 +42,19 @@ interface JQuery {
|
||||
*
|
||||
* @constructor
|
||||
* @param options ('hint' or 'highlight' or 'minLength' all of which are optional)
|
||||
* @param dataset Array of datasets
|
||||
* @param datasets Array of datasets
|
||||
*/
|
||||
typeahead(options: Twitter.Typeahead.Options, dataset: Twitter.Typeahead.Dataset): JQuery;
|
||||
typeahead(options: Twitter.Typeahead.Options, datasets: Twitter.Typeahead.Dataset[]): JQuery;
|
||||
|
||||
/**
|
||||
* Accomodates specifying options such as hint and highlight.
|
||||
* This is in correspondence to the examples mentioned in http://twitter.github.io/typeahead.js/examples/
|
||||
*
|
||||
* @constructor
|
||||
* @param options ('hint' or 'highlight' or 'minLength' all of which are optional)
|
||||
* @param datasets One or more datasets passed in as arguments.
|
||||
*/
|
||||
typeahead(options: Twitter.Typeahead.Options, ... datasets: Twitter.Typeahead.Dataset[]): JQuery;
|
||||
}
|
||||
|
||||
declare module Twitter.Typeahead {
|
||||
|
||||
Reference in new issue
Block a user