Type Alias ReadonlyDataPropertyKeys<T>

ReadonlyDataPropertyKeys: {
    [K in ReadonlyPropertyKeys<T>]-?: ContainsCallable<T[K]> extends true
        ? never
        : K
}[ReadonlyPropertyKeys<T>]

Produces the readonly property keys of T whose value types contain no callable member.

Readonly function-valued properties and readonly unions containing a callable type are excluded. Properties typed as any are also conservatively excluded.

Type Parameters

  • T extends object

    Object type to inspect.

interface Example
{
readonly id: string;
readonly callback: () => void;
}

type Keys = ReadonlyDataPropertyKeys<Example>;
// "id"