forked from aFarkas/lazysizes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lazysizes.d.ts
81 lines (80 loc) · 2.02 KB
/
lazysizes.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import './types/global';
export = lazySizes;
declare var lazySizes: {
init: () => void;
/**
* @type { LazySizesConfigPartial }
*/
cfg: LazySizesConfigPartial;
/**
* @type { true }
*/
noSupport: true;
autoSizer?: undefined;
loader?: undefined;
uP?: undefined;
aC?: undefined;
rC?: undefined;
hC?: undefined;
fire?: undefined;
gW?: undefined;
rAF?: undefined;
} | {
/**
* @type { LazySizesConfigPartial }
*/
cfg: LazySizesConfigPartial;
autoSizer: {
_: () => void;
checkElems: () => void;
updateElem: (elem: Element, dataAttr: any, width?: number) => void;
};
loader: {
_: () => void;
checkElems: (isPriority: any) => void;
unveil: (elem: Element) => void;
_aLSL: () => void;
};
init: () => void;
uP: (el: any, full: any) => void;
aC: (ele: Element, cls: string) => void;
rC: (ele: Element, cls: string) => void;
hC: (ele: Element, cls: string) => any;
fire: (elem: Element, name: string, detail: any, noBubbles: boolean, noCancelable: boolean) => CustomEvent;
gW: (elem: Element, parent: Element, width?: number) => number;
rAF: {
(fn: any, queue: any, ...args: any[]): void;
_lsFlush: () => void;
};
/**
* @type { true }
*/
noSupport?: undefined;
};
declare namespace lazySizes {
export { LazySizesConfigPartial };
}
type LazySizesConfigPartial = {
[x: string]: any;
lazyClass?: string;
loadedClass?: string;
loadingClass?: string;
preloadClass?: string;
errorClass?: string;
autosizesClass?: string;
fastLoadedClass?: string;
iframeLoadMode?: 0 | 1;
srcAttr?: string;
srcsetAttr?: string;
sizesAttr?: string;
preloadAfterLoad?: boolean;
minSize?: number;
customMedia?: Record<string, string>;
init?: boolean;
expFactor?: number;
hFac?: number;
loadMode?: 0 | 1 | 2 | 3;
loadHidden?: boolean;
ricTimeout?: number;
throttleDelay?: number;
};