vtils

Home > types > ElementOf

ElementOf type

Easily extract the type of a given array’s elements

Signature:

export declare type ElementOf<T extends readonly any[]> = T extends readonly (infer ET)[] ? ET : never;