You can use infer:
type TypeWithGeneric<T> = T[]
type extractGeneric<Type> = Type extends TypeWithGeneric<infer X> ? X : never
type extracted = extractGeneric<TypeWithGeneric<number>>
// extracted === number
Playground
You can use infer:
type TypeWithGeneric<T> = T[]
type extractGeneric<Type> = Type extends TypeWithGeneric<infer X> ? X : never
type extracted = extractGeneric<TypeWithGeneric<number>>
// extracted === number
Playground