Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6208

How do we get nested object type in typescript

$
0
0

I have the following typescript interface:

UserInfo: {
     user: {
        options: ReadonlyArray<{
            values: ReadonlyArray<{
                value: string | null;
            }
        }
    }

I want to access the options how do I get it. I tried like below but it doesn't work for me

type options = ScreenQuery["UserInfo"]["user"]["options"];

Viewing all articles
Browse latest Browse all 6208

Trending Articles