1+ /* eslint-disable @typescript-eslint/no-unused-vars */
12// Quicktype produces definitions that are correct, but not as narrow or
23// well-named as hand-written type definition might produce. This module takes
34// the Quicktype-generated types as renames or modifies the types to be somewhat
@@ -10,11 +11,11 @@ import type {
1011 Discouraged ,
1112 GroupData ,
1213 FeatureData as QuicktypeMonolithicFeatureData ,
14+ Status as QuicktypeStatus ,
1315 StatusHeadline as QuicktypeStatusHeadline ,
1416 WebFeaturesData as QuicktypeWebFeaturesData ,
1517 Release ,
1618 SnapshotData ,
17- Status ,
1819 Support ,
1920} from "./types.quicktype" ;
2021
@@ -27,21 +28,24 @@ export type {
2728 GroupData ,
2829 Release ,
2930 SnapshotData ,
30- Status ,
3131 Support ,
3232} ;
3333
34+ export interface Status extends QuicktypeStatus {
35+ baseline : false | BaselineHighLow ;
36+ }
37+
3438export interface SupportStatus extends QuicktypeStatusHeadline {
3539 baseline : false | BaselineHighLow ;
3640}
3741
3842// These are "tests" for our type definitions.
39- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4043const badQuicktypeStatusHeadline : QuicktypeStatusHeadline = {
4144 baseline : true , // This is an improper value in our actual published data
4245 support : { } ,
4346} ;
44- // eslint-disable-next-line @typescript-eslint/no-unused-vars
47+ const badQuicktypeStatus : QuicktypeStatus = badQuicktypeStatusHeadline ;
48+
4549const badSupportStatus : SupportStatus = {
4650 // This validates that we're actually overriding Quicktype (and correctly). If
4751 // `baseline: true` ever becomes possible in the `SupportStatus`, then
@@ -50,7 +54,11 @@ const badSupportStatus: SupportStatus = {
5054 baseline : true ,
5155 support : { } ,
5256} ;
53- // eslint-disable-next-line @typescript-eslint/no-unused-vars
57+ const badStatus : Status = {
58+ // @ts -expect-error
59+ baseline : true ,
60+ support : { } ,
61+ } ;
5462const goodSupportStatus : QuicktypeStatusHeadline | SupportStatus = {
5563 baseline : false ,
5664 support : { } ,
@@ -74,7 +82,6 @@ export type FeatureData = Required<
7482 >
7583 > ;
7684
77- // eslint-disable-next-line @typescript-eslint/no-unused-vars
7885const goodFeatureData : FeatureData = {
7986 name : "Test" ,
8087 description : "Hi" ,
0 commit comments