-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathtypes.quicktype.ts
More file actions
235 lines (223 loc) · 4.83 KB
/
types.quicktype.ts
File metadata and controls
235 lines (223 loc) · 4.83 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/**
* The top-level web-features data package
*/
export interface WebFeaturesData {
/**
* Browsers and browser release data
*/
browsers: Browsers;
/**
* Feature identifiers and data
*/
features: { [key: string]: FeatureData };
/**
* Group identifiers and data
*/
groups: { [key: string]: GroupData };
/**
* Snapshot identifiers and data
*/
snapshots: { [key: string]: SnapshotData };
}
/**
* Browsers and browser release data
*/
export interface Browsers {
chrome: BrowserData;
chrome_android: BrowserData;
edge: BrowserData;
firefox: BrowserData;
firefox_android: BrowserData;
safari: BrowserData;
safari_ios: BrowserData;
}
/**
* Browser information
*/
export interface BrowserData {
/**
* The name of the browser, as in "Edge" or "Safari on iOS"
*/
name: string;
releases: Release[];
}
/**
* Browser release information
*/
export interface Release {
/**
* The release date, as in "2023-12-11"
*/
date: string;
/**
* The version string, as in "10" or "17.1"
*/
version: string;
}
/**
* A feature data entry
*
* A feature has permanently moved to exactly one other ID
*
* A feature has split into two or more other features
*/
export interface FeatureData {
/**
* caniuse.com identifiers
*/
caniuse?: string[];
/**
* Sources of support data for this feature
*/
compat_features?: string[];
/**
* Short description of the feature, as a plain text string
*/
description?: string;
/**
* Short description of the feature, as an HTML string
*/
description_html?: string;
/**
* Whether developers are formally discouraged from using this feature
*/
discouraged?: Discouraged;
/**
* Group identifiers
*/
group?: string[];
kind: Kind;
/**
* Short name
*/
name?: string;
/**
* Snapshot identifiers
*/
snapshot?: string[];
/**
* Specification URLs
*/
spec?: string[];
/**
* Whether a feature is considered a "Baseline" web platform feature and when it achieved
* that status
*/
status?: StatusHeadline;
/**
* The new ID for this feature
*/
redirect_target?: string;
/**
* The new IDs for this feature
*/
redirect_targets?: string[];
}
/**
* Whether developers are formally discouraged from using this feature
*/
export interface Discouraged {
/**
* Links to a formal discouragement notice, such as specification text, intent-to-unship,
* etc.
*/
according_to: string[];
/**
* IDs for features that substitute some or all of this feature's utility
*/
alternatives?: string[];
/**
* A brief, developer-focused description of why the feature is discouraged
*/
reason: string;
/**
* A brief, developer-focused description of why the feature is discouraged, as an HTML
* string
*/
reason_html: string;
/**
* An expected or actual removal date, as in "2029-12-31". Only set if there's an announced
* plan by all currently-implementing vendors to unship the feature or the feature has
* already been unshipped from all browsers.
*/
removal_date?: string;
}
export type Kind = "feature" | "moved" | "split";
/**
* Whether a feature is considered a "Baseline" web platform feature and when it achieved
* that status
*/
export interface StatusHeadline {
/**
* Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false)
*/
baseline: boolean | BaselineEnum;
/**
* Date the feature achieved Baseline high status
*/
baseline_high_date?: string;
/**
* Date the feature achieved Baseline low status
*/
baseline_low_date?: string;
/**
* Statuses for each key in the feature's compat_features list, if applicable.
*/
by_compat_key?: { [key: string]: Status };
/**
* Browser versions that most-recently introduced the feature
*/
support: Support;
}
export type BaselineEnum = "high" | "low";
export interface Status {
/**
* Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false)
*/
baseline: boolean | BaselineEnum;
/**
* Date the feature achieved Baseline high status
*/
baseline_high_date?: string;
/**
* Date the feature achieved Baseline low status
*/
baseline_low_date?: string;
/**
* Browser versions that most-recently introduced the feature
*/
support: Support;
[property: string]: any;
}
/**
* Browser versions that most-recently introduced the feature
*/
export interface Support {
chrome?: string;
chrome_android?: string;
edge?: string;
firefox?: string;
firefox_android?: string;
safari?: string;
safari_ios?: string;
}
export interface GroupData {
/**
* Short name
*/
name: string;
/**
* Identifier of parent group
*/
parent?: string;
}
export interface SnapshotData {
/**
* Short name
*/
name: string;
/**
* Specification
*/
spec: string;
}