Extracts the element type from an array type. If the input is an array, returns the element type. Otherwise, returns the type itself (for backward compatibility).
The type to extract the element from
type StringArray = string[]type Element = ExtractArrayElement<StringArray> // stringtype RecordArray = Record<'incident'>[]type RecordElement = ExtractArrayElement<RecordArray> // Record<'incident'> Copy
type StringArray = string[]type Element = ExtractArrayElement<StringArray> // stringtype RecordArray = Record<'incident'>[]type RecordElement = ExtractArrayElement<RecordArray> // Record<'incident'>
Extracts the element type from an array type. If the input is an array, returns the element type. Otherwise, returns the type itself (for backward compatibility).