Inferring the type of elements in an array

type Unarray<T> = T extends Array<infer U> ? U : T

Last updated

Was this helpful?