Update missing parameter types

This commit is contained in:
AlexStacker
2018-09-14 11:25:12 +08:00
committed by GitHub
parent 93d00f3481
commit b347533547
+16
View File
@@ -112,6 +112,14 @@ interface Select2Plugin {
* @params triggerChange Should a change event be triggered
*/
(method: 'data', value: any, triggerChange?: boolean): any;
/**
* Whether it is open
*/
(method: 'opened'): boolean;
/**
* Whether it is in focus
*/
(method: 'isFocused'): boolean;
/**
* Reverts changes to DOM done by Select2. Any selection done via Select2 will be preserved.
*/
@@ -124,11 +132,19 @@ interface Select2Plugin {
* Closes the dropdown
*/
(method: 'close'): JQuery;
/**
* Disables Select2
*/
(method: 'disable'): JQuery;
/**
* Enables or disables Select2 and its underlying form component
* @param value True if it should be enabled false if it should be disabled
*/
(method: 'enable', value?: boolean): JQuery;
/**
* Enable its focus
*/
(method: 'focus'): JQuery;
/**
* Toggles readonly mode on Select2 and its underlying form component
* @param value True if it should be readonly false if it should be read write