I am interested in learning TypeScript.
dynamicContent?: {
data?: {
attributes?: {
baccarat?: { title?: string | null; content?: string | null } | null;
baccaratOnline?: { title?: string | null; content?: string | null } | null;
casino?: { title?: string | null; content?: string | null } | null;
casinoOnline?: { title?: string | null; content?: string | null } | null;
games?: Array<{
gameUrl?: string | null;
media: {
data?: {
attributes?: {
url: string;
alternativeText?: string | null;
width?: number | null;
height?: number | null;
} | null;
} | null;
};
} | null> | null;
} | null;
} | null;
} | null;
};
In order to include the type 'games', I attempted the following:
Pick<NonNullable<GetDynamicContentQuery["dynamicContent"]["data"]["attributes"]>, 'games'>
I have noticed that only the dynamicContent field is nullable. I am uncertain how to make all fields nullable.