Type alias KeyOfObjOrArrayItem<T>

KeyOfObjOrArrayItem<T>: T extends unknown[]
    ? keyof T[number]
    : T extends unknown
        ? keyof T
        : string

Returns the key of an object item if T is an object array, or returns the key of an object if T is an object, otherwise returns type string.

Type Parameters

  • T

Generated using TypeDoc