Type Alias WritableDataProperties<T>

WritableDataProperties: Pick<T, WritableDataPropertyKeys<T>>

Projects T to an object containing only its writable non-callable properties.

Property value types and optional modifiers are preserved.

Type Parameters

  • T extends object

    Object type to project.

interface Example
{
value: number;
optional?: string;
callback: () => void;
readonly id: string;
}

type Result = WritableDataProperties<Example>;

// {
// value: number;
// optional?: string;
// }