1 | import BaseComponent from "./base-component";
|
2 |
|
3 | declare class Alert extends BaseComponent {
|
4 | static NAME: "alert";
|
5 | static jQueryInterface: Alert.jQueryInterface;
|
6 | /**
|
7 | * Static method which allows you to get the alert instance associated to a
|
8 | * DOM element, you can use it like this: getInstance(alert)
|
9 | */
|
10 | static getInstance(element: Element): Alert | null;
|
11 | /**
|
12 | * Closes an alert by removing it from the DOM. If the .fade and .show
|
13 | * classes are present on the element, the alert will fade out before it
|
14 | * is removed.
|
15 | */
|
16 | close(): void;
|
17 | }
|
18 |
|
19 | declare namespace Alert {
|
20 | enum Events {
|
21 | /**
|
22 | * Fires immediately when the close instance method is called.
|
23 | */
|
24 | close = "close.bs.alert",
|
25 |
|
26 | /**
|
27 | * Fired when the alert has been closed and CSS transitions have
|
28 | * completed.
|
29 | */
|
30 | closed = "closed.bs.alert",
|
31 | }
|
32 |
|
33 | type jQueryInterface = (config?: "close" | "dispose") => void;
|
34 | }
|
35 |
|
36 | export default Alert;
|