-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypes.ts
More file actions
99 lines (96 loc) · 2.1 KB
/
Types.ts
File metadata and controls
99 lines (96 loc) · 2.1 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import type { onMessage, sendMessage } from 'webext-bridge/content-script';
export type ChangeFields<T, R> = Omit<T, keyof R> & R;
export type KnownPlatform = Array<string | { headerName: string; value: string }>;
export type WPRDetections = {
wpr: {
present: boolean;
cached: boolean;
timeStamp: number | null;
};
remove_unused_css: {
present: boolean;
};
delay_js: {
present: boolean;
scripts: Array<{
inline: boolean;
src?: string;
content?: string;
delayed: boolean;
deferred: boolean;
deferredByWPR: boolean;
fdtExcluded: string | null;
}>;
version: null | string;
delayedScripts: number;
};
defer_all_js: {
present: boolean;
scripts: string[];
};
async_css: {
present: boolean;
};
lazyload: {
present: boolean;
images: Array<{ src: string; lazyloadDetected: boolean; excludedReasonsFound: string[] }>;
};
lazyload_iframes: {
present: boolean;
replaceImage: boolean;
};
lazyload_css_bg_img: {
present: boolean;
};
minify_css: {
present: boolean;
};
minify_js: {
present: boolean;
};
preload_links: {
present: boolean;
};
rocket_cdn: {
present: boolean;
};
rocket_above_the_fold_optimization: {
present: boolean;
beacon: boolean;
preloadedImages?: Array<string>;
};
};
export type PreloadedResources = {
present: boolean;
resources?: Array<{ href: string; type: string }>;
};
export type DiagnoserRocketData = {
options: {
[key: string]: RocketDataOption;
};
post_meta_excluded_options: {
[k: string]: boolean;
};
};
export type RocketDataOption = {
option_name: string;
} & {
get_rocket_option: {
[k: string]: unknown;
};
filters: {
[k: string]: unknown;
};
};
export type OnMessage = typeof onMessage;
export type SendMessage = typeof sendMessage;
export type MessageBride = {
onMessage: OnMessage;
sendMessage: SendMessage;
};
export type DevToolsSearch =
| {
action: 'performSearch' | 'cancelSearch' | 'nextSearchResult' | 'previousSearchResult';
queryString?: string;
}
| undefined;