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

Example

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'

Type Param

Return type when T is never. Default to never.

Generated using TypeDoc