@@ -10,12 +10,12 @@ import type {
1010 Discouraged ,
1111 GroupData ,
1212 FeatureData as QuicktypeMonolithicFeatureData ,
13+ StatusHeadline as QuicktypeStatusHeadline ,
1314 WebFeaturesData as QuicktypeWebFeaturesData ,
1415 Release ,
1516 SnapshotData ,
1617 Status ,
1718 Support ,
18- StatusHeadline as SupportStatus ,
1919} from "./types.quicktype" ;
2020
2121// Passthrough types
@@ -29,7 +29,31 @@ export type {
2929 SnapshotData ,
3030 Status ,
3131 Support ,
32- SupportStatus ,
32+ } ;
33+
34+ export interface SupportStatus extends QuicktypeStatusHeadline {
35+ baseline : false | BaselineHighLow ;
36+ }
37+
38+ // These are "tests" for our type definitions.
39+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
40+ const badQuicktypeStatusHeadline : QuicktypeStatusHeadline = {
41+ baseline : true , // This is an improper value in our actual published data
42+ support : { } ,
43+ } ;
44+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
45+ const badSupportStatus : SupportStatus = {
46+ // This validates that we're actually overriding Quicktype (and correctly). If
47+ // `baseline: true` ever becomes possible in the `SupportStatus`, then
48+ // TypeScript will complain about the next line.
49+ // @ts -expect-error
50+ baseline : true ,
51+ support : { } ,
52+ } ;
53+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
54+ const goodSupportStatus : QuicktypeStatusHeadline | SupportStatus = {
55+ baseline : false ,
56+ support : { } ,
3357} ;
3458
3559export interface WebFeaturesData
@@ -51,7 +75,7 @@ export type FeatureData = Required<
5175 > ;
5276
5377// eslint-disable-next-line @typescript-eslint/no-unused-vars
54- const t1 : FeatureData = {
78+ const goodFeatureData : FeatureData = {
5579 name : "Test" ,
5680 description : "Hi" ,
5781 description_html : "Hi" ,
0 commit comments