Skip to content

Commit 5c0cce6

Browse files
authored
Add plugin alias in jquery.autocomplete.d.ts
Add plugin alias "devbridgeAutocomplete" in TypeScript definition file jquery.autocomplete.d.ts
1 parent 95a329d commit 5c0cce6

File tree

1 file changed

+60
-2
lines changed

1 file changed

+60
-2
lines changed

typings/jquery-autocomplete/jquery.autocomplete.d.ts

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,7 @@ interface JQuery {
301301
/**
302302
* Create Autocomplete component
303303
*/
304-
autocomplete(): AutocompleteInstance;
305-
autocomplete(options: JQueryAutocompleteOptions): AutocompleteInstance;
304+
autocomplete(options?: JQueryAutocompleteOptions): AutocompleteInstance;
306305

307306
/**
308307
* Trigger non-specialized signature method
@@ -355,3 +354,62 @@ interface JQuery {
355354
autocomplete(methodName: "dispose"): AutocompleteInstance;
356355

357356
}
357+
358+
interface JQuery {
359+
360+
/**
361+
* Create Autocomplete component via plugin alias
362+
*/
363+
devbridgeAutocomplete(options?: JQueryAutocompleteOptions): AutocompleteInstance;
364+
365+
/**
366+
* Trigger non-specialized signature method
367+
* @param methodName
368+
* @param arg
369+
*/
370+
devbridgeAutocomplete(methodName: string, ...arg: any[]): any;
371+
372+
/**
373+
* You may update any option at any time. Options are listed above.
374+
* @param methodName The name of the method
375+
* @param options
376+
*/
377+
devbridgeAutocomplete(methodName: "setOptions", options: JQueryAutocompleteOptions): AutocompleteInstance;
378+
379+
/**
380+
* Clears suggestion cache and current suggestions suggestions.
381+
* @param methodName The name of the method
382+
*/
383+
devbridgeAutocomplete(methodName: "clear"): AutocompleteInstance;
384+
385+
/**
386+
* Clears suggestion cache.
387+
* @param methodName The name of the method
388+
*/
389+
devbridgeAutocomplete(methodName: "clearCache"): AutocompleteInstance;
390+
391+
/**
392+
* Deactivate autocomplete.
393+
* @param methodName The name of the method
394+
*/
395+
devbridgeAutocomplete(methodName: "disable"): AutocompleteInstance;
396+
397+
/**
398+
* Activates autocomplete if it was deactivated before.
399+
* @param methodName The name of the method
400+
*/
401+
devbridgeAutocomplete(methodName: "enable"): AutocompleteInstance;
402+
403+
/**
404+
* Hides suggestions.
405+
* @param methodName The name of the method
406+
*/
407+
devbridgeAutocomplete(methodName: "hide"): AutocompleteInstance;
408+
409+
/**
410+
* Destroys autocomplete instance. All events are detached and suggestion containers removed.
411+
* @param methodName The name of the method
412+
*/
413+
devbridgeAutocomplete(methodName: "dispose"): AutocompleteInstance;
414+
415+
}

0 commit comments

Comments
 (0)