DefinitelyTyped/types/bootstrap-select/index.d.ts
Alex Truba 62f16a9442
🤖 Merge PR #45284 [bootstrap-select] Upgrade to 1.13.14 version by @AlexTruba
* upgrade to 1.13.14 version
improve selectpicker method signature

* change return type for selectpicker
2020-06-16 07:13:36 -07:00

64 lines
1.7 KiB
TypeScript

// Type definitions for bootstrap-select v1.13.14
// Project: https://silviomoreto.github.io/bootstrap-select/
// Definitions by: Karol Janyst <https://github.com/LKay>
// Alex Truba <https://github.com/AlexTruba>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery"/>
interface BootstrapSelectOptions {
actionsBox?: boolean;
container?: string | boolean;
countSelectedText?: string | Function;
deselectAllText?: string;
dropdownAlignRight?: string | boolean;
dropupAuto?: boolean;
header?: string;
hideDisabled?: boolean;
iconBase?: string;
liveSearch?: boolean;
liveSearchNormalize?: boolean;
liveSearchPlaceholder?: string;
liveSearchStyle?: string;
maxOptions?: number | boolean;
maxOptionsText?: string | Array<any> | Function;
mobile?: boolean;
multipleSeparator?: string;
noneSelectedText?: string;
noneResultsText?: string;
selectAllText?: string;
selectedTextFormat?: string;
selectOnTab?: boolean;
showContent?: boolean;
showIcon?: boolean;
showSubtext?: boolean;
showTick?: boolean;
size?: 'auto' | number | boolean;
style?: string;
styleBase?: string;
tickIcon?: string;
title?: string;
virtualScroll?: boolean | number;
width?: string | boolean;
windowPadding?: number | number[];
}
type MethodType =
| 'val'
| 'selectAll'
| 'deselectAll'
| 'render'
| 'mobile'
| 'setStyle'
| 'refresh'
| 'toggle'
| 'hide'
| 'show'
| 'destroy';
interface JQuery {
selectpicker(opts?: BootstrapSelectOptions): JQuery;
selectpicker(method: MethodType, ...args: Array<string | Array<string>>): JQuery;
}