clean-jsdoc-theme TypeDoc APIv0.0.0

ArrayElement

ArrayElement<T> = T extends readonly (infer E)[] ? E : never

Source: common.ts:145

Extracts the element type from an array type

Type Parameters

  • T — Array type

Example

CODE
type Item = ArrayElement<string[]> // string
type User = ArrayElement<User[]> // User