1 |
|
2 |
|
3 |
|
4 |
|
5 | export type GetInstanceFactory<T> = (element: string | Element) => T | null;
|
6 | export type GetOrCreateInstanceFactory<T, C extends ComponentOptions = ComponentOptions> = (
|
7 | element: string | Element,
|
8 | config?: C,
|
9 | ) => T;
|
10 | export type ComponentOptions = Record<string, any>;
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | export default class BaseComponent {
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 | static readonly VERSION: string;
|
24 |
|
25 | static readonly DATA_KEY: string;
|
26 |
|
27 | static readonly EVENT_KEY: string;
|
28 |
|
29 | constructor(element: string | Element);
|
30 |
|
31 | /**
|
32 | * Destroys an element's.
|
33 | */
|
34 | dispose(): void;
|
35 | }
|