Utility for T[] -> T #301
Unanswered
sarimabbas
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I've been looking through the documentation for a while but am unable to find the answer to this problem. Perhaps I am missing something, so apologies!
I woud like to extract T[ ] => T (get an object type from array).
Without TS Toolbelt I have been doing it like
const x: T = T[number]
(as described here) but wonder if there is a utility provided by tsbelt for the same purpose. Thank you!Beta Was this translation helpful? Give feedback.
All reactions