index.d.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // Generated by typings
  2. // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/e94e9a86308b7306bb74a973c4e18f37895f7298/bootstrap/index.d.ts
  3. interface ModalOptions {
  4. backdrop?: boolean|string;
  5. keyboard?: boolean;
  6. show?: boolean;
  7. remote?: string;
  8. }
  9. interface ModalOptionsBackdropString {
  10. backdrop?: string; // for "static"
  11. keyboard?: boolean;
  12. show?: boolean;
  13. remote?: string;
  14. }
  15. interface ScrollSpyOptions {
  16. offset?: number;
  17. target?: string;
  18. }
  19. interface TooltipOptions {
  20. animation?: boolean;
  21. html?: boolean;
  22. placement?: string | Function;
  23. selector?: string;
  24. title?: string | Function;
  25. trigger?: string;
  26. template?: string;
  27. delay?: number | Object;
  28. container?: string | boolean;
  29. viewport?: string | Function | Object;
  30. }
  31. interface PopoverOptions {
  32. animation?: boolean;
  33. html?: boolean;
  34. placement?: string | Function;
  35. selector?: string;
  36. trigger?: string;
  37. title?: string | Function;
  38. template?: string;
  39. content?: any;
  40. delay?: number | Object;
  41. container?: string | boolean;
  42. viewport?: string | Function | Object;
  43. }
  44. interface CollapseOptions {
  45. parent?: any;
  46. toggle?: boolean;
  47. }
  48. interface CarouselOptions {
  49. interval?: number;
  50. pause?: string;
  51. wrap?: boolean;
  52. keybord?: boolean;
  53. }
  54. interface TypeaheadOptions {
  55. source?: any;
  56. items?: number;
  57. minLength?: number;
  58. matcher?: (item: any) => boolean;
  59. sorter?: (items: any[]) => any[];
  60. updater?: (item: any) => any;
  61. highlighter?: (item: any) => string;
  62. }
  63. interface AffixOptions {
  64. offset?: number | Function | Object;
  65. target?: any;
  66. }
  67. interface TransitionEventNames {
  68. end: string;
  69. }
  70. interface JQuery {
  71. modal(options?: ModalOptions): JQuery;
  72. modal(options?: ModalOptionsBackdropString): JQuery;
  73. modal(command: string): JQuery;
  74. dropdown(): JQuery;
  75. dropdown(command: string): JQuery;
  76. scrollspy(command: string): JQuery;
  77. scrollspy(options?: ScrollSpyOptions): JQuery;
  78. tab(): JQuery;
  79. tab(command: string): JQuery;
  80. tooltip(options?: TooltipOptions): JQuery;
  81. tooltip(command: string): JQuery;
  82. popover(options?: PopoverOptions): JQuery;
  83. popover(command: string): JQuery;
  84. alert(): JQuery;
  85. alert(command: string): JQuery;
  86. button(): JQuery;
  87. button(command: string): JQuery;
  88. collapse(options?: CollapseOptions): JQuery;
  89. collapse(command: string): JQuery;
  90. carousel(options?: CarouselOptions): JQuery;
  91. carousel(command: string): JQuery;
  92. typeahead(options?: TypeaheadOptions): JQuery;
  93. affix(options?: AffixOptions): JQuery;
  94. emulateTransitionEnd(duration: number): JQuery;
  95. }
  96. interface JQuerySupport {
  97. transition: boolean | TransitionEventNames;
  98. }
  99. declare module "bootstrap" {
  100. }