mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-29 08:14:06 +00:00
Create TypeScript definition file.
This commit is contained in:
parent
985768867f
commit
a2bea849fc
40
src/jquery.autocomplete.d.ts
vendored
Normal file
40
src/jquery.autocomplete.d.ts
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
interface JQueryAutocompleteOptions {
|
||||||
|
serviceUrl?: string;
|
||||||
|
lookup?: AutocompleteSuggestion[];
|
||||||
|
lookupFilter? (suggestion: AutocompleteSuggestion, query: string, queryLowercase: string): any;
|
||||||
|
onSelect? (suggestion: AutocompleteSuggestion): void;
|
||||||
|
minChars: number;
|
||||||
|
maxHeight: number;
|
||||||
|
deferRequestBy?: number;
|
||||||
|
width?: number;
|
||||||
|
params?: Object;
|
||||||
|
formatResult? (suggestion: AutocompleteSuggestion, currentValue: string): string;
|
||||||
|
delimiter?: any;
|
||||||
|
zIndex?: number;
|
||||||
|
type?: string;
|
||||||
|
noCache?: bool;
|
||||||
|
onSearchStart? (query: string): void;
|
||||||
|
onSearchComplete? (query: string): void;
|
||||||
|
tabDisabled?: bool;
|
||||||
|
paramName?: string;
|
||||||
|
transformResult? (response: any, originalQuery: string): AutocompleteSuggestion[];
|
||||||
|
autoSelectFirst?: bool;
|
||||||
|
appendTo: any;
|
||||||
|
dataType: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AutocompleteSuggestion {
|
||||||
|
value: string;
|
||||||
|
data: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AutocompleteInstance {
|
||||||
|
setOptions(options: JQueryAutocompleteOptions): void;
|
||||||
|
clear(): void;
|
||||||
|
clearCache(): void;
|
||||||
|
disable(): void;
|
||||||
|
enable(): void;
|
||||||
|
hide(): void;
|
||||||
|
dispose(): void;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user