TS - how to extract type from Picked array
I have the following type:
And I want to get the type of a Section.
However this throws an error has no matching index signature for type number...
Any suggestions?
3 Replies
type Section = ChallengeInput["sections"][number];
this should do the job
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Makes sense, ty both 😄