mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Merge pull request #13521 from Nebual/bootstrap-switch-return-types
[bootstrap-switch]: Update return types for non-JQuery methods
This commit is contained in:
@@ -18,6 +18,9 @@ function test_cases() {
|
||||
|
||||
$('#switch').bootstrapSwitch('state', true, true);
|
||||
|
||||
$('#switch').bootstrapSwitch('state') === true;
|
||||
|
||||
$('#switch').bootstrapSwitch('onText') === 'test';
|
||||
|
||||
$('#switch').on('switchChange.bootstrapSwitch', (event) => {
|
||||
console.log($(event.target).val());
|
||||
|
||||
Vendored
+2
@@ -84,6 +84,8 @@ declare namespace BootstrapSwitch {
|
||||
interface JQuery {
|
||||
bootstrapSwitch(): JQuery;
|
||||
bootstrapSwitch(options: BootstrapSwitch.BootstrapSwitchOptions): JQuery;
|
||||
bootstrapSwitch(method: 'state' | 'radioAllOff' | 'animate' | 'disabled' | 'readonly'): boolean;
|
||||
bootstrapSwitch(method: 'size' | 'onColor' | 'offColor' | 'onText' | 'offText' | 'labelText' | 'baseClass' | 'wrapperClass'): string;
|
||||
bootstrapSwitch(method: string): JQuery;
|
||||
bootstrapSwitch(method: string, param: any): JQuery;
|
||||
bootstrapSwitch(method: string, param1: any, param2: any): JQuery;
|
||||
|
||||
Reference in New Issue
Block a user