I'm trying to set the type ShowOptions
as "ALL"
, "ACTIVE"
, or "DRAFT"
However, I encountered an error saying
TS2339: Property show does not exist on type
Does anyone have suggestions on how I can extract the ShowOptions
? Please note that I am unable to modify the QueryParameters
type as it is generated from an OpenAPI specification.
// Snippet of TypeScript code auto-generated from an OpenAPI definition - this code cannot be modified by me!
type QueryParameters = {
query?: {
show: "ALL" | "ACTIVE" | "DRAFT";
};
};
type Query = QueryParameters["query"];
type ShowOptions = Query["show"]; // TS2339: Property show does not exist on type