1 | import BaseComponent from './base-component';
|
2 |
|
3 | declare class ScrollSpy extends BaseComponent {
|
4 | constructor(element: string | Element, options?: Partial<ScrollSpy.Options>);
|
5 |
|
6 | /**
|
7 | * When using scrollspy in conjunction with adding or removing of
|
8 | * elements from the DOM, you’ll need to call the refresh method like
|
9 | * so:
|
10 | */
|
11 | refresh(): void;
|
12 |
|
13 | /**
|
14 | * Static method which allows you to get the scrollspy instance associated
|
15 | * with a DOM element
|
16 | */
|
17 | static getInstance(element: Element, options?: Partial<ScrollSpy.Options>): ScrollSpy;
|
18 |
|
19 | static jQueryInterface: ScrollSpy.jQueryInterface;
|
20 |
|
21 | // static NAME: 'scrollspy';
|
22 |
|
23 | /**
|
24 | * Default settings of this plugin
|
25 | *
|
26 | * @link https://getbootstrap.com/docs/5.0/getting-started/javascript/#default-settings
|
27 | */
|
28 | static Default: ScrollSpy.Options;
|
29 | }
|
30 |
|
31 | declare namespace ScrollSpy {
|
32 | enum Events {
|
33 | |
34 |
|
35 |
|
36 |
|
37 | activate = 'activate.bs.scrollspy',
|
38 | }
|
39 |
|
40 | interface Options {
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 | offset: number;
|
47 |
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | method: 'auto' | 'offset' | 'position';
|
58 |
|
59 | |
60 |
|
61 |
|
62 | target: string | Element | JQuery;
|
63 | }
|
64 |
|
65 | type jQueryInterface = (config?: Partial<Options> | 'refresh' | 'dispose') => void;
|
66 | }
|
67 |
|
68 | export default ScrollSpy;
|