Type Alias CommonPropKeys<T, Options>

CommonPropKeys<T, Options>: number extends T["length"]
    ? ArrayPlus.CommonPropKeys<T>
    : TuplePlus.CommonPropKeys<T, Options>

⚗️ transform 🔢 customization

Gets the common property keys of the elements in tuple or array T.

Type Parameters

import { CommonPropKeys } from 'type-plus'

type R = CommonPropKeys<[{ a: number }, { b: number }]> // never
type R = CommonPropKeys<[{ a: number, c: 1 }, { b: number, c: 2 }]> // 'c'

Return type when T is never. Default to never.