Extract Array Element type in TypescriptSeptember 2, 2022type ArrayElementType<ArrType> = ArrType extends readonly (infer ElementType)[] ? ElementType : never;